Static Trunk
Cheat sheet · https://pcornel.dk/topic.php?topic=591
Answer
A static trunk is configured with switchport mode trunk (and switchport nonegotiate to stop DTP), so the port is a trunk regardless of the neighbour.
Remember
Configure both ends statically. On switches that support ISL, set switchport trunk encapsulation dot1q before switchport mode trunk. Restrict the allowed VLAN list (switchport trunk allowed vlan <list>) and use add to extend it — without add, the command replaces the list.
First checks
show interfaces trunk— trunk ports, mode, encapsulation, native VLAN, allowed / active / forwarding VLANs.show interfaces <if> switchport— administrative and operational mode, negotiation, native VLAN.show dtp interface <if>— DTP state and negotiation.show spanning-tree interface <if>— per-VLAN STP state on the trunk.show cdp neighbors <if> detail— the neighbour's port, and native VLAN mismatch messages.
Commands
show interfaces switchport- Shows administrative/operational switchport mode, access VLAN, native VLAN and trunk details.
show interfaces trunk- Display trunk state, native VLAN and allowed/active VLANs.
switchport mode trunk- Make the port a static trunk.
switchport trunk native vlan <id>- Set the native VLAN of a trunk; it must match on both ends.
switchport trunk allowed vlan <list>- Set the VLANs allowed on a trunk (replaces the list).
switchport trunk allowed vlan add <list>- Add VLANs to the trunk allowed list.
switchport trunk allowed vlan remove <list>- Remove VLANs from the trunk allowed list.
show spanning-tree vlan <id>
Verify in this order
mode trunk on both ends → negotiation off → encapsulation 802.1Q → same native VLAN → allowed list as intended → VLANs forwarding
Where it usually breaks
physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path
Allowed VLAN command behavior
| Command | Effect | Risk |
|---|---|---|
switchport trunk allowed vlan <list> | Sets/replaces allowed list | Can accidentally remove existing production VLANs |
... add <list> | Adds VLANs | May expand segmentation unexpectedly |
... remove <list> | Removes VLANs | Immediately blocks removed VLANs locally |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=591