Switching (VLAN/STP)
switchport trunk allowed vlan <list>
Limit which VLANs traverse the trunk. Use 'add'/'remove' to modify.
Works on: SwitchMode: iface
Example
SW1(config-if)# switchport trunk allowed vlan 10,20,30Watch out
It does not make the port a trunk — 'switchport mode trunk' still has to be typed. 'add' on a trunk that already allows all VLANs changes nothing.
Run this command live
Don't just read it — type switchport trunk allowed vlan <list> in a real network simulator in your browser and watch it take effect. No install, no account needed to start.
Frequently asked
What does the "switchport trunk allowed vlan <list>" command do?
Limit which VLANs traverse the trunk. Use 'add'/'remove' to modify.
What's the common gotcha with "switchport trunk allowed vlan <list>"?
It does not make the port a trunk — 'switchport mode trunk' still has to be typed. 'add' on a trunk that already allows all VLANs changes nothing.
Example of "switchport trunk allowed vlan <list>"
SW1(config-if)# switchport trunk allowed vlan 10,20,30