In this lab I use two Cisco WS-C2960-24TT [IOS 12.2(25)FX] switches to demonstrate how to span VLANs across switches via 802.1q trunking. I avoid using VTP by using “VTP transparent mode”; as a result, I have to configure the VLANs on both switches. Also, the Cisco 2960 switch only allows you to use 802.1q encapsulation. However, on some other Cisco switches the default encapsulation is a Cisco proprietary protocol called Inter-Switch Link (ISL). If you are using one of these switches and you want to use 802.1q instead of ISL, you will have to manually change the encapsulation type.
Both 802.1q and ISL are protocols that maintain VLAN information in Ethernet frames as traffic flows between switches and routers, or switches and switches. This allows multiple LAN traffic to pass through a single link.
The setup for this lab is shown in the below diagram. As you can see, VLAN 10 and VLAN 20 exist on both switches and each VLAN contains a single host on each switch.
The first thing I do is setup Switch0 as shown below.
Next, I setup Switch1 as shown below.
Finally, I perform a quick test from PC2 on Switch1 to make sure I can ping PC0 on Switch0; since both are in VLAN 10, this test is successful. I also try to ping PC1 on Switch0 from PC2 on Switch1; since this PC is on a different VLAN, the test fails. I show these results below.You should also run the same test to make sure hosts in VLAN 20 can communicate with each other across the trunk link.
Some helpful info to know is that there are four possible options you can use when using the “switchport mode” command; I describe each of these briefly below:
access – never trunk
trunk – always trunk
dynamic desirable – negotiate whether to trunk or not; initiates the process
dynamic auto – negotiate whether to trunk or not; does not initiate the process
Additionally, you can can see info on each trunk on a switch with the “show interface trunk” command; this is demonstrated below using Siwtch1.
Yes, good one.