i need to set the Port Speed and Duplex via SNMP on a Cisco 3750 - the problem is that i cannot find out which OIDs i have to use here.
I already made a snmpwalk and checked the file for any entries that would lead to "Duplex" and "Speed", but couldnt find any... (i.e. i found the "ifSpeed", but you cannot write into this)
So I'm quite stuck now. How can i find out how to change Duplex/Speed over SNMP?
Thanks in advance!
You can use portDuplex and portAdminSpeed from the CISCO-STACK-MIB to do what you want. Both objects are implemented read-write for the Cat3750.
that is what i hoped for, too. But if I try to run an snmpget (with the Console-Tool http://net-snmp.sourceforge.net/) on "portDuplex" (OID 126.96.36.199.188.8.131.52.184.108.40.206.10 from Cisco Object Browser) i get the message:
"Error in packet Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.220.127.116.11.18.104.22.16801"
the command was
"snmpget -v 1 -c readcommunity switch4711 22.214.171.124.126.96.36.199.188.8.131.52.10.10001"
Do i need to "activate" some MiBs or could it be possible that this 3750 is a different version? -_-
Via SNMPV2, the message is little different
"SNMPv2-SMI::enterprises.184.108.40.206.220.127.116.1101 = No Such Instance currently exists
at this OID"
You're missing an index. The portTable is indexed by module, then port index. Try walking the portTable first to see what objects exist.
Ah! I thought i could adress the "portDuplex" OID with the ifIndex of the port, didnt know that the reference to the port is a different one in the portTable...
And, for some reason a "complete" snmpwalk of the switch didnt show me any Objects of "portTable", thats why i thought it didnt even exist^^
Thanks jclarke, i guess I'm fine with this now :)
One more problem:
If i set the port Speed (portAdminSpeed) or portDuplex via SNMP now , it seems as if the switch doesnt refresh or accept these changes. Because when I log into the switch over Telnet and check the values with "sh int status", they're still the same as before the SNMP change...
Is this a known problem?
Was a switch problem, restarted it, now it accepts the changes. Strange but..., oh well^^
I can read the OID "portSpantreeFastStart", but cannot write into it. Is this because it is flagged as "deprecated"?
No. It is most likely because the developers chose not to implement this object as read-write. You can use stpxFastStartPortEnable from the CISCO-STP-EXTENSIONS-MIB instead to set this attribute. This object is indexed by the dot1dBasePort of the port in question.
Thanks again :)
From where do you always know, which OIDs and MIBs to use (one different switches)you have to access if you want to manipulate certain properties?
I mean, i can browse the Cisco Object Navigator. But if i dont have any luck and the OID Name doesnt contain the property name in any way (like "portDuplex" or something like that), i would never find the OID or (like in this case, the PortFast) a wrong one...
I know from experience. However, I have an SNMP search tool at http://jaguar.ir.miami.edu/~marcus/snmptrans.html that offers the ability to search object descriptions as well as names. It may be more useful for finding certain objects.
I'm now looking for a MIB/OID to read/write the Port Connect-status (enabled/disabled, connected, notconnect). I get no results from your tool if i search for the patterns "Status", "Connection" "portStatus"...
Guess i need your help once more -_-
You can manipulate ifAdminStatus if you want to shutdown or turn up a port. You cannot change the actual operational status of a port unless you physically connect or disconnect that port.
So the "up" and "down" flags of ifAdminStatus is the equivalent setting to "enabled"/"disabled" state of the Port Status over Telnet?
OK, changing the operational status doesnt make any sense, but the ifOperStatus "up/down" equals "connect/notconnect"
Are there any dependencies betweens the settings for portDuplex ifAdminSpeed and ifAdminStatus?
Because, sometimes if i want to change duplex from auto to half, and speed from auto to 1Gb (for example) at the same time , i get an SNMP error "Error in packet: (badValue) The value given has the wrong type or length" and sometimes i don't. But the value is correct, i could only imagine that certain combinations between the settings dont work!?
Just like from the CLI, you need to set the speed to a non-auto value first before you can set duplex. Other than that, there are no dependencies.
Ah ok, i thought this was just a "restriction" from the CLI...
jclarke, unfornunately i got a new problem (and as it seems i still didnt recognize the schematic behind the "find OIDs for properties"-problem).
Now i got a 65xx Switch, and need to do set the same Properties(Speed, Duplex, VLAN) like before on the 3750. And what I've found are the supported MIBs for this switch on the Cisco website. As supposed, the OIDs i had before (portAdminSpeed, portDuplex, vmVlan..) do not exists in these MIBs. How do I find the equivalent OIDs for this switch now? :(
Imho the online documentation isnt sufficient enough, or i cant find anything useful.
Seems as if the OIDs/MIBs are supported, even though they are not listed under "supported MIBs" on this website...*grml*
Sorry for the confusion