12-05-2007 03:05 AM
Hello,
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!
Chris
12-05-2007 09:04 AM
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.
12-06-2007 12:39 AM
Hello jclarke,
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 1.3.6.1.4.1.9.5.1.4.1.1.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.9.5.1.4.1.1.10.10001"
the command was
"snmpget -v 1 -c readcommunity switch4711 1.3.6.1.4.1.9.5.1.4.1.1.10.10001"
Do i need to "activate" some MiBs or could it be possible that this 3750 is a different version? -_-
-------
Edit:
Via SNMPV2, the message is little different
"SNMPv2-SMI::enterprises.9.5.1.4.1.1.10.10001 = No Such Instance currently exists
at this OID"
12-06-2007 05:10 AM
You're missing an index. The portTable is indexed by module, then port index. Try walking the portTable first to see what objects exist.
12-07-2007 03:26 AM
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 :)
12-10-2007 05:15 AM
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?
Edit:
Was a switch problem, restarted it, now it accepts the changes. Strange but..., oh well^^
12-11-2007 07:21 AM
Me again...
I can read the OID "portSpantreeFastStart", but cannot write into it. Is this because it is flagged as "deprecated"?
12-11-2007 08:27 AM
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.
12-12-2007 12:42 AM
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...
12-12-2007 12:44 AM
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.
12-13-2007 01:33 AM
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 -_-
12-13-2007 08:10 AM
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.
12-14-2007 02:24 AM
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"
12-17-2007 04:17 AM
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!?
12-17-2007 11:54 AM
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.
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