ifIndex
Module: IF-MIB
OID (symbolic): IF-MIB::ifIndex
OID (numeric): 1.3.6.1.2.1.2.2.1.1
Node type: OBJECT-TYPE
Type: InterfaceIndex
Access: read-only
Description:
A unique value, greater than zero, for each interface. It is recommended that values are assigned contiguously starting from 1. The value for each interface sub-layer must remain constant at least from one re-initialization of the entity's network management system to the next re- initialization.
Examples
Walk all instances (SNMPv2c):
snmpwalk -v2c -c public <target> 1.3.6.1.2.1.2.2.1.1 snmpwalk -v2c -c public <target> IF-MIB::ifIndex
Get a specific instance (index 1):
snmpget -v2c -c public <target> 1.3.6.1.2.1.2.2.1.1.1 snmpget -v2c -c public <target> IF-MIB::ifIndex.1
OID Breakdown
| Numeric OID | Name | Module |
|---|---|---|
| 1 | iso | LANART-AGENT |
| 1.3 | org | BIANCA-BRICK-PPP-MIB |
| 1.3.6 | dod | BIANCA-BRICK-PPP-MIB |
| 1.3.6.1 | internet | BIANCA-BRICK-PPP-MIB |
| 1.3.6.1.2 | mgmt | BKTEL-HFC862-BASE-MIB |
| 1.3.6.1.2.1 | mib_2 | CHECKPOINT-MIB-2 |
| 1.3.6.1.2.1.2 | interfaces | CHECKPOINT-MIB-2 |
| 1.3.6.1.2.1.2.2 | ifTable | CHECKPOINT-MIB-2 |
| 1.3.6.1.2.1.2.2.1 | ifEntry | CHECKPOINT-MIB-2 |
| 1.3.6.1.2.1.2.2.1.1 | ifIndex | IF-MIB |
FAQ
Why does every interface-related MIB table use ifIndex as a key?
ifIndex is the unique identifier IF-MIB assigns to each interface, and it's meant to stay constant across reboots so that other MIBs — interface counters, VLAN membership, bridge port mapping, and vendor-specific tables — can all reference the same interface without duplicating its description. It's effectively the join key across the whole interface data model.
The ifIndex for a port changed after a firmware upgrade — is that expected?
It shouldn't happen under normal operation; IF-MIB explicitly recommends ifIndex values stay constant for an interface across reinitializations of the device's management system. If you see it change after an upgrade, treat it as a device-specific quirk worth flagging to the vendor, since any saved dashboards or thresholds keyed on the old ifIndex will silently start pointing at the wrong interface.