Lab 4.3: DHCP Relay

Lab Topology:

Please use the following topology to complete this lab exercise:

Task 1:

Configure the hostnames on R1, R2, and Sw1 as illustrated in the topology.

Task 2:

Configure R1 to provide clocking information for R2 at a speed of 256 Kbps. Configure the IP addresses on R1 and R2 S0/0 interface as illustrated in the topology.

Task 3:

Configure VLAN300 named DHCP_VLAN on Sw1. Assign the FastEthernet0/2 and FastEthernet0/3 interfaces on Sw1 to this VLAN. Ensure that the ports immediately transition to the Spanning Tree Forwarding state.

Task 4:

Configure R2 as a Cisco IOS DHCP server with the following settings:

  • DHCP pool name: REMOTE-DHCP-POOL
  • DHCP network: 10.1.1.0/24
  • DNS server: 192.168.1.254
  • WINS server: 172.30.1.254
  • Default gateway: 10.1.1.1
  • DHCP lease time: 8 days

You will need to add a static route to the 10 network on R2 because it will otherwise drop any traffic not listed in its routing table.

Task 5:

Configure R1 to forward DHCP requests from DHCP clients connected to F0/0 to R2 (the IOS DHCP server).

Task 6:

Verify your DHCP configuration on the connected workstation (or other DHCP client), and also verify that your Cisco IOS DHCP server is showing a leased DHCP address.

Configuration and Verification

Task 1:

For reference information on configuring hostnames, please refer to earlier labs.

Task 2:

For reference information on configuring DCE clocking and IP addressing, please refer to earlier labs.

Task 3:

Sw1#config t 
Enter configuration commands, one per line.  End with CTRL/Z. 
Sw1(config)#vtp mode transparent 
Setting device to VTP TRANSPARENT mode. 
Sw1(config)#vlan300 
Sw1(config-vlan)#name DHCP_VLAN 
Sw1(config-vlan)#exit 
Sw1(config)#interface range fastethernet0/2 – 3 
Sw1(config-if-range)#switchport mode access 
Sw1(config-if-range switchport access vlan300 
Sw1(config-if-range)#spanning-tree portfast 
%Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs,
 concentrators, switches, bridges, etc... to this interface when portfast is enabled, can cause
 temporary bridging loops. 
Use with CAUTION 
%Portfast will be configured in 2 interfaces due to the range command but will only have effect
 when the interfaces are in a non-trunking mode. 
Sw1(config-if-range)#no shutdown 
Sw1(config-if-range)#end 
Sw1#

Task 4:

R2#config term 
Enter configuration commands, one per line.  End with CRTL/Z.
R2(config)#ip dhcp pool REMOTE-DHCP-POOL 
R2(dhcp-config)#network 10.1.1.0 /24 
R2(dhcp-config)#dns-server 192.168.1.254 
R2(dhcp-config)#netbios-name-server 172.30.1.254 
R2(dhcp-config)#default-router 10.1.1.1 
R2(dhcp-config)#lease 8 
R2(dhcp-config)#exit 
R2(config)#ip dhcp excluded-address 10.1.1.1 
R2(config)#ip route 10.1.1.0 255.255.255.0 s0/0 
R2(config)#exit 
R2#

Task 5:

R1#conf t 
Enter configuration commands, one per line.  End with CRTL/Z. 
R1(config)#int fastethernet0/0 
R1(config-if)#ip helper-address 172.16.1.2 
R1(config-if)#end 
R1#

NOTE: The ip helper-address command is used to point an interface connected to a subnet with DHCP clients to a remote DHCP server. You can specify more than one DHCP server with this command; however, the first one configured will always be tried first.

Task 6:

R2#show ip dhcp pool REMOTE-DHCP-POOL 

Pool REMOTE-DHCP-POOL : 
Utilization mark (high/low)    : 100 / 0 
Subnet size (first/next)       : 0 / 0 
Total addresses                : 254 
Leased addresses               : 1 
Pending event                  : none 
1 subnet is currently in the pool : 
Current index    IP address range                    Leased addresses 
10.1.1.3         10.1.1.1-10.1.1.254                 1

R2#show ip dhcp binding 
Bindings from all pools not associated with VRF: 
IP address       Client-ID/          Lease expiration        Type Hardware address/ User name 
10.1.1.2         0100.1d09.d402.38   Mar 09 2017 04:27 AM    Automatic

NOTE: If you decided to use another Cisco IOS device as a DHCP client, you will need to add the command below to the FastEthernet interface:

R3(config-if)#ip address dhcp 
R3(config-if)#no shut 
R3(config-if)#end 
*Mar  1 00:04:55.603: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:04:56.603: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up 
*Mar  1 00:05:07.375: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 10.1.1.2, mask 255.255.255.0, hostname R3

You can check your DHCP configuration by issuing the show dhcp server command (if you are using a router as a host) as illustrated in the following output:

R4#show dhcp server 
DHCP server: ANY (255.255.255.255) 
Leases:   3 
Offers:   3      Requests: 3     Acks: 3     Naks: 0 
Declines: 0      Releases: 6     Bad:  0 
DNS0:   192.168.1.254,   DNS1:  0.0.0.0 
NBNS0:  172.30.1.254,   NBNS1: 0.0.0.0 
Subnet: 255.255.255.0   DNS Domain: howtonetwork.com