Suppose a device is connecting to the UWaterloo campus network and requests www.google.com.

Device must first connect to the internet.

- Connecting laptop needs its own IP address + adress of first-hop router + address of DNS server
- Information is obtained via DHCP
- DHCP request is encapsulated in UDP → encapsulated in IP → encapsulated in 802.3 Ethernet
- Ethernet frame is broadcasted (i.e.
dest: FFFFFFFFFFF
) on LAN and received at the router running the DHCP server
- Frame is demuxed back to DHCP
- DHCP server formulates DHCP ACK containing:
- client IP address
- IP address of first-hop router for client
- name, IP address of DNS server
- DHCP server encapsulates data in frame and is forwarded (switch learning) through LAN
- Response is demux’d at client
- Client now has IP address, name + address of DNS server, IP address of its first-hop router
Next, we need ARP to get MAC address of first-hop router for DNS.

- DNS query is created, encapsulated in UDP → encapsulated in IP → encapsulated in Ethernet
- As the MAC address of first-hop router is not known, ARP query is broadcast
- Broadcast is received by router ⇒ ARP reply gives MAC address of router interface
- Client now has MAC address of first-hop router ⇒ can send frame with DNS