ifName
Module: ITF-MIB
OID (symbolic): ITF-MIB::ifName
OID (numeric): 1.3.6.1.2.1.31.1.1.1.1
Node type: OBJECT-TYPE
Type: DisplayString
Access: read-only
Description:
The textual name of the interface. The value of this object should be the name of the interface as assigned by the local device and should be suitable for use in commands entered at the device's `console'. This might be a text name, such as `le0' or a simple port number, such as `1', depending on the interface naming syntax of the device. If several entries in the ifTable together represent a single interface as named by the device, then each will have the same value of ifName. If there is no local name, or this object is otherwise not applicable, then this object contains a 0-length string.
ALCATEL NOTE: SUPPORT: YES INSRVMOD: NA RANGE: See above PERSIST: NO DEFVALUE: NA UNITS: -
Examples
Walk all instances (SNMPv2c):
snmpwalk -v2c -c public <target> 1.3.6.1.2.1.31.1.1.1.1 snmpwalk -v2c -c public <target> ITF-MIB::ifName
Get a specific instance (index 1):
snmpget -v2c -c public <target> 1.3.6.1.2.1.31.1.1.1.1.1 snmpget -v2c -c public <target> ITF-MIB::ifName.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.31 | ifMIB | IF-MIB |
| 1.3.6.1.2.1.31.1 | ifMIBObjects | IF-MIB |
| 1.3.6.1.2.1.31.1.1 | ifXTable | IF-MIB |
| 1.3.6.1.2.1.31.1.1.1 | ifXEntry | IF-MIB |
| 1.3.6.1.2.1.31.1.1.1.1 | ifName | ITF-MIB |
FAQ
How is ifName different from ifDescr?
ifDescr is a general descriptive string, often including vendor and chipset info, meant for humans reading documentation, while ifName is the short name the device itself uses locally — the same string you'd type at the device's own console or CLI to refer to that interface, like Gi1/0/1 or eth0.
An alert only gives me an ifIndex — how do I find the physical port it refers to?
Query ifName for that ifIndex to get the interface's local console name, which you can then match against the switch's physical port labeling or your patch panel documentation — this is usually faster than interpreting ifDescr, since ifName mirrors exactly how you'd reference the port when logged into the device directly.