Supporting Multiple VLANs on a Single Trunk
Configuring an 802.1Q trunk

The example shows how to configure interface FastEthernet 5/8 as an 802.1Q trunk. Frames from VLANS 1, 5, 11 and 1002-1005 will be allowed to traverse the trunk link. The switchport mode for the interface is trunk (on) and there are to be no DTP messages sent on the interface.

Example: Configuring a Port for 802.1Q Trunking
This example shows how to configure a port for 802.1Q trunking:

Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fastethernet 5/8
Switch(config-if)#shutdown
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport mode nonegotiate
Switch(config-if)#switchport trunk native vlan 99
Switch(config-if)#no shutdown
Switch(config-if)#end
Switch#exit
CAUTION:

Ensure that the native VLAN for an 802.1Q trunk is the same on both ends of the trunk link. If there is native VLAN mismatch, traffic cannot be transmitted correctly on the trunk.

Verify the 802.1Q Configuration

Example: Configure and Display Port Information for 802.1Q Dynamic Trunk Link
This example shows how to display port information for 802.1Q trunking:

Example: Displaying Trunk Information for 802.1Q Trunking
This example shows how to display trunk information for 802.1Q trunk links. Notice that the encapsulation type is n-802.1q, showing that DTP negotiated the trunking protocol with the other switch.