Dynamic Host Configuration Protocol

Dynamic Host Configuration Protocol (DHCP) is defined in RFC 1531 (latest RFC 2131) and provides a comprehensive method of allocating IP addresses, subnet mask, gateway address, DNS server, WINS servers, and many more parameters for IP devices.

DHCP clients send messages to the server on UDP 67, and servers send messages to the client on UDP 68. Cisco routers can also be configured for DHCP.

Example 2-3 configures a Cisco IOS router to allocate the entire range, with a gateway address, subnet mask, DNS servers and, domain name cisco.com, and WINS (for Windows 2000 clients) server addresses and The lease should last forever, so the final command is lease infinite.

Example 2-3 DHCP Configuration on Cisco IOS Router

R1#sh running-config |

begin dhcp

ip dhcp excluded-address

Interface Ethernet 0

ip address


ip dhcp pool DHCPpool


dns-server 141.108.


domain-name cisco.com

default-router 148.



lease infinite

To view the DHCP leases, use the IOS command show ip dhcp server. Example 2-4 displays the output taken from a router configured for DHCP. Example 2-4 show ip dhcp server Sample Display

R1#show ip dhcp server

DHCP server: ANY (

Leases: 200

Offers: 200 Requests: 400 Acks: 330

Naks: 230

Declines: 0 Releases: 0 Bad: 0

Example 2-4 shows that 200 devices are currently allocated IP addresses, and over 400 requests were made.

Was this article helpful?

0 0

Post a comment