Cisco DHCP Server and Client

By | April 22, 2012

The network digram for this example is as follows.

The first thing we need to do in to set the IP address of the interface Fa0/0 on R1

R1> enable
R1# configure terminal
R1(config)# interface fastethernet 0/0
R1(config-if)# ip address
R1(config-if)# no shutdown
R1(config-if)# end

We then need to verify we have the IP address on the correct interface. This is done using the “show ip interface brief” command

Now we have an IP address we now need to configure DHCP. Now we need to first define the address that are not going to be part of the DHCP pool. This is done using the following command.

R1(config)# ip dhcp exclude-address

the above command will now exclude the IP address to so the first assignable address in DHCP will be we now need to define the DHCP pool and give it a name. For this example the name of the pool will be DHCP.

R1(config)# ip dhcp pool DHCP
R1(dhcp-config)# default-router
R1(dhcp-config)# network
R1(dhcp-config)# dns-server

We now need to go to R2 and bring up the interface and set it to accept a DHCP address.

R2> enable
R2# configure terminal
R2(config)# interface fastethernet 0/0
R2(config-if)# no shutdown
R2(config-if)# ip address dhcp
R2(config-if)# end

now to check if all is working. First we check on R2 using “show ip interface brief

now we chcek on R1 using “show ip dhcp binding

We have now successfully enabled DHCP on a Cisco router