Knowledge Search


×
 

[Router Products] SNMP poll to query the speed of 10G interface

  [KB9119] Show Article Properties


Summary:

This article explains why polling a 10GB interface with SNMP MIB object ifSpeed does not work. SNMP MIB object ifHighSpeed should be used instead.

Symptoms:

Polling a 10GB interface with SNMP MIB object  ifSpeed does not give the expected result, as shown in the sample output below.


First, check the SNMP indexes for 10GB Ethernet Interfaces:

user@austria-re0> show interfaces xe*  | match "SNMP ifIndex"           
  Interface index: 165, SNMP ifIndex: 21
  Interface index: 166, SNMP ifIndex: 23

Next, poll the ifSpeed for SNMP interface index (ifIndex) 21. The following output shows the result:

user@austria-re0> show snmp mib get ifSpeed.21 
ifSpeed.21   = 4294967295

Checking other interfaces, with walk option, it can be seen that, for example, GE interfaces the expected result is displayed:

user@austria-re0> show snmp mib walk ifSpeed
 ...
ifSpeed.17    = 1000000000
ifSpeed.18    = 1000000000
ifSpeed.21    = 4294967295
ifSpeed.23    = 4294967295
Cause:

The reason for the result is that the SNMP MIB object ifSpeed is a 32 bit object and the value is presented in bits per second. Therefore, the maximum value that can be used is 2^32-1 or 4294967295, which is approximately 4.3 GB.

Solution:

The reason for the result is that the SNMP MIB object ifSpeed is a 32 bit object and the value is presented in bits per second. Therefore, the maximum value that can be used is 2^32-1 or 4294967295, which is approximately 4.3 GB.

Instead the SNMP MIB object ifHighSpeed should be used, as shown here:

user@austria-re0> show snmp mib get ifHighSpeed.21 
ifHighSpeed.21 = 10000

The value ifHighSpeed is interpreted as megabits per second.

This OID can be walked from a network management station, or from the cli:

1.3.6.1.2.1.31.1.1.1.15

Example:

lab@Wicket> show snmp mib walk 1.3.6.1.2.1.31.1.1.1.15

The command show snmp mib walk ifName is another way to correlate the interface names and the SNMP ifIndex

lab@Wicket> show snmp mib walk ifName | match xe
ifName.512    = xe-0/0/0
ifName.513    = xe-0/0/1
ifName.514    = xe-0/0/2
ifName.515    = xe-0/0/3
ifName.536    = xe-1/2/0
ifName.537    = xe-1/3/0

Note that the numbers following ifName in the output above, are the same as the ifIndexs below:

lab@Wicket> show interfaces xe* | match "SNMP ifIndex"
  Interface index: 136, SNMP ifIndex: 512
  Interface index: 137, SNMP ifIndex: 513
  Interface index: 138, SNMP ifIndex: 514
  Interface index: 139, SNMP ifIndex: 515
  Interface index: 160, SNMP ifIndex: 536
  Interface index: 161, SNMP ifIndex: 537
Related Links: