Tasks:
1) Exclude first 10 IP addresses in each subnet from pool
Pool names = vlan10 and vlan20
2) Networks = 10.1.10.0/24 (VLAN 10) and 10.1.20.0/24 (VLAN 20)
4) Default Gateway = Switch1
5) DNS Server = Router1
6) Make sure PCs can ping each other and the loopback of Router1
Download Solved Lab
Solution:
We see that there is a Router and a Multi-layer switch involved in the setup. The multi layer switch is performing the routing while the Router is working as a DHCP server.
First we will define excluded DHCP IP Addresses in the Router.
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip dhcp excluded-address 10.1.10.1 10.1.10.10
R1(config)#ip dhcp excluded-address 10.1.20.1 10.1.20.10
Then we will define the IP Pools
R1(config)#ip dhcp pool vlan10
R1(dhcp-config)#network 10.1.10.0 255.255.255.0
R1(dhcp-config)#default-router 10.1.10.1
R1(dhcp-config)#dns-server 10.1.1.254
R1(dhcp-config)#end
R1#
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip dhcp pool vlan20
R1(dhcp-config)#network 10.1.20.0 255.255.255.0
R1(dhcp-config)#default-router 10.1.20.1
R1(dhcp-config)#dns-server 10.1.1.254
R1(dhcp-config)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#
Next we need to add static routes for the 10.1.10.0/24 and 10.1.20.0/24 Networks in the Router
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 10.1.10.0 255.255.255.0 10.1.1.1
R1(config)#ip route 10.1.20.0 255.255.255.0 10.1.1.1
Now we need to enable routing in the multi-layer switch so that Inter Vlan routing works properly.
S1#config t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#ip routing
S1(config)#
Next the most important step is to add ip helper-address for VLAN 10 and VLAN20 so that the DHCP requests are forwarded to the router and switch acts as DHCP relay agent.
S1#config t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#interface vlan10
S1(config-if)#ip helper-address 10.1.1.254
S1(config-if)#interface vlan20
S1(config-if)#ip helper-address 10.1.1.254
S1(config-if)#
S1(config-if)#exit
And finally we need to add a static route in the multi-layer switch so that the loop-back interface can be reached in the Router.
S1#config t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#ip route 1.1.1.1 255.255.255.255 10.1.1.254
The configurations are complete. Now we can test connectivity from PC1 and PC2
Similarly from we can test from PC2