Trunks and Inter-VLAN Communication
1. What is a trunk?
Why?
It allows VLANs to remain separate while traveling over the same cable. Without trunking, only one VLAN could pass through a standard Ethernet cable.
2. Key concepts
3. Configuring a Trunk on a Switch
Select an interface
Access (config-if) mode
switchport mode trunk Activate the trunk mode switchport trunk allowed vlan 10,20,30 Allow only VLANs 10,20,99 to access this trunk switchport trunk native vlan 99 Set the native VLAN to identifier 99 show interfaces trunk
4. Communication between VLANs
Basic configuration on a router
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
interface gigabitethernet 0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
Each subinterface corresponds to a specific VLAN.