Learn › Part 1 ยท Networking foundations
ARP, BOOTP, DHCP and ICMP
Address resolution, host configuration with relay agents, and ICMP error and query messages with their exceptions.
ARP
ARP resolves a known IPv4 address to the MAC address needed on the local link.
| Message | Delivery | Destination MAC |
|---|---|---|
| Request (“who has IB?”) | Broadcast | FF:FF:FF:FF:FF:FF |
| Reply (“IB is at MB”) | Unicast | Requester's MAC |
For an off-subnet destination the host ARPs for its default gateway, not the remote host. (Some slides show the request as multicast and the reply as broadcast; that is wrong.)
BOOTP and DHCP
Both run over UDP, client port 68 to server port 67. A booting client sends from 0.0.0.0 to 255.255.255.255 with a broadcast MAC.
| BOOTP | DHCP | |
|---|---|---|
| Allocation | Static MAC-to-IP table | Static bindings plus a dynamic pool with leases |
| Lease | None | Time-limited; renew or the address returns to the pool |
| Across routers | A relay agent turns the local broadcast into a unicast to the server and relays the reply back | |
DHCP exchange (DORA): DISCOVER, OFFER, REQUEST, ACK. Give static bindings to infrastructure (DNS servers, gateways, printers) and leases to clients.
ICMP
ICMP is IP's companion for errors and queries; errors always go to the original source of the datagram.
- Destination Unreachable: network, host, protocol or port cannot be reached (also “fragmentation needed”).
- Time Exceeded: TTL reached 0 at a router; prevents routing loops; traceroute relies on it.
- Parameter Problem: invalid header field.
- Source Quench: historic “slow down” message to the source host; deprecated since 2012.
- Echo Request / Reply: used by ping.
When no ICMP error is sent
No error is generated for an ICMP error message, for a non-first fragment, for datagrams to multicast or broadcast (or special) addresses, and routers rate-limit ICMP. “Every discarding router must send ICMP” is therefore an over-simplification.
Worked example: TTL
S sends TTL = 3 through R1, R2, R3, R4. R1: 3→2, R2: 2→1, R3: 1→0, so R3 discards the packet and sends Time Exceeded with source R3 and destination S. Traceroute repeats this with TTL = 1, 2, 3, … to reveal each hop.
Common pitfalls
- ICMP errors go to the source host, not to the previous router.
- Routers do not forward 255.255.255.255; DHCP across subnets needs relays.
- Blocking all ICMP breaks path-MTU discovery; filter by type instead.