Reading: The DHCP slides covered in class are relevant to this lab. The Cisco Networking Academy page on configuring DHCP should also be useful. Chapter 28 of the CCNA Routing and Switching Portable Command Guide covers the IOS commands related to DHCP.
In this lab, you will configure DHCPv4 on a router both as a server and as a relay agent.
Using Packet Tracer, construct the following network:
Device | Interface | IP Address | Subnet Mask | Default Gateway |
---|---|---|---|---|
R1 | Fa0/0 | 192.168.0.1 | 255.255.255.0 | N/A |
Fa0/1 | 192.168.1.1 | 255.255.255.0 | N/A | |
S0/0/0 (DCE) | 192.168.2.253 | 255.255.255.252 | N/A | |
R2 | S0/0/0 | 192.168.2.254 | 255.255.255.252 | N/A |
S0/0/1 (DCE) | 209.165.200.226 | 255.255.255.224 | N/A | |
ISP | S0/0/1 | 209.165.200.225 | 255.255.255.224 | N/A |
PC-A | NIC | DHCP | DHCP | DHCP |
PC-B | NIC | DHCP | DHCP | DHCP |
In this lab use the 1841 router (not the 1941), but continue using the 2960-24TT switches as you have before. Be careful to connect each line to the indicated interface.
As usual, configure the basic settings (Global Settings and Console Access; you do not need to configure remote access for this lab) on all the devices.
Configure the network interfaces on the routers using the addresses in the addressing table. You do not need to configure switch virtual interfaces in the switches for this lab. Also, do not configure any IP address information for the PCs at this time.
The Dynamic Host Configuration Protocol (DHCP) is a network protocol that lets network administrators manage and automate the assignment of IP addresses. Without DHCP, the administrator must manually assign and configure IP addresses, preferred DNS servers, and default gateways. As the network grows in size, this becomes an administrative problem, and especially when devices are moved from one internal network to another.
In this scenario, the company has grown in size, and the network administrators can no longer assign IP addresses to devices manually. Your job is to configure the R2 router to assign IPv4 addresses on two different subnets connected to router R1. This will require that R1 be configured as a DHCP relay agent so that DHCP requests can be forwarded to R2.
Although not the focus of this lab, you will need routing to function in the network for test purposes and so that relayed DHCP messages can be routed to the authoritative server. As an exercise and review, we will use RIPv2.
On router R1:
R1(config)# router rip R1(config-router)# version 2 R1(config-router)# network 192.168.0.0 R1(config-router)# network 192.168.1.0 R1(config-router)# network 192.168.2.252 R1(config-router)# no auto-summary R1(config-router)# exit
On router R2:
R2(config)# router rip R2(config-router)# version 2 R2(config-router)# network 192.168.2.252 R2(config-router)# no auto-summary R2(config-router)# default-information originate R2(config-router)# exit
Also on R2, configure a default route to the Internet (i.e., the ISP router):
R2(config)# ip route 0.0.0.0 0.0.0.0 209.165.200.225
Finally, since we are not bothering in this lab to configure a routing protocol on the ISP router, we will need to configure a static route there as well, so it knows how to send packets into our organization's network:
ISP(config)# ip route 192.168.0.0 255.255.252.0 209.165.200.226
Verify that all the routers can now ping each other. If any of the pings fail, use commands such as show ip interface brief or show ip route to diagnosis problems. Why is the netmask for the static route on the ISP router 255.255.252.0?
At this point, you should also verify that the PCs are configured to use DHCP to obtain their IP address information (this should be the default, but check anyway).
Configure R2 as a DHCP server using two address pools called R1F0 (corresponding to the subnetwork attached to the FastEthernet0/0 interface of R1) and R1F1 (corresponding to the subnetwork attached to the FastEthernet0/1 interface of R1).
The R1F0 pool should have the following characteristics:
The R1F1 pool should have the same characteristics as above, except with the subnetwork addresses and default gateway address changed as appropriate.
Use the command show ip dhcp pool to check your work.
On R1 set appropriate helper addresses on the two interfaces so that R1 will relay DHCP requests to the server.
At this point, the PCs should receive IP address assignments (it might take a minute). Use the ipconfig /all command on the PCs to verify their IP addresses. Verify that the PCs can ping around the network.
On the DHCP server use the show ip dhcp binding command to view the leases.
For this lab, submit your final PacketTracer model, along with a document containing the commands you used to configure your devices, and your answers to the questions. The preferred document format is PDF, but Word, ODT, or plain text is also acceptable.
Last Revised: 2023-11-08
© Copyright 2023 by Peter Chapin <peter.chapin@vermontstate.edu>