First, let’s assume two Cisco routers: R1 (server) connected to R2 (client), forming a simple chain LAN. Now we’ll implement DHCP. The configuration commands and their explanations are as follows:
1. R1 DHCP Service Configuration
dhcp#configure terminal
//Enter global configuration mode
dhcp(config)#service dhcp
//Enable the DHCP service
dhcp(config)#no ip dhcp conflictlogging
//Disable DHCP conflict logging
dhcp(config)#ip dhcp pool cisco
//Create a DHCP pool named “cisco”
dhcp(dhcp-config)#network 192.168.1.0 255.255.255.0
//Define the network segment to be assigned by the DHCP server
dhcp(dhcp-config)#default-router 192.168.1.1
//Set the default gateway to 192.168.1.1
dhcp(dhcp-config)#dns-server 192.168.1.1
//Set the DNS server to 192.168.1.1
dhcp(dhcp-config)#exit
//Exit DHCP pool configuration mode
dhcp(config)#ip dhcp excluded-address 192.168.1.200 192.168.1.254
//Define a range of excluded addresses that DHCP will not assign
2. R2 Client Obtaining an IP Address
Client#configure terminal
//Enter global configuration mode
dhcp(config)#interface fastethernet0/0
//Enter the fastethernet0/0 interface
dhcp(config-if)#ip address dhcp
//Obtain an IP address from the DHCP server