- Gold, 750 points or more
Frequent %CDP-4-NVLANMISMATCH or %CDP-4-NATIVE_VLAN_MISMATCH syslog messages are generated on the catalyst 6500 switch.
Frequent %CDP-4-NVLANMISMATCH or %CDP-4-NATIVE_VLAN_MISMATCH syslog messages are generated on the catalyst 6500 switch because either the native VLAN on the port is different from the one on the neighbor port, or different CDP versions run on each switch.
These are among some of the reasons for the syslog messages:
Trunking dot1q when the native VLAN is defined differently.
To resolve this issue, ensure the native VLAN for an 802.1q trunk is the same on both ends of the trunk link. If the native VLAN on one end of the trunk is different from the native VLAN on the other end, the traffic of the native VLANs on both sides cannot be transmitted correctly on the trunk. This can imply some connectivity issues in the network.
This sample output shows a 6506A switch running Catalyst OS (CatOS) that is trunking on port 3/1 to interface GigabitEthernet 3/2 on a 4507B switch running Cisco IOS software:
6506A> (enable) sh trunk * - indicates vtp domain mismatch # - indicates dot1q-all-tagged enabled on the port Port Mode Encapsulation Status Native vlan -------- ----------- ------------- ------------ ----------- 3/1 auto n-dot1q trunking 1
4507B#sh interfaces gigabitEthernet 3/1 trunk Port Mode Encapsulation Status Native vlan Gi3/2 desirable 802.1q trunking 2
The native VLANs do not match. Issue the set vlan command to change the native VLAN on a switch running CatOS or issue the switchport trunk native vlan command on a switch running Cisco IOS.
- Both ends are configured as access ports and are on two different VLANs.
When two switches are connected through the access ports and both are mapped to different VLANS, they do not communicate and also the Cisco Discovery Protocol (CDP) gives VLAN mismatch errors.
The concept of native VLANs comes into picture when 802.1q trunking is configured and the ports are configured as trunk ports. But when switches are connected through the ports that are configured as access ports, then the native VLAN is the VLAN that is assigned to the access ports.
The workaround for this issue is to configure both ports as trunk ports and allow only the needed VLANs on those trunk links. However, if they are configured as access ports, ensure that both ends are in the same VLAN.
To check the operational mode and verify whether the port is trunking or not, issue the show interfaces switchport command.
- Running two different versions of CDP
CDP version 2 has a Time Length Variable (TLV) field that carries native VLAN information. CDP version 1 does not. If a switch running version 2 receives a frame from a switch running version 1, it sees no native VLAN information and assumes the native VLAN is a zero. As its native VLAN would be a non-zero value, it does not generate this informational message.
Issue the show cdp command to check the CDP version running on both devices, as shown in this command output:
4003-E> (enable) sh cdp CDP: enabled Message Interval: 60 Hold Time: 180 Version: V2 Device Id Forma: Other
Issue the set cdp version command to change the CDP version if desired, as shown in this command output:
4003-E> (enable) set cdp version ? v1 Set CDP to version 1 v2 Set CDP to version 2
Note: CDP is Cisco proprietary. If either device is non-Cisco, the CDP version cause does not apply.