A VLAN trunk link carry 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, we shall in the coming article.
Switch port configured as a trunk normally send and receive IEEE 801.q VLAN tagged Ethernet frames. In this case, if a switch receives untagged Ethernet frames on its trunk port, they forward frame 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 Switch0 and Switch1 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 specify the list of allowed VLANs on the trunk link.
In Figure 2, VLANs 10 and 20 supporting admin and account sections of an organization.Host-1, host-2, and host-7 are the members of VLAN-10 and host-3, host-4, host-5 and host-6 are the members of VLAN-20. The GigabitEthernet 0/2 on both switches trunk port and forwards traffic for VLANs 10 and 20. VLAN 30 is 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 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 same on both sides, Cisco IOS Software reports errors.
Reset Trunk link to Default State
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.