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

Get Duplex by SNMP on Catalyst IOS

Hi,

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

Thanks,

Ben

4 REPLIES

Re: Get Duplex by SNMP on Catalyst IOS

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

Community Member

Re: Get Duplex by SNMP on Catalyst IOS

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.

Re: Get Duplex by SNMP on Catalyst IOS

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

Luxembourg

Cisco Employee

Re: Get Duplex by SNMP on Catalyst IOS

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

1325
Views
0
Helpful
4
Replies
CreatePlease to create content