Community discussions

MikroTik App
 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

SNMP - Mikrotik, PLEASE add this...

Mon Nov 28, 2011 8:38 pm

I really need a way to turn on and off ports via SNMP, since this is how our billing system turns customers on and off when their bill isnt paid.....

Being able to do somthing like: snmpset -c privatesnmppass -v1 somerouter.somenetwork.net ifAdminStatus.11 = 1

is important to us, and is a basic SNMP command, it really should be supported. I can run the command, but it has no effect.

Hopfully mikrotik can include this in the next version of routeros, im sure im not the only one that would like it in there.

--John
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26924
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: SNMP - Mikrotik, PLEASE add this...

Tue Nov 29, 2011 11:58 am

 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

Re: SNMP - Mikrotik, PLEASE add this...

Tue Nov 29, 2011 8:12 pm

You can do it but it doesnt change the interface status. Here I try from a remote linux box to set the snmp for the interface up/down.....look what happens.

[root@admin vb]# snmpwalk -c privatecomm -v1 core.somthing.net | grep ifAdminStatus.10
IF-MIB::ifAdminStatus.10 = INTEGER: down(2)

^^^^^Check status....its down

[root@admin vb]# snmpset -c privatecomm -v1 core.somthing.net ifAdminStatus.10 = 1
IF-MIB::ifAdminStatus.10 = INTEGER: up(1)

^^^^^ Command to bring the interface up....it looks like it worked but....

[root@admin vb]# snmpwalk -c privatecomm -v1 core.somthing.net | grep ifAdminStatus.1
IF-MIB::ifAdminStatus.10 = INTEGER: down(2)


^^^^^its still down. It didnt work.


Am i missing somthing here? This snmpset command works with all the 3com, foundry, and cisco switchs we have here... Before you ask...yes, the community im using has read/write access....

--John
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26924
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: SNMP - Mikrotik, PLEASE add this...

Wed Nov 30, 2011 8:21 am

read the manual please. you can use it to run scripts, not do exactly what you asked. the scripts you have to make yourself, and you can decide what the script will do.
 
johndjmix
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri Aug 13, 2010 12:13 am

Re: SNMP - Mikrotik, PLEASE add this...

Wed Nov 30, 2011 8:38 am

Yep, I realised this. Just didnt want to have to make a 2 scripts for each interface (one for up and one for down), and change my admistration/billing system.

Since most all devices support the ifadminstatus command, my mysql billing system database just holds the router host name and the interface number. If the customer is on a tik i need to re-write the whole system and add fields to the database so it runs a different snmpset than every other router....

Not *THAT* big of a deal, but really wish routeros would just support the standard ifadminstatus. Is there a reason why you guys dont just have that in there?

--John

Who is online

Users browsing this forum: No registered users and 58 guests