In 802.1Q trunking, all VLAN packets are tagged on the trunk link, except the native VLAN. The native VLAN packets are sent untagged on the trunk link. Therefore, the native VLAN must be the same on both switches configured for trunking. This makes it easy to deduce to which VLAN a frame belongs when a frame is received with no tag. By default, VLAN 1 is the native VLAN on all switches.
Cisco CatOS trunk Configuration:
1) To enable the trunk issue “set trunk mod/port [auto | desirable | on | nonegotiate | off]“ command.
2) To Specify the encapsulation issue "set trunk mod/port [negotiate | isl | dot1Q]" command.
3) The native VLAN can be changed when the "set vlan vlan-id mod/port command is issued", where mod/port is the trunk port.
4) To Manually remove VLANs from a trunk link issue "clear trunk mod/port vlanlist" command.
5) After configuring a port for trunking, issue "show trunk [mod] [mod/port]"commands to verify the VLAN port assignments.
Example: SW1> enable SW1> set trunk 6/5 on dot1q 2-3,10,20,30,69,96,100
This example sets port 6/5 to the 802.1q standard, and only allows VLANs 2-3,10,20,30,69,96, and 100 to go across it.
Cisco IOS trunk Configuration:
1) To enable the trunk issue “switchport mode trunk“ command.
If you want to enable trunking and not send any DTP signaling, issue the "switchport nonegotiate" for switches that support that function.
Many Cisco switches use an automatic trunking mechanism known as the Dynamic Trunking Protocol (DTP), which allows a trunk to be dynamically established between two switches.Issue "switchport mode dynamic [auto | desirable]" command under interface to dynamically trunk between switches.. If one side of the link is configured to trunk and will send DTP signals, the other side of the link will dynamically begin to trunk if the options match correctly.
2)To Specify the encapsulation issue "switchport trunk encapsulation [negotiate | isl | dot1Q]" under interface mode.
3) The native VLAN can be changed when the "switchport trunk native vlan vlan-id" interface command is issued, which is configured on the trunk port.
4)To Manually remove VLANs from a trunk link issue "switchport trunk allowed vlan remove vlanlist" command.
5)After configuring a port for trunking, issue "show interface trunk" command to verify the VLAN port assignments.