SNMP ifIndex on Crossbeam devices

book

Article ID: 168036

calendar_today

Updated On:

Products

XOS

Issue/Introduction

Understanding SNMP ifIndex mapping on Crossbeam devicesMany customers use SNMP to manage Crossbeam devices. When an "interface link up/down" message is received in the NMS (Netview, Openview, Spectrum) it's not possible to know which interface it belongs to.

Cause

Standard SNMP behavior sends ifIndex values instead of interface numbers. This association is not static and will change from system to system depending on the configuration and the number of modules.

Resolution

This article explains SNMP ifindex and physical interface mapping on the Crossbeam X-Series.

There are two ways to determine which interface ifIndex is refering to.

1. Run "snmpwalk" or "snmpgetbulk" from the NMS against IF-MIB.txt on the CPM to get the interface table from the Crossbeam chassis

Example:

Spectrum event
##############

Oct 11, 2009 3:00:20 AM
GnSNMPDev device, named cbsx80, has detected a Communication Link Up. ifIndex = 15, ifAdminStatus = , ifOperStatus = , ifDescr = , ifType = .

SNMP get
########

# snmpwalk -c public CPM_IP .1.3.6.1.2.1.2.2 | grep ifDescr (interface table)
or
# snmpgetbulk -c public CPM_IP .1.3.6.1.2.1.2.2.1.2 (ifDescr row)

"ifDescr.9"; oid=".1.3.6.1.2.1.2.2.1.2.9"; gigabitethernet1/6
"ifDescr.10"; oid=".1.3.6.1.2.1.2.2.1.2.10"; gigabitethernet1/5
"ifDescr.11"; oid=".1.3.6.1.2.1.2.2.1.2.11"; gigabitethernet1/8
"ifDescr.12"; oid=".1.3.6.1.2.1.2.2.1.2.12"; gigabitethernet2/7
"ifDescr.13"; oid=".1.3.6.1.2.1.2.2.1.2.13"; gigabitethernet1/1
"ifDescr.14"; oid=".1.3.6.1.2.1.2.2.1.2.14"; gigabitethernet2/2
"ifDescr.15"; oid=".1.3.6.1.2.1.2.2.1.2.15"; gigabitethernet1/7
"ifDescr.16"; oid=".1.3.6.1.2.1.2.2.1.2.16"; gigabitethernet1/2
"ifDescr.17"; oid=".1.3.6.1.2.1.2.2.1.2.17"; gigabitethernet1/3

The first column is interpreted as ifDescr.ifIndex. Therefore, the event logged at ifIndex=15 comes from gigabitethernet 1/7.

2. From the CPM CLI run the command "show traplog". Look up the date and time when the NMS received the trap. Make sure CPM and NMS have the same clock synchronization; if not, make the appropiate corrections. Then, from the CPM Linux prompt, "grep" /var/log/messages for the event.

Example:

Spectrum event
##############

Oct 1, 2009 12:06:32 AM
GnSNMPDev device, named cbsx80, has detected a Communication Link Up. ifIndex = 15, ifAdminStatus = , ifOperStatus = , ifDescr = , ifType = .

show traplog
############

A small date format change is necessary: Spectrum is "Oct 1, 2009 3:05:38" and traplog is "2009-10-01 12:06:32".

Trap Description : linkUp
Trap OID : .1.3.6.1.6.3.1.1.5.4
sysUpTime : 00:02:47
Time & Date : 2009-10-01 12:06:32.16
Num of variables : 1
Variable 1 : ifIndex = 15
Variable 2 :
Other Variables :

# grep "Oct 1 12:06:32" /var/log/messages | grep -i up
Oct 1 12:06:32 X45-1cp2 cbsalarmmond[1994]: [I] NP1 WAN Link 7: Up

As we can see, the ifIndex in this system is mapped to interface gigabitethernet 1/7.

NOTE: In both cases, consulting the interface status using IF-MIB will only show values for interfaces configured in the database:
CBS# configure interface gigabitethernet n/n

Workaround

N/A