cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2238
Views
5
Helpful
16
Replies

Configure 3750 Duplex and Speed via SNMP

DrittesBinom
Level 1
Level 1

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

16 Replies 16

Joe Clarke
Cisco Employee
Cisco Employee

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.

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"

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?

Edit:

Was a switch problem, restarted it, now it accepts the changes. Strange but..., oh well^^

Me again...

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: