The joining problem
A new device needs more than a cable or a signal.
When a laptop joins a local network, it needs an address that is valid there. It also needs to know which destinations are local, which device can forward traffic elsewhere, and which resolver can answer names.
DHCP lets a local network provide this configuration automatically. The result is not a permanent identity: it is a lease that can be renewed, changed, or replaced.
Build the model
Four pieces of local configuration
IP (Internet Protocol) address
Identifies the device on the local network, such as 192.168.1.24.
Subnet mask
Helps the device decide whether a destination is local or needs a router.
Gateway
Names the local router that can forward traffic to another network.
DNS (Domain Name System) server
Provides a resolver that can translate human-readable names into addresses.
Mini experiment
Offer a network lease
Follow the simplified DHCP exchange. Each step adds one piece of the configuration needed by the device.
The device broadcasts that it needs local network configuration.
Start with a discovery message because the device does not yet know its DHCP server.
Extend the configuration model
IPv6 can combine Router Advertisements, SLAAC, and DHCPv6.
IPv6 does not use the IPv4 DHCP exchange unchanged. A router sends a Router Advertisement that announces a prefix and tells hosts how to configure themselves. A host may then use SLAAC to create its own address, DHCPv6 to obtain additional parameters, or DHCPv6 with stateful address assignment when the network wants a server to allocate addresses.
Router Advertisement
Provides the prefix, default-router information, and flags describing the preferred configuration method.
SLAAC
Lets a host form an IPv6 address from an advertised prefix and its interface identity or a privacy identifier.
Stateful DHCPv6
With the managed-address flag, a host asks a DHCPv6 server to allocate an IPv6 address and track the lease.
Other configuration
With the other-configuration flag, a host may use DHCPv6 for DNS information or other parameters while keeping its address from SLAAC.
DHCPv6 uses messages such as Solicit, Advertise, Request, and Reply. Unlike DHCPv4, DHCPv6 does not normally provide the default route; Router Advertisements remain responsible for that local routing information.
Historical evolution
BOOTP prepared the ground for DHCP.
BOOTP (Bootstrap Protocol) helped a device without a configured IP address obtain an address and boot information from a server. It was designed for network boot and diskless workstations, using UDP and relay agents so a server could serve clients beyond the local broadcast network.
Unlike modern DHCP, classic BOOTP used relatively permanent, administrator-managed mappings rather than a general lease lifecycle. Its fixed message and option model could provide an address, gateway, boot file name, and boot server, but it did not offer DHCP's flexible pool allocation and renewal process.
RARP
A device MAC address was used to ask for an IPv4 address, with very limited configuration.
BOOTP
Added server and boot-file configuration, often through a relay, for diskless network startup.
DHCP
Extended the model with dynamic pools, leases, renewal, and richer options.
Knowledge check
Test your local network model
Answer five questions. The answer order changes each time.