Incorrect VLAN configuration
We’ve learned that VLAN is a means of transmitting packets across a switched network via a trunk link, also for traffic from a VLAN to be transmitted across a trunk it has to be allowed access on the trunk. The command used to do this is the switchport access trunk allowed vlan add {vlan-id }command. In the topology diagram below, VLAN 20 (Sales dept) and computer PC5 have been added to the network. This is to show that the VLANs allowed on the trunk are 10, 20, and 99.
In this example, computer (PC5) cannot connect to the sales department e-mail server.
We will start by verifying the trunk port in SW1 using the show interfaces trunk command:
SW1#show interface trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 99
Fa0/3 on 802.1q trunking 99
Port vlans allowed on trunk
Fa0/1 10, 99
Fa0/3 10, 99
…
SW1#
The output of the command above shows that the F0/3 interface on switch SW1 reveals that interfaces F0/1 and F0/3 only allow VLANs 10 and 99.
Using the same show interfaces trunk command on SW3:
SW3#show interface trunk
Port Mode Encapsulation Status Native vlan
Fa0/3 on 802.1q trunking 99
Port vlans allowed o trunk
Fa0/3 10,20,99
Port Vlans allowed active in management domain
Fa0/3 10,20,99
Port Vlans in spanning tree forwarding state and not pruned
Fa0/3 10,20, 99
The interface Fa0/3 on switch SW3 is correctly configured to allow VLANs 10, 20, and 99. While the interface fa0/3 on switch SW1 is incorrectly configured to allow only 10 and 99. This suggests that there is configuration error on SW1.
Solution:
The Fa0/1 and the Fa0/3 ports on SW1 need to be reconfigured using the switchport trunk allowed vlan 10, 20, 99 command.
e.g
SW1#config t
SW1(config)#interface fa0/3
SW1(config-if)#switchport trunk allowed vlan 10,20,99
SW1(config-if-)#end
SW1#
Then use the show interfaces trunk command to very your configuration
SW1#show interface trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 99
Fa0/3 on 802.1q trunking 99
Port Vlans allowed on trunk
Fa0/1 10, 20, 99
Fa0/3 10, 20, 99
…
The output above shows that VLANs 10, 20, and 99 are now added to the Fa0/1 and Fa0/3 ports on switch SW1.
Connectivity can also be verified by pinging from the PC5
PC5>192.168.20.10
Pinging 192.168.20.10 with 32 bytes of data:
Reply from 192.168.20.10: Reply from 192.168.10.30: bytes-32 times-147ms TT-128
Reply from 192.168.20.10: Reply from 192.168.10.30: bytes-32 times-147ms TT-128
Reply from 192.168.20.10: Reply from 192.168.10.30: bytes-32 times-147ms TT-128