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,30
Watch 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.

Open the lab

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

More Switching (VLAN/STP) commands

← Back to the full command reference