A VLAN trunk link carries multiple VLAN traffic between multiple switches unless we restrict the traffic of VLAN manually or dynamically. Port configuration is required at both ends of the physical link with similar sets of commands. The switchport mode trunk command changes port mode permanently to trunking. We can also use DTP for trunking.
Switch port configured as a trunk normally send and receive IEEE 802.1Q VLAN tagged Ethernet frames. In this case, if a switch receives untagged Ethernet frames on its trunk port, they forward frame to the VLAN configured on the Switch as native VLAN.
Both sides of the trunk link must be configured to be in same native VLAN. Analyze the following diagram that consists of two switches and two VLANs. The link between the Sw-1 and Sw-2 has configured as a trunk.
The Cisco IOS switchport trunk native vlan vlan-id command specifies a native VLAN (other than VLAN 1). In the example, VLAN 30 is native VLAN. The IOS command switchport trunk allowed vlan vlan-list specifies the list of allowed VLANs on the trunk link.
In Figure 2, VLANs 10 and 20 supporting admin and IT sections of an organization.PC-2, PC-3 and PC-4 are the members of VLAN-10. PC-1, PC-5 and PC-6 are the members of VLAN-20. The GigabitEthernet 0/1 on both switches configured as a trunk port and forwards traffic for VLANs 10 and 20. VLAN 30 is a native VLAN, and it has no network because it is an unused VLAN.
We have selected Cisco Catalyst 2960 switches which automatically use 802.1Q encapsulation on trunk links. Other switches may need the manual configuration of the encapsulation.
The command for manual encapsulation is switchport trunk encapsulation dot1q. Both ends of a trunk link required same native VLAN, If 802.1Q trunk configuration is not the same on both sides, Cisco IOS Software reports errors.
After resetting the trunk to its default state, the trunk allows all VLANs and uses VLAN 1 as the native VLAN. The table below displays the command to reset all trunking configuration of a trunking interface to the default settings.
We can verify the resetting and reconfiguration of the trunk to its default state using show interfaces interface switchport command.
Verifying Trunk Configuration
We can verify the trunk configuration of switch port with the show interfaces interface-ID switchport command.