Friday, February 20, 2009

ALU - SNMP Part 2

Foreward: An ALU is an Autonomous Learning Unit, you can read this post to learn more about them.


  


 

Question:

Your NOC has begun monitoring several SNMP values from R3. However, after a recent reboot of R3 they have complained that they needed to reconfigure the NMS because the SNMP interface identifiers changed. Prevent this from happening during future reboots.

 
 

 
 

Highlight below for the solution:

 
 

Solution:

R3:

snmp-server ifindex persist


 

 
 

Confirmation:

show snmp mib ifmib ifindex

Ethernet0/0: Ifindex = 1

Loopback0: Ifindex = 11

Null0: Ifindex = 10

VoIP-Null0: Ifindex = 9

Serial1/0: Ifindex = 5

Ethernet0/1: Ifindex = 2

Serial1/1: Ifindex = 6

Ethernet0/2: Ifindex = 3

Serial1/2: Ifindex = 7

Ethernet0/3: Ifindex = 4

Serial1/3: Ifindex = 8

 
 

 
 

Explanation:

SNMP uses ifindex identifiers to reference specific interfaces. For example, if you wanted to monitor the octets going in an interface, you would monitor MIB Iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets.X, where X is the ifindex value of the interface. Also of note is MIB paths resolve to OIDs. The OID for the above MIB is 1.3.6.1.2.1.2.2.1.10.X.

 
 

You can use the "show snmp mib ifmib ifindex" command to display the ifindex values of each interface on a router. However, without the global "snmp-server ifindex persist" command, the ifindex values will change every reboot, making your NOC folks upset.

 
 

Also of interest is the command required for this question is located in the "Cisco IOS Interface and Hardware Component Command Reference," not the Network Management section. It is quite common for Cisco to try and trick you by including a question in one section that requires a command from another. For example, it should not be surprising to have a question from an OSPF or EIGRP section that requires the use of the "backup interface" command to achieve the required behavior.

 
 

DocCD items to reference:

Configuration Guide (Scroll down to Enabling IfIndex Persistence on All Interfaces Example)

snmp-server ifindex persist

2 comments:

  1. You are very welcome, thank you for taking the time to post a comment. I really appreciate knowing that my work has helped other folks!

    -Eric

    ReplyDelete