This is one of multiple videos discussing Layer 3 switching. In a previous video I showed you how to
configure a switch with layer 3 functionality.
So I showed you how to enable IP routing on a switch to allow that switch to route between one VLAN and
and another.
We also configured two routers to act as PCs and we were able to ping from one router to another.
What I'll do now is extend the topology by bringing in some docker PCs.
These are essentially lightweight PCs that allow us to boot up Linux very quickly.
So what I'll do on the first PC
is configure it in a fourth VLAN.
So I'll give it an IP address of 10 141 and a default gateway of 10 14 254. I'll also set the
DNS server to 10 14 254 and click save. I'll connect the PC to gigabit 02 on the switch
So these two ports are in VLAN 2 and 3
and what we'll do now is configure the port in VLAN 4. I'll start up the docker PC and open up a
a console to it.
So here's the console IF CONFIG shows us the IP address of the PC
one of the advantages of Docker is that it boots up extremely quickly.
So it was almost an instant boot.
Now the PC can ping the switch because we need to configure the switch.
So at the moment pings are failing.
So I'll go onto the switch and have a look at the interfaces configured,
so show IP interface brief.
Notice we don't have a layer 3 interface in VLAN 4. We need to configure this IP address on the
switch to allow that PC to ping out to VLAN 4.
We also need to configure VLAN 4 and put this interface into VLAN 4. So CONFT VLAN 4
show VLAN brief, we've now created a VLAN 4 and it's been added to the VLAN database.
That however does not create the SVI or virtual switched interface.
We need to type interface VLAN 4 to create the SVI and configure the IP address on the switch.
So show IP interface brief
the SVI is created. IP address is assigned but the interface is down.
So we need to no shut it, show IP interface brief again allows us to see the interface but it's currently
down because no interfaces have been allocated to that VLAN. So we need to put this interface into
VLAN 4, so switchboard access VLAN 4.
Now when we use the command show IP interface brief we should see that this interface comes up that
may not happen immediately but after a while, we should see that that interface comes up assuming that
gigabit 02 is in the right VLAN which it is and assuming that that interface is up pup which
it is. Noticed now VLAN 4 is up. So back on the PC
previously the PC couldn't ping its default gateway but now it can and hopefully it will be able to ping router
2, which it can
and we can prove that by looking at router 2.
I'm currently running a debug to show debug on router 2 shows that IP ICMP debugging is enabled. So
we should be able to ping router 2 and see the debugs which we do.
We should also be able to ping router 1 which we can once again this PC has an IP address of 10 1
41 on the router acting as PC 2.
We should be able to ping that PC which we can.
So we've now enabled three VLANs on this layer 3 switch I'll configure a fourth interface and
connecte it to the second docker PC I'll change the IP address of that PC
to 10.1.5.1 default gateways 10 15 254 and I'll set the DNS server to 10.1.5.254
clicks save, startup the PC open up a console to it, PCs booted.
So IF CONFIG IP address is 10 151 PC will not be able to paying the first PC on the left until we've
configured the switch. So I'll configure the switch while leaving that ping going in the background.
So first thing we need to do is configure a VLAN. So CONF T VLAN 5 in this case.
So show VLAN brief VLAN 5 is created PC can still not ping the other PC yet.
Because we have to put the interface into the right VLAN gigabit
03 is currently in VLAN 1. So interface gigabit 03 switch port access VLAN 5 show interface
gigabit interface 03 switch port. The port is now in VLAN 5
but the PC can still not ping PC1 because we have to create a switched virtual interface.
We have a switched virtual interface for VLAN 4 but not for VLAN 5.
So interface VLAN 5, IP address 10 15 254 I'll no shut it.
Interface VLAN 5 has come up show spanning tree ports are forwarding and pings are starting
to succeed.
So PC 2 can ping PC 1.
So I've now got four interfaces on this layer 3 switch configured for inter VLAN routing. I've configured
the VLANs and configured inter VLAN routing on the switch.
In other words it's acting as a layer 3 switch.
That's because IP routing is enabled.
If I disable IP routing on the switch the pings will fail.
Notice the sequence numbers at 49 and I stop there to find enable IP routing.
Notice the pings start succeeding once again.
You need to have IP routing enabled on a switch to allow it to do inter VLAN routing as well as to
allow it to support routing protocols.
So that was an example of how to configure a layer 3 switch into VLAN routing.
I hope you found the video useful if it's been of benefit to you.
Please subscribe to my YouTube channel.
I wish you all the very best.