Trunking allows multiple VLANs to move between switches. This allows the MAC addresses that have been learned and stored in those VLANs to pass back and forth.
On SW3 and SW4, configure G2/0 - G2/2 as trunk links. Configure SW ports G0/0 and G0/1 as trunk links.
SW3 and SW4
interface range g2/0 - 2
switchport trunk encapsulation dot1q
switchport mode trunk
SW
interface GigabitEthernet0/0 - 1
switchport trunk encapsulation dot1q
switchport mode trunk
SW#show int trunk
Port Mode Encapsulation Status Native vlan
Gi0/0 on 802.1q trunking 1
Gi0/1 on 802.1q trunking 1
Port Vlans allowed on trunk
Gi0/0 1-4094
Gi0/1 1-4094
Port Vlans allowed and active in management domain
Gi0/0 1
Gi0/1 1
Port Vlans in spanning tree forwarding state and not pruned
Gi0/0 1
Gi0/1 none
SW3#show int trunk
Port Mode Encapsulation Status Native vlan
Gi2/0 on 802.1q trunking 1
Gi2/1 on 802.1q trunking 1
Gi2/2 on 802.1q trunking 1
Port Vlans allowed on trunk
Gi2/0 1-4094
Gi2/1 1-4094
Gi2/2 1-4094
Port Vlans allowed and active in management domain
Gi2/0 1,31-32,36,39,313-314,322-323
Gi2/1 1,31-32,36,39,313-314,322-323
Gi2/2 1,31-32,36,39,313-314,322-323
Port Vlans in spanning tree forwarding state and not pruned
Gi2/0 1,31-32,36,39,313-314,322-323
Gi2/1 1,31-32,36,39,313-314,322-323
Gi2/2 1,31-32,36,39,313-314,322-323
SW4#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gi2/0 on 802.1q trunking 1
Gi2/1 on 802.1q trunking 1
Gi2/2 on 802.1q trunking 1
Port Vlans allowed on trunk
Gi2/0 1-4094
Gi2/1 1-4094
Gi2/2 1-4094
Port Vlans allowed and active in management domain
Gi2/0 1,41-42,46,49,413-414,422-423
Gi2/1 1,41-42,46,49,413-414,422-423
Gi2/2 1,41-42,46,49,413-414,422-423
Port Vlans in spanning tree forwarding state and not pruned
Gi2/0 1,41-42,46,49,413-414,422-423
Gi2/1 41-42,46,49,413-414,422-423
Gi2/2 1,41-42,46,49,413-414,422-423
Both SW3 and SW4 show that the interfaces defined above have been enabled for trunking. You'll also notice that SW does not have the VLANs that SW3 and SW4 have. Either we can configure them manually or use VTP, which is the next lab.
On SW3 and SW4, configure G2/0 - G2/2 as trunk links. Configure SW ports G0/0 and G0/1 as trunk links.
SW3 and SW4
interface range g2/0 - 2
switchport trunk encapsulation dot1q
switchport mode trunk
SW
interface GigabitEthernet0/0 - 1
switchport trunk encapsulation dot1q
switchport mode trunk
SW#show int trunk
Port Mode Encapsulation Status Native vlan
Gi0/0 on 802.1q trunking 1
Gi0/1 on 802.1q trunking 1
Port Vlans allowed on trunk
Gi0/0 1-4094
Gi0/1 1-4094
Port Vlans allowed and active in management domain
Gi0/0 1
Gi0/1 1
Port Vlans in spanning tree forwarding state and not pruned
Gi0/0 1
Gi0/1 none
SW3#show int trunk
Port Mode Encapsulation Status Native vlan
Gi2/0 on 802.1q trunking 1
Gi2/1 on 802.1q trunking 1
Gi2/2 on 802.1q trunking 1
Port Vlans allowed on trunk
Gi2/0 1-4094
Gi2/1 1-4094
Gi2/2 1-4094
Port Vlans allowed and active in management domain
Gi2/0 1,31-32,36,39,313-314,322-323
Gi2/1 1,31-32,36,39,313-314,322-323
Gi2/2 1,31-32,36,39,313-314,322-323
Port Vlans in spanning tree forwarding state and not pruned
Gi2/0 1,31-32,36,39,313-314,322-323
Gi2/1 1,31-32,36,39,313-314,322-323
Gi2/2 1,31-32,36,39,313-314,322-323
SW4#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gi2/0 on 802.1q trunking 1
Gi2/1 on 802.1q trunking 1
Gi2/2 on 802.1q trunking 1
Port Vlans allowed on trunk
Gi2/0 1-4094
Gi2/1 1-4094
Gi2/2 1-4094
Port Vlans allowed and active in management domain
Gi2/0 1,41-42,46,49,413-414,422-423
Gi2/1 1,41-42,46,49,413-414,422-423
Gi2/2 1,41-42,46,49,413-414,422-423
Port Vlans in spanning tree forwarding state and not pruned
Gi2/0 1,41-42,46,49,413-414,422-423
Gi2/1 41-42,46,49,413-414,422-423
Gi2/2 1,41-42,46,49,413-414,422-423
Both SW3 and SW4 show that the interfaces defined above have been enabled for trunking. You'll also notice that SW does not have the VLANs that SW3 and SW4 have. Either we can configure them manually or use VTP, which is the next lab.