Configuring 802.1Q Trunking
Nerd Cafe
Scenario:
You have two Cisco switches, Switch1 and Switch2, and you want to set up an 802.1Q trunk between them. The trunk will carry traffic for multiple VLANs (for example, VLAN 10, VLAN 20, and VLAN 30) between the two switches.
The goal is for devices on different VLANs on different switches to communicate as if they are on the same network.
Network Topology:

Sw1 and Sw2 are connected via a trunk link, which is configured on their respective interfaces.
Step-by-Step Guide to Configuring 802.1Q Trunking:
Step 1: Initial Setup on Switch1
Access Switch1:
Open the command-line interface (CLI) of Sw1 using a console cable or SSH (if configured).
Configure VLANs on Switch1:
Define the VLANs that will be used on both switches. In this case, we are using VLAN 10, VLAN 20, and VLAN 30.
Configure the trunk port:
Let's say the trunk port on Switch1 will be FastEthernet 0/1.
Enter interface configuration mode and set it as a trunk port.
Verify the configuration:
Use the following command to verify that the trunk is correctly configured.
Step 2: Initial Setup on Switch2
Access Switch2:
Access the command-line interface (CLI) of Switch2.
Configure VLANs on Switch2:
Just like on Switch1, configure the same VLANs on Switch2.
Configure the trunk port:
Configure the trunk port on FastEthernet 0/1 on Switch2 (the same port used on Switch1).
Verify the configuration:
Again, verify that the trunk is working correctly.
Step 3: Verify Connectivity Between VLANs
Assign VLANs to Access Ports:
Now, you need to assign VLANs to the access ports on both switches so that devices in different VLANs can communicate.
On Sw1:
On Sw2:
Check the Trunk Link:
Verify that the trunk link is allowing multiple VLANs to pass by using the
show vlan briefcommand. The trunk should be carrying VLANs 10, 20, and 30.
On Sw1:
On Sw2:
Step 4: Testing the Configuration
Test Connectivity:
Connect devices to the access ports on each switch and test that they can communicate across the VLANs.
For example, if you have a device on VLAN 10 connected to Sw1, you should be able to ping the device on VLAN 10 connected to Sw2.
Keywords
802.1Q trunking, VLAN trunking, Cisco switch configuration, trunk port, VLAN tagging, switchport mode trunk, dot1q encapsulation, inter-switch communication, VLAN propagation, trunk link, Cisco CCNA, switchport access vlan, show interfaces trunk, VLAN management, switch configuration, network segmentation, access port, trunking protocol, Ethernet trunk, switch-to-switch connection, سیسکو
Last updated