Octet

Why does show interfaces trunk list the VLANs four times, and how is the allowed list different from pruning?

Show the answer

Say this first

The sections narrow down: VLANs allowed by config; of those, the ones that exist and are active on this switch; of those, the ones in spanning-tree forwarding state on this port and not pruned. A VLAN has to survive all of them to cross. The allowed list is static config per trunk. VTP pruning is dynamic: a switch tells its neighbor which VLANs it needs, and the neighbor stops flooding the rest over that trunk.

Go deeper

Output
SW1# show interfaces trunk

Port        Mode             Encapsulation  Status        Native vlan
Gi1/0/48    on               802.1q         trunking      999

Port        Vlans allowed on trunk
Gi1/0/48    10,20,30,40

Port        Vlans allowed and active in management domain
Gi1/0/48    10,20,30

Port        Vlans in spanning tree forwarding state and not pruned
Gi1/0/48    10,20
  • VLAN 40 is allowed but does not exist in SW1's VLAN database, so it drops out of the second list.
  • VLAN 30 exists but is either blocked by spanning tree on this port or pruned. show spanning-tree vlan 30 tells you which: an Altn BLK role on Gi1/0/48 means STP.

Editing the allowed list safely

Cisco IOS
interface GigabitEthernet1/0/48
 switchport trunk allowed vlan add 50
 switchport trunk allowed vlan remove 40

Without add or remove, the command replaces the whole list.

VTP pruning

Enabled domain-wide with vtp pruning on a server. VLAN 1 and 1002 to 1005 are never pruned. switchport trunk pruning vlan limits which VLANs are eligible on a trunk.

Traps

  • Typing switchport trunk allowed vlan 50 on a live trunk. It removes every other VLAN.
How did you do?Book 3.2 Switched Ethernet