How to configure VLAN trunk link and native VLAN
By default, all switch ports in Layer 2 are configured to operate as access links. Following example shows how to create and configure trunk link to carry multiple VLAN traffic and how to configure the native VLAN for a trunk link.
The above picture shows that the trunk link is connected to port fa0/24 on both switches. To configure the trunk link, open console connection to Switch 1 and enter the commands as shown below.
omnisecu.com.sw01>enable omnisecu.com.sw01#configure terminal Enter configuration commands, one per line. End with CNTL/Z. omnisecu.com.sw01(config)#interface fa0/24 omnisecu.com.sw01(config-if)#switchport mode trunk omnisecu.com.sw01(config-if)#switchport trunk native vlan 10 omnisecu.com.sw01(config-if)# %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/24 (10), with omnisecu.com.sw02 FastEthernet0/24 (1). omnisecu.com.sw01(config-if)#exit omnisecu.com.sw01(config)#exit omnisecu.com.sw01#
The CDP message "%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/24 (10), with omnisecu.com.sw02 FastEthernet0/24 (1)." shows that the native VLAN on other side of the trunk link is different from what we configured here.
To configure trunk link and native VLAN on Switch 2, open console connection to Switch 2 and enter the commands as shown below.
omnisecu.com.sw02>enable omnisecu.com.sw02#configure terminal Enter configuration commands, one per line. End with CNTL/Z. omnisecu.com.sw02(config)#interface fa0/24 omnisecu.com.sw02(config-if)#switchport mode trunk omnisecu.com.sw02(config-if)#switchport trunk native vlan 10 omnisecu.com.sw02(config-if)#exit omnisecu.com.sw02(config)#exit omnisecu.com.sw02#