show interfaces trunk
Verify inter-switch trunk links are carrying the correct VLANs and identify which VLANs are being pruned or blocked.
Definition: show interfaces trunk is a Cisco IOS privileged exec command. Displays all trunk ports including the trunking encapsulation (802.1Q or ISL), the native VLAN, VLANs allowed on the trunk, VLANs in the spanning tree forwarding state, and VLANs active in the management domain.
Overview
The 'show interfaces trunk' command is a vital diagnostic tool for Cisco network engineers, providing a comprehensive view of all trunk ports on a switch. Trunking is a fundamental concept in VLAN management, allowing multiple VLANs to traverse a single link between switches or between a switch and a router. This command displays the status of trunk interfaces, including the trunking mode (e.g., trunk, dynamic desirable, dynamic auto), encapsulation type (802.1Q or ISL), allowed VLAN list, and VLANs that are active and pruned.
It is essential for verifying trunk configuration, troubleshooting VLAN connectivity issues, and ensuring that VLAN traffic is correctly permitted or denied across trunk links. Unlike 'show interfaces switchport', which shows switchport mode and access VLAN, 'show interfaces trunk' focuses specifically on trunking parameters and is the go-to command for checking trunk negotiation results, native VLAN mismatches, and pruning behavior. In a typical workflow, after configuring trunk interfaces, an engineer uses this command to confirm that the trunk is operational and that the desired VLANs are allowed.
It also helps identify issues such as VLANs not being forwarded due to pruning or VTP restrictions. The command runs in privileged EXEC mode (enable) and does not affect the running configuration; it reads from the switch's operational state. Output can be lengthy on switches with many trunk ports, so using filters like 'show interfaces trunk | include' can help isolate specific interfaces.
Understanding this command is crucial for CCNA and CCNP candidates as trunking is a core topic in switching technologies.
show interfaces trunkWhen to Use This Command
- Confirm a trunk formed between two switches after DTP negotiation
- Verify which VLANs are allowed and actively forwarding across a trunk
- Troubleshoot VLAN reachability — VLAN missing from 'VLANs in spanning tree forwarding' means traffic is blocked
- Identify native VLAN mismatches between switches
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| interface-id | e.g., GigabitEthernet0/1 | Specifies a particular interface to display trunk information for. If omitted, the command shows trunk status for all interfaces. Common mistake: using the wrong interface type or number, or forgetting that the interface must be a trunk port. |
Command Examples
Show all trunk ports and active VLANs
Switch# show interfaces trunk Port Mode Encapsulation Status Native vlan Gi1/0/24 on 802.1q trunking 1 Port Vlans allowed on trunk Gi1/0/24 1-4094 Port Vlans allowed and active in management domain Gi1/0/24 1,10,20,30,100 Port Vlans in spanning tree forwarding state and not pruned Gi1/0/24 1,10,20,30,100
Understanding the Output
Four sections: (1) Port/Mode/Encapsulation/Status/Native VLAN — basic trunk info. (2) VLANs allowed — all VLANs permitted by switchport trunk allowed vlan. (3) Active in management domain — VLANs that actually exist on the switch (created via vlan database). (4) Forwarding and not pruned — VLANs STP is forwarding and VTP is not pruning. A VLAN missing from section 4 is not passing traffic.
Configuration Scenarios
Verify Trunk Configuration Between Two Switches
A network engineer has configured a trunk link between SwitchA and SwitchB using 802.1Q encapsulation. They need to verify that the trunk is operational and that VLANs 10, 20, and 30 are allowed.
Topology
SwitchA(Gi0/1)---trunk---(Gi0/1)SwitchBSteps
- 1.Step 1: On SwitchA, enter privileged EXEC mode: enable
- 2.Step 2: Run the command: show interfaces trunk
- 3.Step 3: Verify that interface GigabitEthernet0/1 appears in the output with mode 'trunk' and encapsulation '802.1q'.
- 4.Step 4: Check the 'Vlans allowed on trunk' list to confirm VLANs 10,20,30 are present.
- 5.Step 5: Ensure the 'Vlans in spanning tree forwarding state' includes these VLANs.
! On SwitchA and SwitchB interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20,30 !
Verify: SwitchA# show interfaces trunk Port Mode Encapsulation Status Native vlan Gi0/1 trunk 802.1q trunking 1 Port Vlans allowed on trunk Gi0/1 10,20,30 Port Vlans in spanning tree forwarding state and not pruned Gi0/1 10,20,30
Watch out: If the native VLAN is not the default (VLAN 1), ensure both sides match; otherwise, spanning tree may block the port.
Troubleshoot VLAN Not Passing Over Trunk
A user in VLAN 50 cannot reach resources on another switch. The trunk link between the switches is up, but VLAN 50 traffic is not passing. The engineer suspects pruning or allowed VLAN list issues.
Topology
SwitchA(Gi0/1)---trunk---(Gi0/1)SwitchBSteps
- 1.Step 1: On SwitchA, run: show interfaces trunk
- 2.Step 2: Check if VLAN 50 appears in the 'Vlans allowed on trunk' list. If not, the allowed list needs modification.
- 3.Step 3: If allowed, check 'Vlans in spanning tree forwarding state and not pruned'. If VLAN 50 is missing, it may be pruned by VTP or manually.
- 4.Step 4: Verify VTP configuration: show vtp status. If VTP pruning is enabled, ensure VLAN 50 is not pruned.
- 5.Step 5: Check if VLAN 50 exists in the VLAN database: show vlan brief.
! Add VLAN 50 to allowed list if missing interface GigabitEthernet0/1 switchport trunk allowed vlan add 50 !
Verify: SwitchA# show interfaces trunk Port Vlans allowed on trunk Gi0/1 10,20,30,50 Port Vlans in spanning tree forwarding state and not pruned Gi0/1 10,20,30,50
Watch out: If VTP pruning is enabled, VLAN 50 might be pruned if it is not active on the other switch. Ensure VLAN 50 exists on both switches.
Troubleshooting with This Command
When troubleshooting trunk issues, 'show interfaces trunk' is the first command to use. A healthy trunk shows the interface in 'trunking' status with the correct encapsulation (802.1Q) and native VLAN. Key fields to examine: 'Mode' should be 'trunk' or 'dynamic desirable' (if negotiated); 'Encapsulation' should be '802.1q' (or 'isl' for older networks); 'Status' must be 'trunking' (if it says 'not-trunking' or 'blocking', there is a problem).
The 'Vlans allowed on trunk' list shows which VLANs are permitted; if a VLAN is missing, traffic for that VLAN will not pass. The 'Vlans in spanning tree forwarding state and not pruned' list indicates which VLANs are actively forwarding; if a VLAN is not in this list, it may be blocked by STP or pruned by VTP. Common symptoms: 'trunking' status but no traffic for certain VLANs often points to allowed VLAN list misconfiguration.
If the trunk is 'down' or 'not-trunking', check physical connectivity, port mode mismatch (one side trunk, other access), or encapsulation mismatch. Native VLAN mismatch can cause the trunk to be blocked by STP; the output shows the native VLAN per port. To correlate with other commands: use 'show interfaces switchport' to see the administrative mode and access VLAN; 'show vlan' to verify VLAN existence; 'show spanning-tree' to check STP state per VLAN.
A step-by-step diagnostic flow: 1) Check trunk status with 'show interfaces trunk'. 2) If trunk is down, check interface status with 'show interfaces'. 3) Verify port mode and encapsulation on both ends. 4) Ensure allowed VLAN list includes the needed VLANs. 5) Check VTP pruning if VLANs are missing from forwarding list. 6) Use 'debug trunk' (with caution) to see negotiation details. Remember that 'show interfaces trunk' only shows trunk ports; if an interface is not trunking, it won't appear.
CCNA Exam Tips
CCNA exam: the most important column is 'VLANs in spanning tree forwarding state and not pruned'
If a VLAN appears in allowed but not here, either STP is blocking it or VTP pruning removed it
Troubleshoot VLAN issues by checking all four sections in order
Native VLAN must match on both ends of the trunk or CDP sends a warning
Common Mistakes
Forgetting that a VLAN must be created (show vlan brief) AND allowed on the trunk AND not pruned before traffic flows
Assuming dynamic auto ports automatically become trunks — they only trunk if the far end is dynamic desirable or on
Not checking native VLAN mismatch which causes CDP errors and security issues
show interfaces trunk vs show vlan brief
Both commands deal with VLAN information but serve different purposes: show interfaces trunk focuses on trunk port operational status and allowed VLANs, while show vlan brief lists VLAN definitions and access port assignments. They are often confused because both involve VLANs and trunking, but one is interface-centric and the other is VLAN-centric.
| Aspect | show interfaces trunk | show vlan brief |
|---|---|---|
| Scope | Trunk interfaces only | All VLANs in the VLAN database |
| Data type | Operational state of trunk links | Configuration definition of VLANs |
| Interface focus | Shows per-interface trunk details (encapsulation, native VLAN, allowed VLANs) | Shows per-VLAN access port membership |
| VLAN listing | Lists VLANs allowed, active, and forwarding per trunk | Lists all VLANs with ID, name, status, and access ports |
| Configuration vs operational | Shows operational status (e.g., STP forwarding state) | Shows database configuration (e.g., VLAN status active/suspended) |
| Typical use | Troubleshooting trunking issues and verifying allowed VLANs | Inventory of VLAN definitions and port assignments |
Use show interfaces trunk when you need to verify trunk encapsulation, native VLAN, or which VLANs are allowed and active on a specific trunk link.
Use show vlan brief when you need a quick overview of all configured VLANs and which access ports belong to each VLAN.
Platform Notes
In IOS-XE (e.g., Catalyst 3650/3850), the 'show interfaces trunk' command syntax and output are identical to classic IOS. However, on newer platforms running IOS-XE 16.x, the output may include additional fields like 'Vlans in STP forwarding state' with more detail. On NX-OS (e.g., Nexus 9000), the equivalent command is 'show interface trunk' (note: 'interface' singular).
The NX-OS output is similar but uses different formatting; for example, it shows 'Trunk' status and 'Allowed VLANs' in a single line. NX-OS also supports 'show vlan' for VLAN information. On ASA firewalls, trunking is not typically used; instead, subinterfaces with VLAN IDs are common.
The command does not exist on ASA. For IOS-XR (e.g., ASR 9000), trunking is handled differently with VLAN subinterfaces; the command 'show interfaces' can be used to see trunk status, but there is no direct equivalent. In older IOS 12.x, the command output may show ISL encapsulation if configured; modern IOS 15.x and 16.x default to 802.1Q.
Always ensure the switch supports the encapsulation type. On some platforms, the command may require higher privilege levels (e.g., 15) but typically works at privilege level 1 (user EXEC) with limited output; full output requires privileged EXEC (level 15).
Related Commands
show vlan brief
Displays a summary of all VLANs in the switch database including VLAN ID, name, status, and the access ports assigned to each VLAN.
switchport mode access
Statically configures a switch port as an access port, disabling all DTP negotiation so the port permanently carries traffic for a single VLAN and can never negotiate to trunk mode.
switchport nonegotiate
Disables DTP (Dynamic Trunking Protocol) frame generation on a switch port, preventing the port from actively negotiating trunk mode with the connected device.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions