Question

I am analyzing the the output of netstat -s and wanted to know what "input ICMP message failed" is meant for. Below is output of netstat -s,

Icmp: 
      643 ICMP messages received 
      0 input ICMP message failed. 
      ICMP input histogram:
        destination unreachable: 450 
        echo requests: 9 
        echo replies: 2 
      102 ICMP messages sent 
      0 ICMP messages failed 
      ICMP output histogram: 
        destination unreachable: 84 
        echo request: 9 
        echo replies: 9

 Icmp:
    648 ICMP messages received
    0 input ICMP message failed.
    ICMP input histogram:
      destination unreachable: 450
      echo requests: 14
      echo replies: 2
    107 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
      destination unreachable: 84
      echo request: 9
      echo replies: 14

How is the value 0 is assigned to "input ICMP message failed" and in which condition value other than zero is assigned to this field?

Was it helpful?

Solution

It's defined in RFC 4293 - Management Information Base (MIB) for the Internet Protocol (IP): (page 82)

icmpStatsInErrors: The number of ICMP messages that the entity (host) received but determined as having ICMP-specific errors (bad ICMP checksums, bad length, etc.).


How I found that out?

netstat will get it's information from the kernel, from /proc/net/snmp. It just formats it. You can see that in the source code of netstat.

So I had a look into the related kernel code which writes the /proc file. It's: net/ipv4/proc.c (line: 338) You can see that the constant ICMP_MIB_INERRORS is used what tells me, that the kernel is implementing the ICMP MIB for SNMP purposes.

I've googled for that MIB and found RFC 4293. On page 82 you'll find the definition for icmpStatsInErrors what is the value in question.

Open source rules! ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top