Support Center > Search Results > SecureKnowledge Details
The order of interfaces in the output of 'snmpwalk' changes after each reboot Technical Level
Symptoms
  • The order of interfaces in the output of 'snmpwalk' for IF-MIB changes after each reboot.

  • Issue occurs only on machine with NICs that use different drivers (e.g., 'e1000' and 'ixgbe').

  • Example:

    [Expert@FW]# snmpwalk -v 2c -c public localhost IF-MIB::ifDescr
    IF-MIB::ifDescr.1 = STRING: lo
    IF-MIB::ifDescr.2 = STRING: Exp1-1
    IF-MIB::ifDescr.3 = STRING: Exp1-2
    IF-MIB::ifDescr.4 = STRING: Exp2-1
    IF-MIB::ifDescr.5 = STRING: Exp2-2
    IF-MIB::ifDescr.6 = STRING: Mgmt
    IF-MIB::ifDescr.7 = STRING: Sync
    IF-MIB::ifDescr.8 = STRING: Lan5
    IF-MIB::ifDescr.9 = STRING: Lan6
    IF-MIB::ifDescr.10 = STRING: Lan7
    IF-MIB::ifDescr.11 = STRING: Lan8
    IF-MIB::ifDescr.12 = STRING: Lan1
    IF-MIB::ifDescr.13 = STRING: Lan2
    IF-MIB::ifDescr.14 = STRING: Lan3
    IF-MIB::ifDescr.15 = STRING: Lan4
    IF-MIB::ifDescr.16 = STRING: bond0
    IF-MIB::ifDescr.17 = STRING: bond1

    [Expert@FW]# reboot

    [Expert@FW]# snmpwalk -v 2c -c public localhost IF-MIB::ifDescr
    IF-MIB::ifDescr.1 = STRING: lo
    IF-MIB::ifDescr.2 = STRING: Exp1-1
    IF-MIB::ifDescr.3 = STRING: Exp1-2
    IF-MIB::ifDescr.4 = STRING: Mgmt
    IF-MIB::ifDescr.5 = STRING: Sync
    IF-MIB::ifDescr.6 = STRING: Exp2-1
    IF-MIB::ifDescr.7 = STRING: Exp2-2
    IF-MIB::ifDescr.8 = STRING: Lan5
    IF-MIB::ifDescr.9 = STRING: Lan6
    IF-MIB::ifDescr.10 = STRING: Lan7
    IF-MIB::ifDescr.11 = STRING: Lan8
    IF-MIB::ifDescr.12 = STRING: Lan1
    IF-MIB::ifDescr.13 = STRING: Lan2
    IF-MIB::ifDescr.14 = STRING: Lan3
    IF-MIB::ifDescr.15 = STRING: Lan4
    IF-MIB::ifDescr.16 = STRING: bond0
    IF-MIB::ifDescr.17 = STRING: bond1
    [Expert@FW]#
Cause

SNMP relies on "ifIndex", which is determined by the Linux kernel.

When several types of NICs are installed, which use different NIC drivers, Linux kernel 2.6 loads the NIC drivers in random order (can be seen in '/var/log/dmesg' file, in output of 'ip link', in output of 'ip addr').

This adversely affects SNMP monitoring by "IfIndex", since "IfIndex" will be different each time.

According to RFC 2863 - Section 3.1.5 the interface numbering may change at a reinitialization of the snmp agent (for example during a reboot) and the management station has to accommodate the interface table whenever the value of "sysUpTime" is reset to zero. 


Solution
Note: To view this solution you need to Sign In .