1. Echo request
ping sends ICMP echo requests; -c 4 stops after four replies.
ping -c 4 8.8.8.8Typorithm · medium
Step 1 of 8 · intro card
L3 — Network Layer
ICMP is L3's control and error protocol: echo request/reply powers ping, time-exceeded drives traceroute, and destination-unreachable reports failures. ARP resolves an IP to a MAC on the local link — the L2/L3 bridge — and caches it in the neighbor table. The DF bit plus size probes do path-MTU discovery.
ICMP rides on top of IP to carry control and error messages. Echo request and echo reply are what ping uses to check reachability and round-trip time. Time-exceeded messages (sent when TTL hits 0) are how traceroute discovers each hop, and destination-unreachable reports that a host, network, or port could not be reached.
ARP solves a different problem: to deliver an IP packet on the local link, a host needs the target's MAC address. ARP broadcasts "who has this IP?" and caches the answer in the neighbor table (arp -a or ip neigh show), bridging L3 addressing to L2 delivery.
Path-MTU discovery sends packets with the Don't Fragment (DF) bit set at increasing sizes; a router that cannot forward without fragmenting returns an ICMP "fragmentation needed" message, revealing the largest packet the path accepts.
ICMP carries echo (ping), time-exceeded (traceroute), and unreachable.
ARP maps an IP to a MAC on the local link, cached in the neighbor table.
DF bit + size probes find the path MTU.
ping -c 4 8.8.8.8
arp -a
ip neigh show
traceroute -I 1.1.1.1
ping -s 1472 -M do 8.8.8.8Connect each part of the code to the concept before you type.
ping sends ICMP echo requests; -c 4 stops after four replies.
ping -c 4 8.8.8.8arp -a prints the cached IP-to-MAC mappings learned on the local link.
arp -aip neigh show is the modern view of the same neighbor (ARP) cache.
ip neigh show-I makes traceroute use ICMP echo probes instead of UDP datagrams.
traceroute -I 1.1.1.1-s sets payload size and -M do sets the Don't Fragment bit to test the path MTU.
ping -s 1472 -M do 8.8.8.8Read the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.