The major difference between a regular VLAN and the native VLAN is that frames from/to the native VLAN are carried untagged.
The native VLAN is the one into which untagged traffic will be put when it’s received on a trunk port. This makes it possible for your VLAN to support legacy devices or devices that don’t tag their traffic like some wireless access points and simply network-attached devices.
Traffic sent and received on a native VLAN interface does not have an 802.1q tag inserted. The frame is sent as if 802.1q was not configured. When a switch running 802.1q receives a frame with no tag, it is assumed to be part of the native VLAN. Default native VLAN is 1.
- IEEE 802.1Q supported feature
- Frame without a tag is considered native VLAN traffic
- Must match on both ends of the trunk
- By default, the native VLAN is 1
- Can be changed using the switchport trunk native vlan command
you might have a scenario where different devices connect to a hub, and the hub connects to the switch port. The native VLAN would support devices using the hub that doesn’t understand VLAN tags while other devices on the hub do support VLAN tags. (This isn’t much of a common setup today, but during the transition from hubs to switches, it might have been encountered.
Why Native Vlan must be matched ?
If native VLAN differs between switches then it won’t break the trunk rather CDP throws an error message. for example, if you connect switch A to switch B, their native VLAN must be VLAN x on both switches. But if any Switch A has VAN x and Switch B has VLAN Y then you get an error message.
Let’s say you have 2 switches connected via a trunk port and you create VLAN 2 on both switches and on one end of the trunk you modify the NATIVE VLAN to be VLAN2 and on one end you kept the native VLAN as VLAN 1 . so if the first switch (with NATIVE VLAN 1 on the trunk) receives a frame from VLAN1 and decides it needs to send the frame on the trunk port, it will see that the frame was issued from VLAN1 which is the NATIVE VLAN on the trunk port it will send the frame out the trunk port UNTAGGED. Now when switch 2 receives the frame, it sees it is untagged and it will associate the frame with its NATIVE VLAN which is VLAN2. with the CDP message saying “native VLAN mismatch,” the problem is not the error message but the thing that you could have L2 loops in the network or frames hopping between VLAN 1 and VLAN 2.
So when there would be miss matched the native vlans in that case the CDP will show you the error .CDP basicall sets the falgs of native miss match and it wil show you in your CLI.
June 12 14:01:01: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with ris12.gie.intra FastEthernet0/2 (301). June 12 14:01:01: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with ris12.gie.intra FastEthernet0/2 (301). June 12 14:01:01: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with ris12.gie.intra FastEthernet0/2 (301).