Once VLANS have been defined on a switch and you have placed ports into their corresponding VLANS, traffic is limited to remain inside it’s Virtual LAN. The only way for traffic to leave the switch, is to have it sent on a port that is in the same VLAN as its source, or sent over a Trunk port.
A Trunk port is a port that has been configured to send and receive traffic from ANY and ALL VLANS.
In order to send traffic over a trunk port, the original information about the VLAN needs to be maintained. Since multiple VLANS will be sent over a single cable / port, the next switch or router would not be able to identify which VLAN it needs to belong to without some type of identification process.
There are currently 2 supported methods on Cisco switches and routers for maintaining the VLAN information over a trunk.
- 802.1Q – Otherwise known as ‘dot1q’
- ISL – Inter-Switch Link (Cisco proprietary protocol)
Below is the minimum configuration required for configuring a trunk port. Please note, the same would need to be done on the switch on the other end of the cable as well.
AOIP.ORG_Switch# conf t
AOIP.ORG_Switch(config)# interface g 0/1
Enter the interface mode
AOIP.ORG_Switch(config-if)# switchport trunk encapsulation dot1q
Define the trunking protocol as dot1q or isl
AOIP.ORG_Switch(config-if)# switchport mode trunk
Force the mode of the port to be a trunk port
AOIP.ORG_Switch(config-if)# no shut
Activate the interface
Below is the live demo: