So on the switch, show run we need to configure additional configuration on these interfaces
the switched virtual interfaces on the switch.
We need to configure what's called an IP helper address to forward DHCP requests to the router.
So there are a number of things we need to do on the switch including forwarding the DHCP request messages
to the router.
So let's do that on VLAN 10 and on VLAN 20.
So firstly
show run notice as per our diagram this interface is in VLAN 10 and this interface is in VLAN 20. So PC 1
is in VLAN 10, PC 2 is in VLAN 20, and that's correct per the configuration shown here.
Now that we've configured the IP addresses, DHCP requests will be forwarded to the router but the
router needs to know about those networks.
If a router receives a DHCP request from a network that it's not aware of, it won't allocate IP addresses.
So on the router, I'm gonna create a static route pointing to the switch for network 10.1.10.0
as well as 10.1.20.0.
So at the moment now, the routing table contains those two static routes.
In addition to the directly connected interfaces, so the router should be able to ping the switches
switched virtual interfaces or SVIs, which it can. So the route rs able to ping this IP address as
well as this IP address.
Don't forget to add routes either using a dynamic routing protocol or something else so that you have
IP connectivity in your network.
We've been told that PCs need to be able to ping the loopback of router 1, router 1 has an IP address
of 1.1.1.1 configured on the loopback.
The switch doesn't know about that network. So we would have to add a static route
or enable a routing protocol such as OSPF to allow the devices to ping each other.
So now the switch can ping the loopback of the router.
In this example, I'm using static routes, but you could have used a routing protocol such as OSPF
or rip.
Another thing we need to do on the switch is enable IP routing when traffic is sent from VLAN 10 to
VLAN 20, the switch needs to do the inter VLAN routing of that traffic.
So inter VLAN routing needs to be enabled by using the IP routing command. The switch needs to be
configured to route from one switched virtual interface to another.
So hence we add the command IP routing to the switches configuration.
So now let's test, are the PCs able to get IP addresses from the DHCP server and ping the loopback
of the router. The first thing we need to do on the PC is ensure that it's using DHCP.
And then we need to ensure that it's retrieved an IP address through DHCP, we can confirm that by using
the command IP config.
Notice in this example, it's retrieved an IP address of 10.1.10.1. Can it ping the switch?
Yes, it can.
Can it ping the router?
Yes, it can.
Can it ping the loopback of the router?
Yes, it can.
So that looks great.
What about PC 2?
We need to configure it to use DHCP, you can see here that it's already been allocated a gateway and
DNS server.
On the desktop, we can go to a command prompt and we can use the command IP config to verify whether
it got an IP address through DHCP, it has. So, can it ping the default gateway, the switch?
Yes, it can.
Can it ping the routers Ethernet interface?
Yes, it can. Can it ping the routers loopback address?
Yes, it can.
So that's looking great.
What about the PCs pinging each other?
So here's PC 1,
here;s PC 2, IP address on PC 1 is 10.1.10.18
ping 10.1.10.18, that works. I.P. address on this side is 10.1.20.13, so can PC
1 ping 10.1.20.13?
Yes, it can.
So at this point, we've got the lab working.
So can router 1 ping PC 2?
Yes, it can.
Can it ping PC 1?
Yes, it can, we can use the command help to see available commands on the PC.
One of those commands is Traceroute.
So traceroute to the loopback of the router. Notice the traffic goes to the switch
and then it goes to the router.
Traceroute to the router
same happens here.
What happens if we trace to PC 2 from PC 1 trace goes via the switch, so I'm happy with that.
We successfully configured the network.
Don't forget to save your configuration when you finished with your lab.
I always do that in the exam, just to be sure.
I hope you found this video and lab useful.