Consider a situation where a monitoring software is polling the interface statistics of the serial interface going to the Internet. For example, you could have these conditions prior to re-initialization:
An ifindex value of Ethernet port 1
An ifindex value of Token Ring port 2
An ifindex value of Serial port 3
Therefore, the management application is polling the ifindex 3, which corresponds to the serial port.
After the router re-initialization (reboot, reload and so on) the conditions change. The ifindex value of Ethernet port becomes 3, and ifindex value of Token Ring port to be 1and that of Serial port to be 2. The management application continues polling the ifIndex 3, which now corresponds to the Ethernet port. Therefore, if the management application is not warned by a trap that the router has been rebooted, the statistics polled could be completely wrong.
Cisco IOS Software adds support for an ifindex value that can persist across reboots. The interface index persistence feature allows for greater accuracy when it collects and processes network management data by uniquely identifying input and output interfaces for traffic flows and Simple Network Management Protocol (SNMP) statistics. As it relates each interface to a known entity (such as an ISP customer), the interface index persistence feature allows network management data to be more effectively utilized. Ifindex persistence means that the mapping between the ifDescr (or ifName) object values and the ifindex object values generated from the IF-MIB is retained across reboots.
To globally enable ifindex values that are maintained across reboots, issue the snmp-server ifindex persist command in global configuration mode. The same command can be issued to enable ifIndex persistence only on a specific interface in the interface configuration mode.
The interface-specific ifindex persistence command no snmp ifindex persistcan not be used on subinterfaces. A command applied to an interface is automatically applied to all the subinterfaces associated with that interface.