What you will learn
- How a phone or laptop gets its IP address from the router in four DHCP messages: Discover, Offer, Request and Acknowledge.
- What the numbers on a device’s network card mean: IP address, subnet mask, default gateway and DNS server.
- Why a 169.254.x.x address means “no answer from DHCP”, and how to fix two devices fighting over one address.
- How DNS turns a name like pickitech.com into an IP address, and why the second lookup is faster.
Key terms
IP address is the number that identifies a device on a network, like 192.168.1.101. Home networks use private ranges (10.x.x.x, 172.16.x.x to 172.31.x.x and 192.168.x.x) that only work inside your home.
DHCP (Dynamic Host Configuration Protocol) hands out addresses automatically. Almost every home router has a DHCP server built in. Each address is lent for a set time called a lease.
Subnet mask tells a device which addresses are on its own network. 255.255.255.0 (written /24) means 192.168.1.1 to 192.168.1.254 are local.
Default gateway is the router’s address on your network. Traffic for anywhere else, like a website, is sent to it.
169.254.x.x is a link-local address a device gives itself when no DHCP server answers. Windows calls it APIPA.
DNS (Domain Name System) turns names into IP addresses. A recursive resolver asks a root server, then the .com servers, then the domain’s own name server, and caches the answer for the time set in the record (its TTL).
Quick checks at home
- See your address: run
ipconfigon Windows, or open System Settings › Wi-Fi › Details › TCP/IP on a Mac. - Test DNS: run
nslookup pickitech.com. Ifping 1.1.1.1works but names don’t load, DNS is the problem. - Give printers, NAS boxes and cameras a DHCP reservation in your router so their address never changes.
Sources
- RFC 2131: Dynamic Host Configuration Protocol
- RFC 1918: Address Allocation for Private Internets
- RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses
- RFC 1034: Domain Names, Concepts and Facilities
- Root Servers (IANA)
- RFC 5737: IPv4 Address Blocks Reserved for Documentation
- Find your IP address in Windows (Microsoft)