Troubleshooting notes · Switching

Native VLAN mismatch on a trunk: what CDP and spanning tree do

CDP reports a native VLAN mismatch on a trunk. What it means, why traffic in that VLAN stops, and the fix. Real output from Cisco IOS XE 17.18.

The symptom

The trunk is up, but CDP keeps logging a native VLAN mismatch, and traffic in one VLAN doesn't cross the link:

SW1# show logging | include NATIVE
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on Ethernet0/0 (99), with SW2 Ethernet0/0 (1).

SW2# show interfaces trunk | include Et0/0
Et0/0          auto             802.1q         trunking      1

Why it happens

On an 802.1Q trunk, frames in the native VLAN are sent untagged. If the two ends use different native VLANs, untagged frames sent in VLAN 99 on one side arrive in VLAN 1 on the other, so the two VLANs leak into each other. CDP notices the mismatch and logs it every minute.

Spanning tree protects against the leak: it blocks the inconsistent native VLAN on that port, so VLAN 99 isn't forwarded there until the mismatch is fixed.

The fix

Use the same native VLAN on both ends of the trunk:

SW2(config)# interface Ethernet0/0
SW2(config-if)# switchport trunk native vlan 99

Check it

show interfaces trunk should show the same native VLAN on both switches, and the CDP messages should stop.

Practise this fault

This fault is in ENCOR Lab 06 of ENCOR Core Labs: a ready-made GNS3 project where you find and fix it yourself, alongside the other faults in the ticket, with the tested solution.

Or start with 15 free labs (5 each from CCNA, ENARSI and ENCOR), by email:

We’ll email you the download links and occasional lab tips. Unsubscribe with one click, any time. Your address is never shared.