Command
Switchport Trunk Allowed Vlan
Use
Restricts the VLANs that can travel between a trunk on the switch.
Syntax
Switch(config-if)#switchport trunk allowed vlan <vlan #>
Example
In this example, allowed VLAN is set for int fa0/19 on SW3.
Copy
SW3(config)#int fa0/19
SW3(config-if)#switchport trunk allowed vlan 2
Here’s the trunk information for SW3 after the changes. Notice the ‘Port Vlans allowed on trunk for fa0/19’ section.
Copy
SW3(config-if)#do show int trunk
Port Mode Encapsulation Status Native vlan
Fa0/19 auto 802.1q trunking 1
Fa0/20 auto n-802.1q trunking 1
Fa0/21 auto n-802.1q trunking 1
Fa0/22 auto n-802.1q trunking 1
Port Vlans allowed on trunk
Fa0/19 2
Fa0/20 1-4094
Fa0/21 1-4094
Fa0/22 1-4094
Port Vlans allowed and active in management domain
Fa0/19 none
Fa0/20 1,10-20,55,99,555
Fa0/21 1,10-20,55,99,555
Fa0/22 1,10-20,55,99,555
Port Vlans in spanning tree forwarding state and not pruned
Fa0/19 none
Fa0/20 none
Fa0/21 1,10-11
Port Vlans in spanning tree forwarding state and not pruned
Fa0/22 none