1

If I set a bandwidth parameter to Cisco Catalyst family switch port like this:

s1#sh run int Fa0/4 | i band
 bandwidth 15000
s1#

..then ifHighSpeed no longer returns the physical port speed, but instead the bandwidth value:

$ snmpwalk -v 2c -c public s1 ifHighSpeed.5
IF-MIB::ifHighSpeed.5 = Gauge32: 15
$

Is there a way to return physical port speed over SNMP even if bandwidth is specified? I tried with portAdminSpeed(.1.3.6.1.4.1.9.5.1.4.1.1.9), but SNMP agent in my switch does not know about that.

  • What do you mean with physical port speed? I.e. if a port supports 10/100/1000 and the 'auto' settings results in a speed of 100, do you want to get 100 (current speed) or 1000 (max speed) ? If you do a "show interface", where does it show the info you are looking for? – hertitu Nov 7 '16 at 15:52
  • Also, what model of Catalyst are we talking about and which IOS or IOS-XE version are you running, that may sometimes be relevant. – hertitu Nov 7 '16 at 15:54
  • @hertitu If a port supports 10/100/1000 and the auto settings results in a speed of 100, then I want to get 100 (current speed). Switch model is WS-C3560X-24 with IOS version 15.0(2)SE8. – Martin Nov 7 '16 at 16:43
  • Time and hardware restrictions don't allow me to test right now, but you may have a look at the RFC2668-MIB, e.g. do a walk of 1.3.6.1.2.1.26.2.1.1.11, but note that the return value is not the speed but a type which you can look up here. I guess it's not what you're looking for though as it at first sight this seems to return the port type, not the operational speed. – hertitu Nov 7 '16 at 17:02
  • @hertitu I tried with WS-C3560X-24 SW version 15.0(2)SE8 and few other Cisco Catalyst family switches and those did not support 1.3.6.1.2.1.26.2.1.1.11. – Martin Nov 8 '16 at 14:49
3
+100

So I've just tried this on an older 3750 (12.2(52)SE) and here's what I get - given the following configuration:

interface FastEthernet1/0/1
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,5,500
 switchport mode trunk
 bandwidth 5000
 spanning-tree link-type point-to-point
!

SNMP gives back the bandwidth value for the ifSpeed OID (bps):

IF-MIB::ifSpeed.10001 = Gauge32: 5000000

and a value of 5 for the ifHighSpeed (Mbps):

IF-MIB::ifHighSpeed.10001 = Gauge32: 5

Now, knowing that the ifIndex for fa1/0/1 is 10001 on this switch, I walked the entire MIB grepping for that index number, and there isn't a single relevant OID that gives a return value of 100000000 or 100.

So, long story short, it doesn't look like it is possible to return the physical link speed when the bandwidth parameter is set.

| improve this answer | |
  • Interestingly enough on the Nexus 3048 (NXOS System version: 6.0(2)U6(4)) it is exactly opposite. They only provide the physical speed... Love Cisco very much... – Евгений Артеменко Feb 3 at 8:59
0

If you need speed information of Interfaces, you can test ifSpeed(OID:.1.3.6.1.2.1.2.2.1.5, FROM RFC1213-MIB, IF-MIB). It's worked for me.

| improve this answer | |
  • Both ifHighSpeed and ifSpeed will return bandwidth value. – Martin Nov 6 '16 at 21:22
  • typical! To be honest though, I would expect that to be the behaviour anywhere. The bandwidth parameter is only for protocols like OSPF to use in link costs. The ifMIB is all about physical characteristics – Benjamin Dale Feb 5 at 4:49
0

The physical port speed is signified by the interface type name. In your case, int Fa0/4 means interface FastEthernet 0/4. Fast Ethernet means 100Mbps. However, a subrate Ethernet port can be achieved with the speed command. The hardware speed (full or subrate) is often called the port speed. The circuit speed can be configured with traffic shaping or policing.

So that's 2 distinct keys terms, port speed and circuit speed.

Try mediaIndependentInputSpeed or CISCO-IF-EXTENSION-MIB

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.