Now at this moment PC 1 can ping PC 2
and that’s because the user interfaces, in other words, F2/0 on VLAN 1
and these ports are configured as trunk ports permitting all VLANs.
So to prove that show vlan switch on router 1
what you’ll notice is that FastEthernet port 2/2 is in VLAN 1.
On router 2 show vlan-switch the same is true there’s the command
FastEthernet 2/2 this port is configured in VLAN 1.
Looking at trunk ports so show int f2/1 switchport
This port 2/1 is configured as a trunk native VLAN is 1
and all VLANs are permitted.
Router 2 show int f2/1 switchport
native VLAN is 1 all VLANs are permitted same for 2/0
so trunk native VLAN is 1.
All VLANs are permitted.
So what happens if we put this port into VLAN 2, the pings should start failing.
at the moment the pings are succeeding on PC 1
so int 2/2 switchport mode access switchport access vlan 2
notice immediately the pings start failing.
If I go on to router 2 interface 2/2 switch port mode access.
So it’s an access port, switchport access vlan 2
So I’ve just moved both these ports into VLAN 2
and what should happen is our pings should start succeeding.
Now let’s look at Spanning Tree.
So show spanning-tree vlan 2
2/0 is forwarding on router 2, 2/1 is blocking on router 2
notice please the ping has started to succeed.
Let’s see 2/2 is forwarding, now it takes time for Spanning Tree to converge
but what we could do is go on to that port
and type spanning-tree portfast to allow it to converge quicker
I’ll do the same on router 1.
So both this ports have been configured as Portfast ports
do sh run int f2/2
Notice this port is configured in VLAN 2 and is a Portfast port.
I can do something similar, sh run int f2/2 do show run rather.
sh run int 2/2 this port is configured as a Portfast port in VLAN 2
but what I’ll do now is type switchport access vlan 3
pings should start failing which they do and then I’ll do the same on router 2
switchport access vlan 3 in other words, this port is in vlan 3 now
and I’m gonna move this port into vlan 3
and as soon as I did that notice the ping started succeeding
because we told Spanning Tree to use Portfast
in other words to forward immediately.
So I can do something similar, I'll set them to VLAN 2
pings failed do it in the second switch and ping start succeeding.
So I’ve just shown you how to move ports from 1 VLAN to another
and how to enable Spanning Tree Portfast on an EtherSwitch module
running within a Cisco IOS router within GNS3.