Joining a network
The laptop has just connected to Wi-Fi. Before it can talk to anything, it needs an address. Watch it ask for one, get one, and use it.
-
Anyone out there?
With no address yet, the laptop broadcasts a DHCP Discover from 0.0.0.0 to every device on the network.
Think about it: Why does it send from 0.0.0.0?
It doesn't have an address yet. Getting one is the whole point of this exchange.
-
An offer
The router, acting as the DHCP server, offers 192.168.1.24, plus the router and DNS server to use.
-
Yes, please
The laptop formally requests the offered address and names the server it chose.
Think about it: Why ask again instead of just using the offer?
Several servers could have made offers. The Request tells all of them which offer was accepted.
-
It's yours
The server confirms with an ACK: the address belongs to the laptop for 24 hours, called the lease.
-
Finding the router
To reach the internet, the laptop needs the router's hardware address, so it asks with ARP.
-
First lookup
The laptop looks up a name using the DNS server it learned from DHCP.
-
First connection
A TCP connection opens to the address DNS returned. The laptop is fully online.