DHCP, DHCPv6, SLAAC, Scopes, Leases, and Relay
Key Takeaways
- DHCP automatically provides IPv4 clients with addresses and options such as default gateway and DNS servers.
- DHCP scopes define the address pool, exclusions, lease time, reservations, and options for a subnet.
- DHCP relay forwards client broadcasts or messages between subnets and a centralized DHCP server.
- IPv6 hosts may use SLAAC, stateless DHCPv6, stateful DHCPv6, or a combination depending on router advertisements.
- Address conflicts, wrong options, exhausted scopes, and missing relay configuration are common service issues.
DHCP reduces manual addressing work and prevents many configuration errors, but it must match the subnet, VLAN, router, and DNS design.
IPv4 DHCP Basics
The common IPv4 process is often remembered as DORA:
| Step | Meaning |
|---|---|
| Discover | Client broadcasts to find DHCP servers |
| Offer | Server offers an address and options |
| Request | Client requests the offered lease |
| Acknowledge | Server confirms the lease |
DHCP options often include:
- Subnet mask.
- Default gateway.
- DNS servers.
- Domain search suffix.
- NTP servers.
- Voice VLAN or vendor-specific options in some environments.
If clients receive an address but cannot leave the subnet, check the default gateway option. If clients reach IP addresses but not names, check DNS options.
Scopes, Leases, Reservations, and Exclusions
| Term | Meaning |
|---|---|
| Scope | Address range and options for a subnet |
| Lease | Temporary assignment of an address to a client |
| Exclusion | Address removed from dynamic assignment |
| Reservation | Address consistently assigned to a known client identifier or MAC address |
| Option | Extra configuration such as router, DNS, or NTP |
Use reservations for devices that should keep a predictable address while still being managed by DHCP. Use exclusions for statically assigned addresses such as routers, printers, or infrastructure devices.
DHCP Relay
IPv4 DHCP Discover messages are broadcasts and do not normally cross routers. A DHCP relay agent, often configured on a router or Layer 3 switch interface, forwards client requests to a DHCP server on another subnet.
| Symptom | Possible cause |
|---|---|
| Clients in one VLAN get leases but another VLAN does not | Missing relay or wrong scope |
| Clients get an address from the wrong subnet | Relay, scope, or VLAN interface misconfiguration |
| Clients self-assign APIPA 169.254.x.x | DHCP server unreachable, relay missing, scope exhausted |
| Only new clients fail | Scope exhaustion or reservation/exclusion issue |
The relay must point to the DHCP server, and the server must have a scope that matches the client subnet.
IPv6 Address Assignment
IPv6 uses router advertisements and neighbor discovery. Depending on flags and configuration, clients may use SLAAC, DHCPv6, or both.
| Method | What provides address | What provides options |
|---|---|---|
| SLAAC | Client builds address from router advertisement prefix | Router advertisement and possibly RDNSS |
| Stateless DHCPv6 | SLAAC provides address | DHCPv6 provides options such as DNS |
| Stateful DHCPv6 | DHCPv6 provides address | DHCPv6 provides options |
SLAAC does not use the IPv4 DORA process. DHCPv6 is separate from IPv4 DHCP and uses IPv6 messaging.
Lease Planning
Lease time should match device behavior.
| Environment | Lease approach |
|---|---|
| Guest Wi-Fi with high turnover | Shorter leases |
| Stable office desktops | Longer leases |
| Small scope with many transient clients | Shorter leases and scope monitoring |
| Critical infrastructure | Static addressing or DHCP reservations with documentation |
Too-short leases can increase DHCP traffic. Too-long leases can keep addresses unavailable after clients leave.
PBQ-Style DHCP Scenario
Facts:
- VLAN 10 users receive valid leases.
- VLAN 20 users receive 169.254.x.x addresses.
- The DHCP server is in the data center on VLAN 10.
- VLAN 20 was created today on a Layer 3 switch.
Best checks:
- Verify VLAN 20 has an SVI or routed interface with the correct IP address.
- Configure DHCP relay on the VLAN 20 interface to the DHCP server.
- Create or verify the DHCP scope for VLAN 20.
- Confirm firewall rules allow DHCP relay traffic between the switch and server.
- Renew a client lease and verify address, mask, gateway, and DNS options.
The key clue is that DHCP works in one subnet but fails in another. That points to relay, scope, VLAN, or firewall path rather than a completely down DHCP service.
Clients in a new VLAN receive APIPA 169.254.x.x addresses while clients in an existing VLAN receive normal leases. What is the most likely missing configuration?
Which items are typical DHCP scope components? Choose two.
Select all that apply
Which IPv6 method lets a client create its own address from a router advertisement prefix?