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 131.108.1.0/24, with a gateway address 131.108.1.1, subnet mask 255.255.255.0, DNS servers 141.108.1.1 and 141.108.1.2, domain name cisco.com, and WINS (for Windows 2000 clients) server addresses 64.104.1.1 and 141.108.2.1. 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 131.108.1.1

Interface Ethernet 0

ip address 131.108.1.1

i

255.255.255.0

ip dhcp pool DHCPpool

network 131.108.1.0

255.255.255.0

dns-server 141.108.

1.1 141.108.1.2

domain-name cisco.com

default-router 148.

16.36.6 148.16.36.3

netbios-name-server

64.104.1.1 141.108.2.1

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 (255.255.255.255)

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