Configure 3750 Duplex and Speed via SNMP

Unanswered Question
Dec 5th, 2007

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Joe Clarke Wed, 12/05/2007 - 09:04

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.

DrittesBinom Thu, 12/06/2007 - 00:39

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"

Joe Clarke Thu, 12/06/2007 - 05:10

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

DrittesBinom Fri, 12/07/2007 - 03:26

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

DrittesBinom Mon, 12/10/2007 - 05:15

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

DrittesBinom Tue, 12/11/2007 - 07:21

Me again...

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

Joe Clarke Tue, 12/11/2007 - 08:27

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.

DrittesBinom Wed, 12/12/2007 - 00:42

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

DrittesBinom Thu, 12/13/2007 - 01:33

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

Joe Clarke Thu, 12/13/2007 - 08:10

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.

DrittesBinom Fri, 12/14/2007 - 02:24

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"

DrittesBinom Mon, 12/17/2007 - 04:17

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

Joe Clarke Mon, 12/17/2007 - 11:54

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.

DrittesBinom Tue, 12/18/2007 - 03:07

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.

DrittesBinom Tue, 12/18/2007 - 03:44

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

Actions

This Discussion