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#enable
R1#Configure t
R1 config)#ip dhcp pool ipranges
R1(dhcp-config)# network 100.1.11.0 255.255.255.0
R1(dhcp-config)#dns server 100.1.11.1
R1(dhcp-config)#default-router 100.1.11.1
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 100.1.11.20
100.1.11.31
Following are the configuration required on router which
will act as DHCP client.
PC2 Configuration:
PC2#enable
PC2#Configure t
PC21#no ip routing
PC2#inf f0/0
PC2#ip address dhcp
PC2#no shutdown
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.