DHCP Configuration 3
Topology

Tasks:
A company has a centralized DHCP server. The branch office routers (R1 and R2) connect different departments but do not have local DHCP servers. Instead, clients in the branch offices must obtain their IP addresses dynamically from the centralized DHCP server.
- Configure IP addressing on G0/1 interface of R1 and R2.
- Configure R1 to act as a relay agent and forward DHCP requests to the DHCP server.
- Configure R2 to act as a relay agent and forward DHCP requests to the DHCP server.
- Verify DHCP Clients receive IP Address from the centralized DHCP Server.
Solution:
Task 1: Configure IP
addressing on G0/1 interface of R1 and R2.
On R1:
R1# configure
terminal
R1(config)# interface g0/1
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# end
On R2:
R2# configure
terminal
R2(config)# interface g0/1
R2(config-if)# ip address 192.168.2.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# end
Task 2: Configure R1
to act as a relay agent and forward DHCP requests to the DHCP server.
R1 must forward DHCP
requests from its G0/1 interface (branch client subnet) to the centralized DHCP
server. Since we do not know the IP address of the DHCP server, we can
determine it by checking the IP address of R1's G0/0 interface. Given that the
subnet mask of the network between R1 and the DHCP server is /30
(255.255.255.252), which allows only two usable IP addresses, the DHCP server's
IP will be the other address in that subnet.
We can use the
command show ip interface
brief command for this.
R1# show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.100.2 YES Manual
up up
GigabitEthernet0/1 192.168.1.1 YES Manual
up up
--- Output Omitted ---
Since IP address of
R1's G0/0 interface is 192.168.100.2 then IP address of DHCP server's interface
must be 192.168.100.1. We need to assign this as helper address on the G0/1
interface of R1.
R1# configure
terminal
R1(config)# interface g0/1
R1(config-if)# ip helper-address 192.168.100.1
ip helper-address
192.168.100.1: Configures R1 to
forward DHCP requests from clients on 192.168.1.0/24 to the DHCP server at
192.168.100.1
Task 3: Configure R2
to act as a relay agent and forward DHCP requests to the DHCP server.
We need to do the
same thing on R2 to find the IP address of DHCP server's interface connected to
R2.
R2# show ip
interface brief
Interface
IP-Address OK? Method
Status
Protocol
GigabitEthernet0/0 192.168.101.2 YES
Manual
up
up
GigabitEthernet0/1
192.168.2.1 YES Manual
up
up
--- Output Omitted ---
Since IP address of
R2's G0/0 interface is 192.168.101.2 then IP address of DHCP server's interface
must be 192.168.101.1. We need to assign this as helper address on the G0/1
interface of R2.
R2# configure
terminal
R2(config)# interface g0/1
R2(config-if)# ip helper-address 192.168.101.1
ip helper-address
192.168.101.1: Configures R1 to
forward DHCP requests from clients on 192.168.2.0/24 to the DHCP server at
192.168.101.1
Task 4: Verify DHCP
Clients receive IP Address from the centralized DHCP Server.
From the client
devices, configure the clients to obtain an IP address dynamically, and verify
they receive an IP from the DHCP server.
Client1:\>
ipconfig /renew
IP Address.................: 192.168.1.2
Subnet Mask................: 255.255.255.0
Default Gateway............: 192.168.1.1
DNS Server.................: 8.8.8.8
This command is used
on a PC to request a new IP address from a DHCP server. It forces the client to
release its current IP address (if any) and renew it by communicating with the
DHCP server. The new IP address and related network configuration details (subnet
mask, default gateway, DNS server) are obtained and applied to the system.
Client2:\>
ipconfig /renew
IP Address.................: 192.168.2.2
Subnet Mask................: 255.255.255.0
Default Gateway............: 192.168.2.1
DNS Server.................: 8.8.8.8
Now exit
configuration mode and save the configuration on both routers.
R1(config-if)# end
R1# write memory
R2(config-if)# end
R2# write memory
Packet Tracer File
Clicking this button will begin the download of a ZIP file. Inside the ZIP file, you'll find a Packet Tracer Activity (.pka) file, which will automatically track your progress as you configure the network.