Remote DHCP Server 1

By certskills April 19, 2016 09:15

DHCP plays a huge role in most IPv4 networks. In some cases, the server sits on the same subnet as the client, but in other cases, the DHCP server is remote. When it is remote, you need to configure the DHCP relay agent feature as well. Today’s lab: configure that centralized DHCP server, and make sure the remote clients can get a lease from that server.


For this lab, configure R1 to act as the DHCP server for two remote subnets off routers R2 and R3 as shown in the figure. Specifically:

  • Use a DHCP pool per Subnet (Names: One and Two)
  • Configure the correct default gateway configuration; you decide on the correct values.
  • Configure a DNS IP addresses of and
  • Set the domain name for the network to
  • Set the lease length to 1 day, 2 hours, and 3 minutes long.
  • Prevent the server from assigning to clients the IP addresses used by the routers in those subnets.
  • Assume all router interfaces shown in the lab are up, working and the appropriate interfaces have been configured with IP addresses (per the initial configuration).
  • Assume all routing protocol configuration is correct between routers, so that all routers learn routes for all subnets


Figure 1: Remote DHCP Topology


Initial Configuration

Example 1, 2, 3, and 4 show the beginning configuration state of R1, R2, R3 and SW1.

Example 1: R1 Config

Example 2: R2 Config

Example 3: R3 Config

Example 4: SW1 Config


Answer on Paper, or Maybe Test in Lab

Next, write your answer on paper. Or if you have some real gear or other tools, configure the lab using them.

To test your solution if you happen to try it with VIRL or real gear, use something that will attempt to use DHCP to lease an IPv4 address. On hosts, you can set the host to use DHCP. For instance, on Windows OS’s, use commands like ipconfig /release (to release the lease) and ipconfig /renew (to attempt a new lease). On Linux, try sudo dhclient –r to release, and sudo dhclient to lease a new address.

Alternately, if you have Cisco switches to use, include a switch connected the G0/2 interfaces of both R2 and R3. Then you can make each switch use DHCP for its own management IP address. For example, if R2 is connected to a LAN switch, and the switch used VLAN 1 on all ports, you could configure the commands interface vlan 1 followed by ip address dhcp to make the switch attempt to lease an address to use for interface VLAN 1. The show interfaces vlan 1 command on the switch will then show if the switch obtained its address or not.

Do this Lab with Cisco’s VIRL

You can do these labs on paper and still get a lot out of the lab. As an extra help, we have added files for the Virtual Internet Routing Lab (VIRL) software as well. The .VIRL file found here is a file that when used with VIRL will load a lab topology similar to this lab’s topology, with the initial configuration shown in the lab as well. This section lists any differences between the lab exercise and the .VIRL file’s topology and configuration.

Download this lab’s VIRL file!

The virl topology matches this lab topology exactly. The host info does as well.

Host device info:

This table lists host information pre-configured in VIRL, information that might not be required by the lab but may be useful to you.


IP Address











Handy Host Commands:

To see PC IP address: ifconfig eth1

Ping example: ping -c 4

Trace example: tracepath

To connect to another node within the topology: telnet


Multi-area OSPF 1
Answers: Multi-area OSPF 1
By certskills April 19, 2016 09:15
Write a comment


  1. orange September 4, 20:16

    subnet is repeated twice in the diagram.

    Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email


Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.