Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Configure 3750 Duplex and Speed via SNMP

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
Cisco Employee

Re: Configure 3750 Duplex and Speed via SNMP

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.

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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"

Cisco Employee

Re: Configure 3750 Duplex and Speed via SNMP

You're missing an index. The portTable is indexed by module, then port index. Try walking the portTable first to see what objects exist.

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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 :)

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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^^

New Member

Re: Configure 3750 Duplex and Speed via SNMP

Me again...

I can read the OID "portSpantreeFastStart", but cannot write into it. Is this because it is flagged as "deprecated"?

Cisco Employee

Re: Configure 3750 Duplex and Speed via SNMP

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.

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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...

Cisco Employee

Re: Configure 3750 Duplex and Speed via SNMP

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.

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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 -_-

Cisco Employee

Re: Configure 3750 Duplex and Speed via SNMP

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.

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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"

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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!?

Cisco Employee

Re: Configure 3750 Duplex and Speed via SNMP

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.

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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.

New Member

Re: Configure 3750 Duplex and Speed via SNMP

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

917
Views
5
Helpful
16
Replies