How to Configure Trunk Port on Cisco Switch Packet Tracer - Netizzan

How to Configure Trunk Port on Cisco Switch Packet Tracer

In a small network with few vlans, it is possible to use separate interfaces when connecting vlans to switches and vlans to routers.
However, when the number of vlans increases, this is not viable; it will result in wasted interfaces, and routers won’t have enough interfaces for each vlan. In this scenario, trunk ports come in handy. A trunk port is used to carry traffic from multiple vlans over a single interface. This is very different from the access port, which operates on a single VLAN.
In this article, I will show you the basic concept of trunk ports and how to configure trunk port on cisco switch packet tracer.

The Role of VLAN Tagging in Packet Forwarding and Trunk Port Configuration

Before we delve into the process of configuring trunk ports, it is very important that we understand vlan tagging and its role in passing traffic from multiple vlans over a single interface.
VLAN tags are tags attached to a frame that help switches know the VLAN on their interfaces to which they should forward traffic.
When a switch wants to forward traffic to another switch over a trunk link, it will include a tag in the frame header that will help the receiving switch know the specific VLAN on its interface to which it should forward the traffic.
There are two main tagging methods: ISL (inter-switch Link) and IEEE 802.1Q (dot1q).

ISL is an old Cisco proprietary protocol created before dot1q, and it is no longer in use in most cases today. Dot1q is the industry standard today.

Dot1q has a feature called native vlan. A native vlan is a vlan that does not have an 802.1q tag.

By default, vlan 1 is the native vlan on all trunk ports, but it can be configured manually on each trunk port.

When a switch receives any frame without a dot1q tag, it will simply forward it to the native vlan.

Network Topology

In the network topology depicted below, we showcase a simplified setup consisting of two switches connected with a trunk link and a router connected to one of the switches with a trunk link. We also created 3 vlans: vlan 10, vlan 20, and vlan 30 on the switches, as shown below. This topology is used for demonstration purposes and may differ in real-world scenarios.
The main goal of this article is to configure trunk ports on G0/1 of switch 1 and G0/1 of switch 2. After this configuration, we will be able to communicate between the vlans using the trunk link (the cable that connects switch 1 to switch 2).

a network topology showing two switches, a router and three vlans

How to Configure Trunk Port on Cisco Switch Packet Tracer

We have 2 trunk port to configure on this network topology, so we will take them one-by-one.

1. Configure G0/1 of  switch 1

Step 1: Configure the access port: Configure the access port for all the PCs on switch 1. We previously published article on access port configuration.

Step 2: Create the necessary vlan: Enter the following command to create vlan 10 and vlan 30 on switch 1.

SW1#conf terminal
SW1(config)#int g0/1
SW1(config-if)#vlan 10
SW1(config-vlan)#vlan 30
SW1(config-vlan)#end

Step 3: configure the allowed vlans: Enter the global configuration mode, change the port mode to trunk, and configure the allowed vlans using the following command:

SW1(config)#int g0/1
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport trunk allowed vlan 10,30

Step 4: Configure the native vlan: For security purpose, you need to change native vlan to unused vlan. Without exiting from the interface configuration mode, enter the following command to configure the native vlan to vlan 1001

SW1(config-if)#switchport trunk native vlan 1001

2. Configure G0/1 of switch 2

To configure G0/1 of  switch 2, enter the privilage exec mode of the switch 2 and take the following steps;

Step 1: Configure the access port: Configure the access port for all the PCs on switch 1. We previously published article on access port configuration.

Step 2: Create the necessary vlan: Enter the following command to create vlan 10 and vlan 30.

SW2#conf terminal
SW2(config)#int g0/1
SW2(config-if)#vlan 10
SW2(config-if)#vlan 30
SW2(config-vlan)#end

Step 3: configure the allowed vlans: change the port mode to trunk and configure the allowed vlans using the following command

SW1(config)#int g0/1
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport trunk allowed vlan 10,30

Step 4: Configure the native vlan: Without exiting from the interface configuration mode, enter the following command to configure the native vlan to vlan 1001

SW2(config-if)#switchport trunk native vlan 1001

3. Verify Connectivity

Open the Command Line Interface (CLI) of one of the PCs on VLAN 10’s right branch and ping another PC on VLAN 10’s left branch. Remember, all the VLANs that have a yellow background are under VLAN 10.

Note: Ping cannot move from one PC on a VLAN (VLAN 10, for instance) to a PC in another VLAN (VLAN 20, for instance) yet because we have not done the inter-VLAN configuration. Inter-VLAN configuration is our next article.

Conclusion

With what we have covered in this article, I believe you have learned how to Configure a trunk port on Cisco Switch Packet Tracer. Because we have not implemented the inter-vlan configuration, a ping to a PC outside of a VLAN will definitely fail. We have shown how to implement inter-vlan configuration for this network topology; do check it out.

ALSO READ:  How to Configure Native VLAN on Cisco Switch Packet Tracer

If you have any questions, do leave them in the beginning section below, and I will attend to them as soon as possible.

Leave a Comment

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

Scroll to Top