Get Duplex by SNMP on Catalyst IOS

Unanswered Question
Sep 25th, 2007


Can anyone point me in the direction of the OID or MIBs to get the current Duplex of a given interface on a catalyst switch using SNMP?

CISCO-STACK-MIB::portDuplex and CISCO-C2900-MIB::c2900PortDuplexState show what the port is set to - but I am interested in what the port is actually using to communicate. eg, Half, Full, Auto-Half, Auto-Full



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Kevin Dorrell Tue, 09/25/2007 - 07:33

I thought one of those was the administered state and the other was the operational state. My NMC (Spectrum) seems to be able to read two values, but unfortunately I cannot get at the OIDs. (Spectrum works on database attributes rather than letting you see the OID directly.)

However, I do know that the attribute it calls "Duplex State" has three enumerations: halfduplex, fullduplex, or autoNegotiate. The attribute it calls "Duplex Status" has only two enumerations: halfduplex or fullduplex. And I guess those are the IODs you mentioned in your posting.

You could try setting up a switch to auto and connecting it to a PC that has forced full duplex. You should see '3' (autoNegotiate) on the administrative state and '1' (half duplex) on the operational state.

Kevin Dorrell

Luxembourg Tue, 09/25/2007 - 07:36

Hi Kevin,

Yes you are correct. It looks like I would have to query two SNMP values to get the info I want.

I found one other value which is the CISCO-C2900-MIB::c2900PortDuplexStatus. However, this only applies to 2900, 2950 and 3500 switches. It seems to be dropped in 3560 and 3750 switches - I guess as it has been replaced by the STACK MIB. But I can't find a status section of the STACK MIB.

Kevin Dorrell Tue, 09/25/2007 - 07:38

That must correspond to my "Duplex State" and "Duplex Status" then. I was looking at a 2950 at the time. I do think you will have to poll two values.

Kevin Dorrell


David Stanford Tue, 09/25/2007 - 19:27

For the non-2900 devices you would indeed have to rely on the CISCO-STACK-MIB:

portDuplex OBJECT-TYPE

SYNTAX INTEGER { half(1), full(2), disagree(3), auto(4), auto-half (5), auto-full

(6) }

MAX-ACCESS read-write

STATUS current

DESCRIPTION "Indicates whether the port is operating in half-

duplex, full-duplex, disagree or auto negotiation mode.

If the port could not agree with the far end on port

duplex, the port will be in disagree(3) mode."


This Discussion