Detecting changes in dynamically-assigned indexes
- Last UpdatedFeb 13, 2023
- 2 minute read
- PI System
- PI Interface for SNMP 1.7.0.37
- Interfaces
When a router is restarted, it often assigns a different index number to a particular instance of one of its network interfaces. Because PI points for the interface are mapped to instances using the index number, this renumbering causes the point to stop collecting data.
To detect when an instance has been renumbered, you can specify a key identifier. Before loading the point, the interface sends an SNMP request to the network device and asks for the value of the specified identifier. If the value returned does not match the one specified by the KEY value in the point configuration, then PI SNMP writes Bad Input to the point.
You can configure the KEY value only for input points, and only to match values from interfaces.ifTable.ifEntry.ifDescr.X with OIDs from the interfaces group.
For example, an interface named Serial1/0.1 has an ifIndex value of 25. The OID variable interfaces.ifTable.ifEntry.ifInOctets.25 represents the number of inbound octets received on this Serial1/0.1 interface. The PI point named tag1 is configured to read this variable by specifying the following setting in its ExDesc attribute: OID_I=ifInOctets.25
After a router reboot, the Serial1/0.1 interface is assigned an ifIndex of 31. Therefore, the number of inbound octets received on the interface is now addressed by the OID interfaces.ifTable.ifEntry.ifInOctets.31. However, the point still addresses the ifIndex of 25 and, as a result, is no longer collecting data for Serial1/0.1.
Note that, if you use the PI SNMP Tag Builder plug-in for PI SMT 3.x to build points, the KEY value is automatically entered into the exdesc point attribute.
Note: Some Cisco routers support the ifindex persist option for the config command, which prevents indexes from being renumbered when the router is restarted. If you are running this configuration, the KEY=identifier is not necessary. After issuing ifIndex persistence commands, you must save the configuration by issuing the copy running-config startup-config EXEC mode command to ensure consistent ifIndex values. See the Cisco IOS documentation for more information.