What are “MIB counters” in Ethernet?

In some Ethernet switch or router datasheets you see sentences like

Gathers 34 MIB counters per port

MIB means Management Information Base, that is information that can be used to manage a networking system.

A typical set of MIB counters is:

  • Number of packets received (for each port)
  • Number of packets sent (for each port)
  • Number of bytes transmitted (for each port)
  • Number of bytes received (for each port)
  • Number of packets with faulty CRC received (for each port)
  • Number of unicast packets received (for each port)
  • Number of broadcast packets received (for each port)
  • Number of small packets (<64 bytes) (for each port)
  • Number of small-ish packets (64-127 bytes) (for each port)
  • Number of small-to-medium packets (128-255 bytes) (for each port)
  • Number of medium packets (256-511 bytes) (for each port)
  • Number of medium-to-large packets (512-1023 bytes) (for each port)
  • Number of large packets (1024-1522 bytes) (for each port)
  • Number of CSMA/CD collisions during transmission (for each port)
  • Number of times a single packet had multiple CSMA/CD collisions (for each port)
  • Number of deferred packets (packet had a collision but will be tried again (for each port)
  • Number of packets dropped because buffer is full (for each port where the packet is received)

These can be used to compute other parameters such as the current throughput. For example, to calculate the transmit throughput, use

  • Query number of bytes transmitted, store in variable A
  • Wait 1 second
  • Query number of bytes transmitted again, store in variable B
  • Number of bytes transmitted in that second is (B-A)
  • Throughput is (B-A)/1s