Featured Posts

CCIE-Journals

CCIE-Journals
From Student to Engineer,a journey of discovery.

Trunk ports

Inter-switch connectivity - Trunk ports 


Configuring and verifying inter-switch connectivity is a crucial aspect of network design and implementation. In order to enable communication between switches in a network, a trunk port must be established. In this blog post, we will discuss the concept of trunking, when it is used, and how to configure and verify it on a switch. 



Trunking is a technique used to allow multiple VLANs to be carried over a single physical link between switches. In a switched network, each switch has its own set of VLANs. 

Trunking allows the VLANs to be extended across multiple switches and enables the communication between them.

Trunking is typically used in enterprise networks where there are many VLANs and multiple switches. It is also used in data centers and service provider networks.


To create a trunk port on a switch, the switch port must be configured as a trunk. This is done by setting the port mode to the trunk. In Cisco IOS, the command to set the port mode to the trunk is:

 
 Switch(config-if)# switchport mode trunk

Once the port is configured as a trunk, the VLANs that are allowed to be carried over the trunk must be specified. This is done by configuring the allowed VLANs on the trunk. In Cisco IOS, the command to specify the allowed VLANs on the trunk is:


Switch(config-if)# switchport trunk allowed vlan vlan-list

Where VLAN-list is a comma-separated list of VLANs that are allowed on the trunk. For example:

 
 Switch(config-if)# switchport trunk allowed vlan 10,20,30
This command would allow VLANs 10, 20, and 30 to be carried over the trunk.

To add or delete VLANs to the trunk, the same command can be used with the updated VLAN list.

For example, to add VLAN 40 to the list of allowed VLANs:

 Switch(config-if)# switchport trunk allowed vlan add 40

To delete VLAN 20 from the list of allowed VLANs:

 Switch(config-if)# switchport trunk allowed vlan remove 20

To verify the trunk link, several commands can be used. One of the most useful commands is the show interface trunk command. This command displays information about the trunk port, including the allowed VLANs, the native VLAN, and the VLANs that are currently active on the port. In Cisco IOS, the command to display trunk information is:


 Switch# show interface trunk

This command will display information about all trunk ports on the switch.

Here's an example of how an Trunk port might work in a real-world scenario:




Suppose you have a small business with three departments: marketing, finance, and IT. 
You want to set up a VLAN for each department to keep their traffic separate, but you only have one physical network connection to each computer. You could use VLAN trunking to achieve this.

You would configure your switches to create a trunk link between them, and enable VLAN tagging using 802.1Q. Then you would assign each port on the switch to one of the three VLANs. Any traffic that enters the switch on a port assigned to a VLAN will be tagged with the appropriate VLAN tag before it is forwarded to the trunk link.

When a packet arrives at the switch, the switch examines the VLAN tag to determine which VLAN it belongs to, and forwards it to the appropriate ports on the other switch. When the packet reaches the destination computer, the VLAN tag is removed from the Ethernet frame, and the computer processes the packet as normal.

So, in this example, VLAN trunking is used to allow multiple VLANs to be carried over a single physical network connection, enabling traffic to be separated and routed more efficiently.



In summary, configuring and verifying inter-switch connectivity using trunking is a critical aspect of network design and implementation. Trunking allows VLANs to be extended across multiple switches and enables the communication between them. To configure trunking on a switch, the switch port must be configured as a trunk and the allowed VLANs must be specified. To verify the trunk link, the show interface trunk command can be used. 

0 comments:

Post a Comment