01-22-2009 09:24 AM - edited 03-06-2019 03:35 AM
Hi,
I'm looking for the correct SNMP OID (MIB) to set a port's speed and duplex mode remotely. So far I only found things like "mediaIndependentOutputSpeed", but it says that it's "Read Only" so I can't set it using SNMP.
Is there such a writable OID? Do I need to use SNMPv3 for this to work (using v1 currently).
I'm using a Cisco 3560 with IOS 12.2(25)
Thank you very much in advance
Kurt
01-22-2009 10:18 PM
you can try MAU-MIB.
Here is an example.
mnie@nms-server2[118]:/home/mnie{17:25:35}% snmpwalk -c public 172.21.50.250
ifMauDefaultType.5.1
MAU-MIB::ifMauDefaultType.5.1 = OID: SNMPv2-SMI::zeroDotZero
Now set it to dot3MauType100BaseTXHD
********
mnie@nms-server2[120]:/home/mnie{17:27:14}% snmpset -c private 172.21.50.250
ifMauDefaultType.5.1 o
dot3MauType100BaseTXHD
MAU-MIB::ifMauDefaultType.5.1 = OID: MAU-MIB::dot3MauType100BaseTXHD
mnie@nms-server2[121]:/home/mnie{17:27:32}% snmpwalk -c private 172.21.50.250
ifMauDefaultType.5.1
MAU-MIB::ifMauDefaultType.5.1 = OID: MAU-MIB::dot3MauType100BaseTXHD
It also works with the object id. Make sure you put the dot at front.
********
mnie@nms-server2[125]:/home/mnie{17:34:43}% snmpset -c private 172.21.50.250
ifMauDefaultType.5.1 o .1.3.6.1.2.1.26.4.16
MAU-MIB::ifMauDefaultType.5.1 = OID: MAU-MIB::dot3MauType100BaseTXFD
01-25-2009 02:01 AM
Hi,
thank you very much for this hint!
when I do a complete snmpwalk, I do not get any MAU-MIB related information. So I downloaded the MAU-MIB.mib file, placed onto my server in my mib directory. Still no changes. Even if I use the following command, I do not get anything MAU-MIB related:
snmpwalk -v1 -c public -m /path/to/MAU-MIB.mib 192.168.30.1
I also tried to set the value using the OID number (you last example), but I do get the following error:
Erro in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: MAU-MIB::ifMauDefaultType.5.1
I do understand that snmpset doesn't know what ifMauDefaultType.5.1 is, since the MIB doesn't seem to be recognized -- any ideas?
what exactly does ifMauDefaultType.5.1 mean? Can I use this to set the speed to a specific port and not only globally for the whole switch? I'm currently only using SNMPv1 - is that sufficient to set these values?
Sorry, I'm pretty new to SNMP and MIB's as you can tell.
Thanks again for your help
Kurt
01-26-2009 01:12 PM
Hi,
since I didn't get any further with the MAU-MIB example from above (probably my Cisco doesn't have the MAU-MIB installed...) I tried to take smaller steps:
I used a visual MIB browser to find the OID where the interface speed can be retrieved (but not set to a specific value, only get): 1.3.6.1.2.1.2.2.1.5
and then found out that by adding 1003 to this OID I would get the interface speed of port FastEthernet 0/3: 1.3.6.1.2.1.2.2.1.5.10003
So I thought if I apply the same logic to the ifMauDefaultType I'd get and be able to set the default interface speed using the following OID for example for port 0/3: 1.3.6.1.2.1.26.2.1.1.11.1003
but...it didn't work...
I can't even read that value (not to think about writing...). when I do an
snmpget -c public -v1 192.168.30.1 .1.3.6.1.2.1.26.2.1.1.11
I get:
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::mib-2.26.2.1.1.11
So, once again, is there any way (with MAU-MIB or any other MIB) to set the speed for a specific interface on a cisco switch using snmp?
Thank you very much again,
Kurt
01-26-2009 09:01 PM
It looks like your switch does not support MAU-MIB. Could you please find out which MIB is supported in your current IOS image by using the SNMP tool?
http://tools.cisco.com/Support/SNMP/do/MIBSupport.do?local=en&step=3
If MAU-MIB is not supported, the other MIB which you can try is "CISCO-STACK-MIB".
01-26-2009 09:09 PM
If "CISCO-STACK-MIB" is supported, you can try the following two objects, both of them are "read-write".
portAdminSpeed and portDuplex
01-28-2009 01:12 AM
Hi kwu2,
thanks for not giving up on me :)
I used the online tool to get the MIB's supported on my image "c3560-ipbase-mz.122-25.SEE2.bin". I could not find MAU-MIB, but DOT3-MAU-MIB and also the CISCO-STACK-MIB.
In my visual SNMP management software, I can browse to a leave called "snmpDot3MauMgt" which I hope is based on the DOT3-MAU-MIB?! And under there is the dot3IfMauBasicGroup-->ifMauTable-->ifMauEntry-->ifMauDefaultType with an OID of 1.3.6.1.2.1.26.2.1.1.11. But if I do a SNMP Get request on this leave (for example 1.3.6.1.2.1.26.2.1.1.11.1001, which should be interface 0/1), I only get NULL values. If I do a GetNext it automatically jumps to the leave 1.3.6.1.2.31.1.1.1.1.1 which represents the ifMIB and not the MAU-MIB anymore...
hhmmm...
01-28-2009 07:54 AM
DOT3-MAU-MIB is the same as MAU-MIB. You can set speed/duplex by using ifMauDefaultType. Based on the following info, you need to disable autonegociation in order to make change on speed and duplex.
Therefore, after setting ifMauDefaultType, you need set ifMauAutoNegAdminStatus to "disable".
01-29-2009 11:14 AM
Thanks for the info - I'll try that tomorrow. Another idea which I had is to install a evaluation version of Cisco Works and do the port speed configuration via Cisco Works. If Cisco Works is able to configure the port speed via SNMP, then I should be able to sniffer those SNMP packets and "learn" how Cisco Works is doing it - this way I can copy the correct OID's... Problem here is just that I have no clue how to configure the port speed using Cisco Works via SNMP - any idea?
Thanks again
Kurt
01-29-2009 11:39 AM
I am not sure about Cisco work.
But I will find a 3560 switch in lab to try it. Will let you know what I find later.
02-02-2009 08:14 AM
You can use Cisco-stack-mib to set speed and duplex. I tested it in the lab.
Use portDuplex and portAdminSpeed object.
Here is example.
% snmpset -v 2c -c cisco 10.89.245.47 1.3.6.1.4.1.9.5.1.4.1.1.10.1.20 i 2
SNMPv2-SMI::enterprises.9.5.1.4.1.1.10.1.20 = INTEGER: 2
%
% snmpset -v 2c -c cisco 10.89.245.47 1.3.6.1.4.1.9.5.1.4.1.1.9.1.20 i 10000000
SNMPv2-SMI::enterprises.9.5.1.4.1.1.9.1.20 = INTEGER: 10000000
%
R37-Cat3560a#sh run int f0/18
Building configuration...
Current configuration : 57 bytes
!
interface FastEthernet0/18
speed 10
duplex full
end
02-03-2009 09:00 AM
Hi,
thanks for the detailed information. Hopefully I will be able to test this on a Cisco 3560G this Thursday.
I will provide feedback once I was able to test it - but again thanks for your great support on this!!
Best wishes from Germany,
Kurt
08-17-2021 08:36 AM
Hi,
I'm looking for the correct SNMP OID (MIB) to set a port's speed and duplex mode remotely. I only found things like ".1.3.6.1.2.1.2.2.1.5.49" and ".1.3.6.1.2.1.10.7.2.1.20.49" , but it says that it's "Read Only" so I can't set it using SNMP. I can do snmpget but not snmpset.
I found MAU-MIB to set speed and duplex but my switch does not accept it.
I'm using a Cisco SG300 - 10PP.
MAU-MIB is used for Cisco SG300 - 10PP?
Is there such a writable OID?
Thank you very much in advance
Ibticem
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide