Beginner+

DHCP: Automatic Addressing

One PC gets its address and gateway from a DHCP server; another was configured by hand and someone forgot the gateway. Both can talk on the LAN, but only one can leave it.

Open this lab

Free interactive lab. No signup. Runs in your browser.

The scenario

An office LAN, 192.168.1.0/24, has a DHCP Server (192.168.1.2) and an Office Router (192.168.1.1) that leads to an Intranet server (10.0.2.20). The DHCP Server's pool hands out addresses from 192.168.1.100 to 192.168.1.200 with default gateway 192.168.1.1; it offers no DNS server, and nothing in this lab uses names. PC-2 has no address configured. When it is connected, the lab gives it a free address from the pool and a default route marked 'via DHCP'; in a live lab PC-2 runs a real DHCP client and gets its lease from the DHCP Server, so the exact address can differ. PC-1 was set up by hand with 192.168.1.50/24, outside the pool, and whoever did it left the gateway empty.

What you will work out

Learn what a DHCP pool hands out, and what breaks when a device has an address but is missing the rest of the configuration.

Why this matters

DHCP runs on almost every network people join: home routers, office networks and cloud networks all hand out leases. 'It has an IP address but can't reach anything outside' usually means part of the configuration is missing or wrong, most often the gateway, and 'ip route' (or 'route print' on Windows) shows it in one line. When a device gets no lease at all, Windows and macOS give themselves a 169.254.0.0/16 address instead, which is the sign to look at the DHCP server.

Running it

DHCP: Automatic Addressing opens on a canvas, already wired and addressed. Trace a packet through it hop by hop, or run the same topology live on real Linux network namespaces. How the two modes differ.

Open DHCP: Automatic Addressing

Runs in your browser. No install, no signup, and the simulation starts instantly.

Open the lab →