Making Interface Table Numbers Permanent
Problem
You want to ensure that your router uses the same SNMP interface numbers every time it reboots.
Solution
To ensure that SNMP interface numbers remain permanent after a router power cycle, use the following command. This is a global command that affects all interfaces:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#snmp-server ifindex persist
Router(config)#end
Router#
You can also fix the SNMP interface number of a single interface as follows:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface
Router(config-if)#
Serial0/0
snmp ifindex persist
Router(config-if)#exit
Router(config)#end
Router#
This command is available in IOS Versions 12.1(5)T and above.
Discussion
Most engineers do not understand that the internal SNMP interface numbers assigned by the router are not stable. That is, the SNMP interface numbers are prone to change after router reboot, especially if you add or remove logical interfaces (i.e., subinterfaces) or physical modules.
This issue has plagued many administrators and software vendors for years. The problem is that most network performance software packages poll for interface data by using the unique interface number assigned by the router. However, if these numbers change after a router reboots, then the performance data becomes meaningless, since there is no guarantee that you are still polling the same interface. ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.