NAT table192.168.1.23:51000 ⇄ 203.0.113.45:40001join HomeNetyou: 192.168.1.23from 192.168.1.23from 192.168.1.23from 203.0.113.45from 203.0.113.45from 203.0.113.45to 203.0.113.45to 192.168.1.23to 192.168.1.23from 192.168.1.10
Coloured boxes: the ones the current step is about; the rest wait in whiteEnvelope: one message, its label shows the address it carriesCables and the thick provider line; the phone uses radio insteadNAT table: the router's note of which inside device each reply belongs toA home network. The phone joins the Wi-Fi by radio through the access point, and the router's DHCP lends it 192.168.1.23. Its request goes phone → access point → router; the router swaps the private address for the home's public 203.0.113.45 (NAT) and notes it in a table, then the modem puts it on the provider's line to the ISP. The reply comes back to 203.0.113.45, the router looks it up and hands it back to the phone. Cabled devices meet at the switch. In most homes the access point, switch and router are one box. 203.0.113.45 and 198.51.100.80 are RFC 5737 documentation addresses; 192.168.1.0/24 is an RFC 1918 private range; MACs are from the RFC 7042 documentation block.

Joining the network

  1. A phone, a laptop and a TV are hosts: devices that send and receive data. A few boxes connect them to each other and to the internet. Let's follow the phone as it opens a web page.

Out to the internet

Back home

The other boxes

What is going on, line by line

;; step 1/11 · hosts · local
;; at the phone
home network (LAN)  192.168.1.0/24   (RFC 1918 private range)
phone   192.168.1.23   MAC 00:00:5e:00:53:23   Wi-Fi
laptop  192.168.1.10   MAC 00:00:5e:00:53:10   cable
TV      192.168.1.11   MAC 00:00:5e:00:53:11   cable
router  192.168.1.1    MAC 00:00:5e:00:53:01   (LAN side)
(addresses are explained in later lessons)

Before the request the phone asked the router for www.example.com's address (DNS); the router passed the question to the ISP's resolver. The DNS lesson follows that trip. With IPv6 each device usually gets its own public address, so home routers do not need NAT for it; this lesson uses IPv4.