SNMP OID and MIB for interfaces

Below I list the standard OID and MIB with a description for obtaining SNMP different statistics for the network interfaces of switches, routers, access points, network cards in servers, etc.

You can check OID and MIB from Linux for example with a command (where .1, this is an OID):

snmpwalk -v2c -c community ixnfo.com .1

You can see the description of network interfaces via OID (in parentheses MIB):

.1.3.6.1.2.1.2.2.1.2 (ifDescr)

List of port interface indexes:

.1.3.6.1.2.1.17.1.4.1.2 (ifIndex)

Status of the port, there is a link or not (1-up, 2-down, 3-testing, 4-unknown, 5-dormant, 6-notPresent, 7-lowerLayerDown):

1.3.6.1.2.1.2.2.1.8 (ifOperStatus)

Port status, enabled or disabled by software (1-up, 2-down, 3-testing):

ifAdminStatus

Time of last port change:

1.3.6.1.2.1.2.2.1.9 (ifLastChange)

Port traffic:

1.3.6.1.2.1.2.2.1.10 (ifInOctets)
1.3.6.1.2.1.2.2.1.16 (ifOutOctets)

For 64-bit traffic counters, MIB is used:

ifHCInOctets
ifHCOutOctets

Number of packets containing errors:

1.3.6.1.2.1.2.2.1.20 (ifOutErrors)
1.3.6.1.2.1.2.2.1.20 (ifInErrors)

The number of dropped packets that are essentially error-free, but were discarded for example to free up the buffer space:

ifInDiscards
ifOutDiscards

Physical adress:

1.3.6.1.2.1.2.2.1.6 (ifPhysAddress)

The size of the largest package that can be sent:

ifMtu

Interface Type:

ifType

Unicast packets (if data is taken via SNMP, for example, once every 1 minute, then we divide the result by 60 and get the number of packets per second):

ifInUcastPkts
ifOutUcastPkts

Broadcast packet counter:

1.3.6.1.2.1.31.1.1.1.3 (ifInBroadcastPkts)
1.3.6.1.2.1.31.1.1.1.5 (ifOutBroadcastPkts)

Multicast packet counter:

1.3.6.1.2.1.31.1.1.1.2 (ifInMulticastPkts)
1.3.6.1.2.1.31.1.1.1.4 (ifOutMulticastPkts)

Port speed:

1.3.6.1.2.1.2.2.1.5 (ifSpeed)

List of VLANs:

.1.3.6.1.2.1.17.7.1.4.3.1.1

Uptime of the device:

1.3.6.1.2.1.1.3 (sysUpTime)

Description of the device:

1.3.6.1.2.1.1.1.0

I note, for example, if you need to draw graphs of errors or Broadcast packets in Zabbix, you must necessarily indicate in the data element “Storage of value: Delta (simple change).

See also my articles:
SNMP MIBs and OIDs
Zabbix. Dynamic Indexes

Join the Conversation

3 Comments

Leave a Reply

  1. Hello, do you have an OID to get the total of modems? the olt is Huawei MA5633, so I use DCCAP. I want to get by snmp the total of modems online. Thanks in advance.

  2. Hi, do you if there is any OID that gives the “health” status of the HP switches?

  3. Can any provide us MIB and OID details for MA5680T and MA5600T