Troubleshooting VLANs and Trunks in CCNA Networks
VLAN and trunking issues are typically caused by mismatched native VLANs, incorrect port modes, allowed VLAN list misconfigurations, or native VLAN tagging inconsistencies.
Identifying Native VLAN Mismatches
A frequent trunking issue is the **native VLAN mismatch**. When two connected switches have different native VLANs configured on their trunk ports, CDP will report a mismatch. This can lead to traffic spanning-tree loops or leaking between VLANs. Use the `show interfaces trunk` and `show interfaces switchport` commands to verify the native VLAN settings on both ends of the link.
Verifying Trunk Port Modes
Another common pitfall is incorrect port modes. A trunk requires compatible modes on both sides (e.g., dynamic desirable to dynamic auto, or trunk to trunk). If both sides are set to dynamic auto, a trunk will never form. Use `show interfaces [type/number] switchport` to check the administrative and operational modes of the interface.
Checking Allowed VLANs
Even if a trunk is formed, traffic might not cross it if the VLAN is pruned from the allowed list. The `switchport trunk allowed vlan` command controls which VLANs traverse the link. If a newly created VLAN isn't explicitly added using the `add` keyword (e.g., `switchport trunk allowed vlan add 10`), it will be blocked. Verify allowed VLANs using `show interfaces trunk`.
❓ Frequently Asked Questions
What happens if both ends of a link are set to dynamic auto?
The link will remain in access mode and a trunk will not form, because neither side actively attempts to initiate trunking.
How do you check which VLANs are active on a trunk?
Use the command 'show interfaces trunk' to view the trunking status, native VLAN, and the list of allowed and active VLANs.
Why is a native VLAN mismatch dangerous?
It can cause traffic from one VLAN to leak into another VLAN, compromising network security and potentially causing routing loops.