Okay so let's start with the router, at the moment on the router.
No IP addresses are configured.
So the first thing we need to do is go on to the gigabit 000 interface and no shut it
and then we need to create sub-interfaces.
So notice I'm gonna choose .1 as the sub-interface for VLAN 1.
I'm gonna specify an encapsulation of .1Q using VLAN 1 as the native VLAN the management VLAN
is typically your untagged VLAN which by default is VLAN 1.
I can now configure the IP address of the router the last IP address in subnet 10.1.1.0/24 is
10.1.1.1.254. So do show run shows us the configuration of the first sub interface.
We now need to configure the second sub-interface which is VLAN 10.
You don't have to use the same numbers as the VLAN number that just makes it easier.
So I'm gonna specify VLAN 10.
This is not the native VLAN, IP address is 10.1.10.254.
So again show run
there is the configuration of VLAN 10 and then I need to create a third sub-interface for VLAN
20 encapsulation is gonna be .1Q VLAN 20 IP address is gonna be 10.1.20.254
/24.
So again there's the configuration of the physical interface VLAN 1 sub-interface, VLAN 10
sub-interface, VLAN 20 sub-interface.
The next thing we need to do is configure the switch so on the switch show IP interface brief no IP
addresses are configured VLAN 1 is administratively down at the moment. So CONFT interface of VLAN
1 no shut IP address 10.1.1.253/24 we've been told to only configure an IP address
in VLAN 1. So let's confirm that the switch can ping the router it can but that's not entirely correct
yet we still need to configure this interface as a trunk port VLAN 1 will work because it's the
native VLAN but other VLANs will not work. So switch port mode trunk we need to specify an encapsulation.
So switch port trunk encapsulation .1Q
and now we can make the port a trunk port.
So those two commands are required.
Interface went down, it's now come up again.
So show run.
They are the two commands in gigabit
101.
Can we still ping the router? At the moment it's not working but now it is.
It just took it a while to notice the pings have now succeeded.
Packet tracers showing green on the link.
So that looks good.
We now need to configure VLAN 10 and VLAN 20
and we need to put our PCs into those VLANs.
So our two PCs are connected to ports 102 and 103.
So interface gigabit.
102 switch port mode access, switch port access VLAN 10.
In this case interface gigabit
103 switch port mode access because it's a P.C. switch port access VLAN 20. So show run,
what have we configured? Gigabit 101 is a trunk port gigabit 102 and 103 are access ports 102
is in VLAN 10, 103 is in VLAN 20. So we can use commands such as show interface gigabit 101 switch
port to verify the configuration of an interface.
So this command shows us that gigabit
101 is configured as a trunk port and is operating as a trunk port.
The encapsulation used is .1Q access VLAN is VLAN 1 if we look at Interface gigabit
102 this port is an access port in VLAN 10 look at 103 this port is an access port in VLAN 20
so that looks good.
We've configured the VLANs on the switch we've configured the link between the router and the switch.
Now we need to confirm that the PCs can ping each other.
So on PC 1, we've been told to configure the PC with a static IP address the default gateway will be
the router on the PC. So I'll set both the default gateway and DNS to the router the IP address will
be 10.1.10.1 subnet mask is gonna be a /24 subnet mask. So on the command
prompt IP config we can see the configuration of the PC that's correct
per our instructions default gateway is wrong I should make that 10
always good to verify.
So do that again.
That looks better can we ping the default gateway?
Yes, we can.
So that's good do something similar on PC 2 default gateway will be 10.1.20.2
54 DNS server will be 10.1.20.254, IP address of the PC will be 10.
1.20.2 subnet mask will be /24 subnet mask open up a command prompt IP config
that looks good. Can we ping
the router?
Yes, we can.
Can we ping
PC 1? So ping 10.1.10.1
Yes, we can. So PC 2 is able to ping PC 1 and can PC 1 ping PC 2? Yes, it can.
So we've successfully configured this network with VLANs and inter VLAN routing using a router on
a stick.
So now let's do the extra work for credits.
How do we get everyone to talk to everyone? So on the switch
we need to configure an IP default gateway
pointing to the router in the same subnet at the switch. So ping 10.1.1.254,
that works.
Can the switch ping the first PC? At the moment it looks like it can't. Can it ping the second PC?
At the moment it looks like it can't.
When you use IP default gateway you need to ensure that routing is disabled.
In this example routing is enabled.
So we gonna say no IP routing because this is a layer 2 switch and not a layer 3 switch and that
should allow us to ping the pieces which it does.
So this is the lesson.
If you have IP routing enabled you don't use the default-gateway command.
So as soon as I enable IP routing on the switch the IP default gateway command is ignored by the switch
and the switch can't ping the pieces.
Now typically on switches, the default behavior is to have IP routing disabled.
So this is the default behavior. In this lab
however it was turned on.
So we need to verify that it's off so that we can ping the PCs using the IP default-gateway command.
So can PC 1 ping the switch, ping 10.1.1.253?
Yes, it can. Can PC 2 ping the switch?
Yes, it can.
So we successfully configured this network per our instructions.
Don't forget to save your configurations on your devices.
In the exam, you may have to use the command copy running-config startup-config.
Here I'm simply using the old command W R but I would suggest in the exam that when you finish save
your configurations. I hope you found this video useful.