SNMP counter

This document explains the meaning of SNMP counters.

General IPv4 counters

All layer 4 packets and ICMP packets will change these counters, but these counters won’t be changed by layer 2 packets (such as STP) or ARP packets.

  • IpInReceives

Defined in RFC1213 ipInReceives

The number of packets received by the IP layer. It gets increasing at the beginning of ip_rcv function, always be updated together with IpExtInOctets. It will be increased even if the packet is dropped later (e.g. due to the IP header is invalid or the checksum is wrong and so on). It indicates the number of aggregated segments after GRO/LRO.

  • IpInDelivers

Defined in RFC1213 ipInDelivers

The number of packets delivers to the upper layer protocols. E.g. TCP, UDP, ICMP and so on. If no one listens on a raw socket, only kernel supported protocols will be delivered, if someone listens on the raw socket, all valid IP packets will be delivered.

  • IpOutRequests

Defined in RFC1213 ipOutRequests

The number of packets sent via IP layer, for both single cast and multicast packets, and would always be updated together with IpExtOutOctets.

  • IpExtInOctets and IpExtOutOctets

They are Linux kernel extensions, no RFC definitions. Please note, RFC1213 indeed defines ifInOctets and ifOutOctets, but they are different things. The ifInOctets and ifOutOctets include the MAC layer header size but IpExtInOctets and IpExtOutOctets don’t, they only include the IP layer header and the IP layer data.

  • IpExtInNoECTPkts, IpExtInECT1Pkts, IpExtInECT0Pkts, IpExtInCEPkts

They indicate the number of four kinds of ECN IP packets, please refer Explicit Congestion Notification for more details.

These 4 counters calculate how many packets received per ECN status. They count the real frame number regardless the LRO/GRO. So for the same packet, you might find that IpInReceives count 1, but IpExtInNoECTPkts counts 2 or more.

  • IpInHdrErrors

Defined in RFC1213 ipInHdrErrors. It indicates the packet is dropped due to the IP header error. It might happen in both IP input and IP forward paths.

  • IpInAddrErrors

Defined in RFC1213 ipInAddrErrors. It will be increased in two scenarios: (1) The IP address is invalid. (2) The destination IP address is not a local address and IP forwarding is not enabled

  • IpExtInNoRoutes

This counter means the packet is dropped when the IP stack receives a packet and can’t find a route for it from the route table. It might happen when IP forwarding is enabled and the destination IP address is not a local address and there is no route for the destination IP address.

  • IpInUnknownProtos

Defined in RFC1213 ipInUnknownProtos. It will be increased if the layer 4 protocol is unsupported by kernel. If an application is using raw socket, kernel will always deliver the packet to the raw socket and this counter won’t be increased.

  • IpExtInTruncatedPkts

For IPv4 packet, it means the actual data size is smaller than the “Total Length” field in the IPv4 header.

  • IpInDiscards

Defined in RFC1213 ipInDiscards. It indicates the packet is dropped in the IP receiving path and due to kernel internal reasons (e.g. no enough memory).

  • IpOutDiscards

Defined in RFC1213 ipOutDiscards. It indicates the packet is dropped in the IP sending path and due to kernel internal reasons.

  • IpOutNoRoutes

Defined in RFC1213 ipOutNoRoutes. It indicates the packet is dropped in the IP sending path and no route is found for it.