CCNA Lab: Configuring Trunks

Lab Overview

In this free CCNA lab, we will be configuring trunk interfaces, which is an important topic for networks that take advantage of the use of VLANs. Trunks are interfaces on links between two network devices, usually switches. They are very important in networks because they allow traffic of multiple VLANs to be carried over a single link simultaneously, and also enable VLANs to be extended across a network. In my VLAN configuration lab, I mentioned VLANs can be used all across a network – trunks are what allow that to work, and are required.

In this lab, we will cover the following:

  • Configuring switchports for trunk mode
  • Configuring allowed VLANs on trunks

I have provided a free Packet Tracer lab to go with this post. If you already have an idea of how to configure trunks, I would challenge you to attempt to complete the lab on your own. If you have trouble, feel free to come back and use this guide as a reference.

(Completed lab available here)

VLAN IDMembersGateway
10PC0, PC5192.168.10.254
40PC4, PC5192.168.40.254


  1. Determine which links in the topology need to be trunks and which ports need to be trunk ports
  2. Configure switchports for trunk mode
  3. Allow the appropriate VLANs on each trunk port
  4. Verify trunk interfaces
  5. Verify all PCs can ping each other

Note: Everything in this lab has been configured except for the trunks. Pinging between PCs should be successful if the trunks are configured correctly. Inter-vlan routing is already configured and is not in the scope of this lab.

1Determining which Links need to be Trunks and which Ports need to be Trunk Ports

Determining where trunks need to go is the first part of understanding what trunks are used for. As mentioned previously, trunks are usually links between two network devices. In this case, between two switches. We want to put trunks between all switches in the topology so that VLANs can traverse the network correctly. Trunks are required to pass VLAN information between switches. The ports on a switch that faces another switch will need to be configured for trunk mode. In this topology, FastEthernet ports 1-2 on the lower three switches, and port GigabitEthernet0/1 for the link between the upper two switches.

Note: Dynamic Trunking Protocol (DTP) can be used for switches to automatically negotiate if a link needs to be a trunk or not, but it is not widely used today. It comes with its own problems. DTP is not in the scope of this lab.

2. Configure Switchports for Trunk Mode

Switchports can operate in two modes: access and trunk. Access mode is used when there is an end device such as a computer or printer connected to it. Alternatively, trunk mode is used when there is a network device such as another switch or access point connected. Configuring a port to operate in trunk mode is extremely simple. To do this, all you have to do is go into the interface that you want a trunk formed on and enter the command switchport mode trunk. See the example below.

S2(config)#interface fastEthernet 0/1
S2(config-if)#switchport mode trunk

Some switches support the legacy ISL method of tagging and may give you a warning message saying “Command rejected: An interface whose trunk encapsulation is “Auto” can not be configured to “trunk” mode.” This message indicates the interface is configured to auto-negotiate what trunking protocol to use. You will have to enter the command switchport trunk encapsulation dot1q before you are able to input switchport mode trunk. You will need to do this on S1.

3. Allow VLANs on Each Trunk Port

On Cisco devices, trunks will allow all VLANs by default. You could simply leave the configuration as is and it should work, but it is best practice to only permit VLANs that are being used on your network. This is done using the switchport trunk allowed vlan {…} command. In this topology, we are using VLANs 10, 20, 30, and 40 so let’s allow all four. You will need to allow all four on all trunk ports in the topology.

S2(config)#interface fastEthernet 0/1
S2(config-if)#switchport trunk allowed vlan 10,20,30,40

4. Verify Trunk Interfaces

Now that we have our trunks configured correctly, let’s verify. We can use the show interface trunk command from enable mode to view trunk information. We can see in the output below that all three trunks on S2 are configured and allowing the correct VLANs for the topology.

5. Verify All PCs can Ping Each Other.

Let’s verify our switches are passing VLAN information correctly by trying to ping between the PCs. Try pinging between PC3 and PC4, this will show that we have VLAN communication across the network. You can also ping between PCs of different VLANs such as PC1 and PC2. This ping should also be successful, as inter-vlan routing is pre-configured.

If you are not able to ping, double check your trunk configuration.

Thanks for Reading!

I hope this post has helped you understand what trunking is used for and how to configure it. If you believe there is something wrong with the initial configuration, please contact me via my contact form to let me know.

Full Configuration

The full configurations for both labs can be found on my github!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top