1/30
Looks like no tags are added yet.
ICMP
Internet Control Message Protocol; TCP/IP messaging used to send feedback about issues with the processing of IP packets under certain conditions. Messages are not required and are often blocked for security reasons.
ICMPv4 vs ICMPv6
ICMPv4 is the messaging protocol for IPv4. ICMPv6 provides the same services for IPv6 but includes additional functionality.
ICMP messages common to ICMPv4 and ICMPv6
Host confirmation, destination or service unreachable, time exceeded, and route redirection.
ICMP host confirmation
An ICMP Echo Request is sent to a host; if available, it responds with an Echo Reply. This is the basis of the ping utility.
ICMP Destination Unreachable
Sent by a host or gateway that cannot deliver a packet, to notify the source. Includes a code explaining why.
ICMPv4 Destination Unreachable codes
0 = Net unreachable, 1 = Host unreachable, 2 = Protocol unreachable, 3 = Port unreachable. (ICMPv6 codes differ slightly.)
ICMP Time Exceeded
Sent by a router when a packet's TTL is decremented to 0; the router discards the packet and notifies the source host.
IPv6 equivalent of TTL
The Hop Limit field; ICMPv6 also sends Time Exceeded when a packet expires.
Neighbor Discovery Protocol (NDP/ND)
New ICMPv6 functionality with four messages: Router Solicitation (RS), Router Advertisement (RA), Neighbor Solicitation (NS), Neighbor Advertisement (NA).
Messages between an IPv6 router and device
Router Solicitation (RS) and Router Advertisement (RA).
Messages between IPv6 devices
Neighbor Solicitation (NS) and Neighbor Advertisement (NA).
Router Advertisement (RA) message
Sent by routers to give addressing information to hosts using SLAAC; sent periodically or in response to an RS. A SLAAC host sets its default gateway to the link-local address of the router that sent the RA.
Router Solicitation (RS) message
Sent by a host configured for SLAAC to a router to request an RA message.
SLAAC
Stateless Address Auto Configuration; hosts obtain IPv6 addressing information automatically using RA messages.
Neighbor Solicitation (NS) and Neighbor Advertisement (NA)
NS is used when a device knows an IPv6 address but not its MAC address (equivalent to an ARP Request in IPv4). NA is the response, matching the target IPv6 address and including the MAC address (equivalent to an ARP Reply).
Duplicate Address Detection (DAD)
Performed when a device is assigned a global unicast or link-local unicast address. It sends an NS with its own IPv6 address; if an NA comes back, the address is in use; if none returns in time, the address is unique and usable.
Ping
IPv4 and IPv6 testing utility that uses ICMP echo request and echo reply messages to test connectivity between hosts. Reports round-trip time as a measure of performance and times out if no reply is received.
Ping summary output
After all requests are sent, ping gives the success rate and average round-trip time to the destination.
Three ping connectivity tests
Pinging the local loopback, pinging the default gateway, and pinging a remote host.
Ping the loopback
Ping 127.0.0.1 (IPv4) or ::1 (IPv6) to test the internal IP configuration on the local host (down through the network layer). A response means IP is properly installed; an error means TCP/IP is not operational. The device pings itself.
Ping the default gateway
Tests the host's ability to communicate on the local network; success means the host and the router interface are both operational locally. If the gateway doesn't respond but another local host does, suspect a wrong gateway address, or a router interface with security applied.
Ping a remote host
Tests communication across an internetwork; success confirms local network communication, the default gateway, and all other routers in the path to the remote network.
Traceroute (tracert)
Utility that lists the hops successfully reached along a path; if data fails at a hop, the last router that responded indicates where the problem or security restriction is. Ping alone doesn't show devices between the hosts.
Round-trip time (RTT)
Time for a packet to reach the remote host and for the response to return; traceroute shows RTT for each hop. An asterisk (*) means a lost or unreplied packet; high times or loss at a hop suggest overused router resources or connections.
How traceroute works
Sends messages with TTL (IPv4) or Hop Limit (IPv6) of 1, then increments (2, 3, 4...). Each router that times out the packet replies with ICMP Time Exceeded, revealing its address. At the destination, the host replies with ICMP Port Unreachable or Echo Reply instead.
ICMP packet format
ICMP is encapsulated directly in IP packets as the data payload and has a special header with message codes to distinguish types.
ICMP message type code 0
Echo reply (response to ping)
ICMP message type code 3
Destination Unreachable
ICMP message type code 5
Redirect (use another route)
ICMP message type code 8
Echo request (ping)
ICMP message type code 11
Time Exceeded (TTL became 0)