As discussed previously, about 802.1Q, a trunk port can receive both tagged and untagged traffic. Any traffic the switch receives untagged is forwarded on the native VLAN. By default, the native VLAN is VLAN 1.
To configure the native VLAN for a trunk, follow these steps:
SW1(config)#interface f0/1 SW1(config-if)#switchport trunk native vlan vlan-id SW1(config-if)#end SW1#show interfaces f0/1 switchport SW1#sh interface f0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode: dynamic desirable Operational Mode: trunk Administrative Trunking Encapsulation: negotiate Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 10 Administrative Native VLAN tagging: enabled Voice VLAN: none
The command to set the native VLAN for a trunk is
switchport trunk native vlan vlan-id. You then can verify your configuration by showing the switchport configuration of the interface. When trunk interfaces do not share the same native VLAN you will see a message displayed on the console:
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (10), with SW2 FastEthernet0/1 (20).
What could happen if the native VLANs are mismatched? Spanning tree will block the port as being inconsistent:
%SPANTREE-2-BLOCK_PVID_PEER: Blocking FastEthernet0/1 on VLAN0010. Inconsistent peer vlan.