386 Chapter 13: Dynamic Host Control Protocol
There are at least two devices involved in any DHCP setup—a DHCP server and a DHCP
client. There are often additional devices in the network between the client and server, called
DHCP relays. The following sections describe the function and conﬁguration of each of
these DHCP roles.
Acting as a DHCP Server
The following steps conﬁgure an IOS device as a DHCP server:
Step 1 Create a pool of addresses to assign to clients. The syntax for this command is
Router(config)# ip dhcp pool
Step 2 Assign a network to the pool:
Step 3 Tell the client how long it can keep the address—this is called the lease
period. Most DHCP implementations use a three-day lease, but IOS
defaults to one day:
Step 4 Identify the DNS server:
Step 5 Finally, identify the default gateway:
NOTE Many client operating systems use something called Automatic Private IP Addressing.
This process assigns an IP address, even in the absence of a DHCP server. If a DISCOVER
message is not answered, the client picks a random 16-bit number and prepends it with 169.254.
It performs a gratuitous ARP and assigns that address to itself.
The idea of Automatic Private IP Addressing is that two travelers could link their devices
quickly and easily. For instance, two train commuters could play a game on the way to the city.
They conﬁgure DHCP on their laptops and use Automatic Private IP Addressing on the train and
get a different IP in the ofﬁce.
If you see a 169.254.x.x address, it means that the DHCP server is not reachable. The PC will
not work because there is not a router to or from that IP. Troubleshoot this by ﬁnding out
why the PC cannot see the DHCP server.