
The Dynamic Host Configuration Protocol (DHCP) is considered to be an evolution of the Bootstrap Protocol (BootP).
DHCP is literally build upon BootP, and BootP remains an internal part of DHCP. Both protocols have been created to provide IP addresses to clients when needed.
The difference between them is that while BootP provides an IP address to a client according to the client’s hardware address on the BootP server table, DHCP by default provides an IP address automatically to the client from a pool of IP addresses.
Besides an IP address, the DHCP server can provide the client a lot of information, such as DNS server IP address, Default gateway IP address, Domain name and much more.
A Cisco IOS device can be configured to act as:
Cisco IOS devices can be configured to act as all of the above and even in combinations of two or three of roles. In this article I will investigate the operation of Cisco routers under all of the above roles.
Let’s start by investigating the process of IP address assignment when a DHCP client requests an IP address from a DHCP server. The messages exchanged between client and server can be seen in the diagram below:

The above diagram presents the DHCP message sequence. Here’s how it all goes down:
Below is a list of the most important commands to enable a Cisco router to emulate a DHCP server:

Now let’s use the above commands in a real scenario. A Cisco router is configured to provide DHCP functionality as follows:
Based on the above configuration let’s see the messages exchanged as captured from Ethereal application. A screen shot of the messages can be seen below:

Details on the DHCP Offer message sent by the Cisco router can be seen below. Make a note of the client’s offered IP address (172.16.1.5), option 3 - default router’s address, option 51- IP address lease time, option 6 – IP addresses of DNS servers.

A Cisco router can be configured to act as DHCP client and obtain dynamically an interface address by using the command ip address dhcp in interface configuration mode. Issuing this command causes the router to transmit DHCP Discover messages on the specific interface.
By default routers do not forward broadcasts. In internetworks, most of the times, a DHCP server is located on a different network than the majority of its clients.
For DHCP messages to be able to reach the server, configuration of IP helper addresses is required. IP helper address [DHCP server IP address] interface command instructs a router to intercept DHCP broadcast messages and forward them as unicasts to the DHCP server hence providing “relay” functionality.
DHCP relay agents provide extra security to the network by hiding the server’s IP address from the clients. The client knows only the IP address of the relay agent.
The image below shows a common scenario where IP helper address is required.

The next image shows an IP DHCP Offer message as received on the client.
Note the IP address of the relay agent specified in the message. The client with the help of IP helper address on the relay agent is able to receive its IP address and all other information options provided.

Telecom companies use the services provided by DHCP relay agents extensively. Specifically the ip dhcp relay information option global configuration command which enables the DHCP relay agent to include information about itself to the DHCP requests sent from clients to DHCP server.
This is very useful for telecom operators when ATM routed bridge encapsulation (RBE) is used so that ATM interface and PVC over which the DHCP request came in is transmitted to the server from the relay agent. This information can be used to authenticate the client and help the DHCP server to apply the appropriate policy decisions.
The image below shows schematically the DHCP relay information option concept.

Train Signal’s Cisco Certification Training Series will help you master all the critical Cisco Networking Skills to prepare you for your next Cisco Exam!
Our hands-on training is taught by a CCIE Certified Instructor, Chris Bryant who has years of real-world experience to share with you.
Take learning to the next level and get the best computer training on the planet!
Tagged: Bootstrap Protocol BootP, Cisco, DHCP, DHCP Client, DHCP Rlay Agent, DHCP Server, DNS, Domain Name Service, Dynamic Host Configuration Protocol