Quick Summary
- Your device associates with the WiFi access point, then DHCP assigns it an IP address, subnet mask, gateway, and DNS server
- When you visit a website, DNS translates the domain name to an IP, your router NATs the request, and your ISP carries it to the internet
- Every device on your home network shares one public IP address -- your router keeps track of which replies go to which device
The Journey Begins: Connecting to WiFi
When you open your phone's WiFi settings and tap on your network name, a surprisingly complex series of events kicks off. First, your device sends a probe request -- essentially shouting "are you there?" on every WiFi channel. Your router (technically the access point) responds with a probe response containing its network name (SSID), security type, and supported speeds.
Next comes the authentication and association handshake. If your network uses WPA2 or WPA3, a four-way handshake occurs where your device and the router prove they both know the password without ever sending the password itself. This handshake generates unique encryption keys for your session, so even if someone else knows the WiFi password, they cannot decrypt your specific traffic. Once associated, you have a Layer 2 (data link) connection -- but no IP address yet.
Interactive: Step Through Your Connection
Click each step to see what happens at every stage of connecting to the internet from your home.
DHCP: Getting an IP Address
Once your WiFi link is established, your device needs an IP address to communicate on the network. This is where DHCP (Dynamic Host Configuration Protocol) comes in. Your device sends a DHCP Discover broadcast message (since it has no IP yet, it uses 0.0.0.0 as its source). The router's built-in DHCP server responds with a DHCP Offer containing an available IP address, the subnet mask, the default gateway (the router's own IP), and DNS server addresses.
Your device accepts with a DHCP Request, and the router confirms with a DHCP Acknowledgment. This four-step process (DORA: Discover, Offer, Request, Acknowledge) typically completes in under 100 milliseconds. Your device now has everything it needs: an IP address (like 192.168.1.42), a subnet mask (255.255.255.0), a gateway (192.168.1.1), and DNS servers (usually either the router itself or public DNS like 8.8.8.8).
The DHCP lease is temporary -- your router assigns the address for a fixed period (commonly 24 hours). Before the lease expires, your device automatically renews it. If you disconnect and reconnect, DHCP tries to give you the same address you had before, which is why your phone usually gets the same IP on your home network.
DNS: Translating Names to Numbers
Now you have an IP address and a working network connection. You open your browser and type example.com.
Your device does not know the IP address of example.com, so it sends a DNS query to the DNS server address it
received from DHCP. This query travels from your phone to your router to your ISP to the DNS resolver (like
Google's 8.8.8.8), which queries the DNS hierarchy and returns the answer: 93.184.216.34.
Your device caches this answer so it does not need to ask again for the same domain. Your router may also cache DNS responses, acting as a local DNS proxy. This caching is why the first visit to a website takes slightly longer than subsequent visits -- the DNS lookup adds 10-100ms on the first request.
NAT: Sharing One Public IP
Your home network uses private IP addresses (like 192.168.1.x) that are not routable on the public internet. Your ISP gives your router exactly one public IP address. NAT (Network Address Translation) is how your router lets all your devices share that single public address.
When your phone sends a packet to example.com, your router rewrites the source address from 192.168.1.42:54321 (your phone's private IP and ephemeral port) to 203.0.113.5:40001 (the router's public IP and a tracked port). It records this mapping in a NAT table. When the reply comes back addressed to 203.0.113.5:40001, the router looks up the mapping, rewrites the destination back to 192.168.1.42:54321, and forwards it to your phone.
This is why multiple devices can all browse the web simultaneously -- each connection uses a different port number, so the router can tell them apart. Most home routers can track tens of thousands of simultaneous NAT translations.
The Full Picture: Your Request's Journey
Your Phone to Your Router
Your browser creates an HTTP request for example.com. The TCP stack wraps it in a segment, the IP stack adds headers with source 192.168.1.42 and destination 93.184.216.34, and the WiFi driver encrypts and transmits the frame to your router over the wireless link.
Your Router to Your ISP
Your router performs NAT (rewriting the source IP to its public address), then forwards the packet out its WAN port. This connects to your ISP's network -- either through a fiber ONT, a cable modem, or a DSL modem. The packet enters the ISP's network and is routed through their infrastructure toward the destination.
Across the Internet
Your packet traverses multiple ISP networks, internet exchange points, and backbone links. Each router along the way consults its routing table and forwards the packet one hop closer. A typical web request crosses 10-20 routers. The packet may travel thousands of miles in under 50 milliseconds.
The Reply Returns
The web server sends the response back. It travels the reverse path through the internet, arrives at your router's public IP, gets de-NATed back to your phone's private IP, decrypted by WiFi, and delivered to your browser. The whole round trip typically takes 20-200 milliseconds depending on distance.
Devices on Your Home Network
The Modem
Converts your ISP's signal (fiber, cable, DSL) into Ethernet. Some ISPs combine the modem and router into one device (a "gateway"). If you have a separate modem and router, the modem just handles the physical connection.
The Router
The brain of your home network. It runs DHCP, DNS proxy, NAT, a firewall, and the WiFi access point all in one box. Consumer routers handle all these functions automatically -- on enterprise networks, each function is typically a separate device.
Your Devices
Phones, laptops, smart TVs, IoT sensors. Each gets a unique private IP from DHCP. They all share the same public IP through NAT. The router keeps them isolated from the internet -- unsolicited inbound connections are blocked unless you set up port forwarding.
Common Home Network Issues
WiFi Connected But No Internet
Usually means WiFi Layer 2 is working but DHCP failed or the router cannot reach the ISP. Check if you have an IP address (not 169.254.x.x, which means DHCP failed). Try rebooting the router to re-establish the ISP link.
Double NAT
If your ISP gives you a gateway (modem+router combo) and you add your own router behind it, you end up with two layers of NAT. This can break video calls, gaming, and port forwarding. Fix by putting the ISP gateway into "bridge mode" so only your router does NAT.
DNS Resolver Down
Websites fail to load but direct IP connections work. Your DNS resolver (often the ISP's) is down or slow. Fix by changing DNS in your router settings to 1.1.1.1 (Cloudflare) or 8.8.8.8 (Google). This change affects all devices on the network automatically.
Security on Your Home Network
Your home router acts as a basic firewall through NAT -- since all devices share one public IP, there is no way for an external attacker to directly reach your devices unless you explicitly open a port. However, this only protects against unsolicited inbound connections. Malware on a device inside your network can still communicate outbound freely. For better security, use WPA3 instead of WPA2 when available, change the default admin password on your router, keep firmware updated, and consider using a DNS-based filter (like NextDNS or Pi-hole) to block malicious domains.
IoT devices (smart bulbs, cameras, thermostats) are often the weakest link. They frequently have poor security practices, rarely get firmware updates, and can be compromised to join botnets. If your router supports it, putting IoT devices on a separate VLAN or guest network prevents a compromised smart bulb from accessing your laptop or phone.
Frequently asked questions about home networks
What happens when I connect to home WiFi?
Your device authenticates to the access point, then requests an IP address via DHCP. The router replies with a private IP, default gateway, and DNS servers. From that point on, your device can reach the internet by sending packets through the router, which performs NAT to share its single public IP.
What does my home router actually do?
A typical home router combines four jobs in one box: a WiFi access point, an ethernet switch, a DHCP server that hands out private IPs, and a NAT router that translates between your private LAN and the public internet. Many also include a basic stateful firewall.
Why are home networks usually 192.168.1.x?
RFC 1918 reserves 192.168.0.0/16, 172.16.0.0/12, and 10.0.0.0/8 as private address ranges that anyone can use internally without coordination. 192.168.1.0/24 is the most common default for consumer routers — there is nothing magical about it, just convention.
Why can't external devices reach my server at home?
Your home router does NAT, which means the outside world only sees your single public IP. Without an explicit port forwarding rule (DNAT), incoming packets have no internal destination to map to, so your router drops them. To host a server you must configure port forwarding for the specific service.
Is my home network secure?
Out of the box, most home routers block unsolicited inbound traffic and use WPA2 or WPA3 for WiFi encryption. To stay safe, change the default admin password, keep firmware updated, disable WPS, and use a strong WiFi passphrase. NAT alone is not a firewall, but combined with default-deny it is reasonable for personal use.
Try the home network lab
You just learned how DHCP, NAT, and your home router work together to put every device online. Now open a home network in the app: trace from the PC and the phone to the ISP, watch both private addresses turn into the same public one at the router, and take NAT away to see what breaks.
Launch the home network lab →