When you join a Wi-Fi network, you're assigned an IP address within seconds. This magic is handled by the Dynamic Host Configuration Protocol (DHCP).

The DORA Process

  1. Discover: Your device shouts: "Is there a DHCP server here?"
  2. Offer: The router replies: "Yes, you can use 192.168.1.15."
  3. Request: Your device says: "Great, I'll take that one!"
  4. Acknowledge: The router confirms: "Okay, it's yours for the next 24 hours."

Lease Times

IPs aren't given forever. They are Leased. If a device leaves the network, the router eventually takes the IP back and gives it to someone else. This prevents the network from "running out" of internal addresses.