Cisco DHCP Configuration | How to assign automatic IP address from Cisco Router:
In this article I will show you how to configure and enable DHCP (Dynamic Host Configuration Protocol) on Gns3 router. For this lab I have Create the following lab in which I have configure a router (DHCP Server) as DHCP server where as I used the two DHCP clients which will obtain the IP address automatically from DHCP server. These DHCP clients include a router (which is configured like a PC) and a VM machine. You can visit How to connect windows VM to Gns3 & installation of windows 10 on Virtualbox for more detail.
Following configuration are required for making the Router as DHCP server.
DHCP server (R1) Configuration:
R1 config)#ip dhcp pool ipranges
R1(dhcp-config)# network 22.214.171.124 255.255.255.0
R1(dhcp-config)#dns server 126.96.36.199
R1(dhcp-config)#lease 10 (this command will set the IP lease for 10 day, view more Cisco Commands)
How to exclude the IP addresses from DHCP range
R1(dhcp-config)#ip dhcp excluded-addresses 188.8.131.52 184.108.40.206
Following are the configuration required on router which will act as DHCP client.
PC21#no ip routing
PC2#ip address dhcp
VM win 10 DHCP client configurations:
Simple power on the VM host in DHCP and set the network adapter setting to obtain the IP automatically. Check the following images:
How to test DHCP configurations:
On DHCP server use the following command for confirming DHCP configurations
show ip dhcp binding
Following will be the output in our case.
Other command that you can use is:
show DHCP neighbor.