Switch Trunk Interface Configuration



Trunk Interface 

A trunk port on a network switch is a specialized interface that facilitates the transmission of traffic for multiple VLANs (Virtual Local Area Networks) across a single physical link. Trunk ports play a crucial role in interconnecting switches and routers in modern network infrastructures, allowing for efficient VLAN segmentation and communication.

  1. VLAN Tagging: Trunk ports use VLAN tagging to differentiate between different VLANs' traffic transmitted over the same physical link. Each Ethernet frame traversing a trunk port is appended with a VLAN tag, indicating the VLAN to which it belongs. This tagging mechanism enables switches to correctly route and segregate VLAN traffic.
  2. Inter-Switch Communication: Trunk ports enable communication between switches belonging to different VLANs. By carrying traffic for multiple VLANs, trunk ports facilitate the exchange of data between devices located on separate VLANs, thereby enhancing network connectivity and flexibility.
  3. 802.1Q Protocol: The IEEE 802.1Q protocol is commonly used for trunking in Ethernet networks. It standardizes the format of VLAN tags appended to Ethernet frames, ensuring interoperability between network devices from different vendors. Trunk ports configured with 802.1Q encapsulation can transmit VLAN-tagged traffic seamlessly across the network.
  4. Trunk Configuration:

    To configure a trunk port on a switch, enter the switch's configuration mode.
  5. Select the interface (switch port) that you want to configure as a trunk port.
  6. Configure the selected interface as a trunk port using the switchport mode trunk command.
  7. Optionally, specify the allowed VLANs on the trunk link using the switchport trunk allowed vlan [VLAN_LIST] command to restrict which VLANs can traverse the trunk link.
  8. Ensure that the trunk port configuration is consistent on both ends of the link to avoid connectivity issues.
  9. Benefits: Trunk ports offer several benefits to network administrators, including efficient utilization of network bandwidth, simplified network management through VLAN segmentation, and enhanced network scalability. By consolidating traffic for multiple VLANs onto a single link, trunk ports optimize network performance and reduce the complexity of network topologies.

In summary, trunk ports are essential components of modern network infrastructures, enabling the seamless transmission of traffic for multiple VLANs across interconnected switches. Understanding trunk port functionality and configuration is fundamental for designing robust and scalable network architectures

Trunk Configuration




  1. switch# configure terminal: This command enters the global configuration mode on the switch, allowing you to make configuration changes to the switch.
  2. switch(config)# interface [INTERFACE]: This command selects the specific interface (switch port) that you want to configure. Replace [INTERFACE] with the identifier of the interface you want to configure, such as "GigabitEthernet0/1".
  3. switch(config-if)# switchport mode trunk: This command configures the selected interface as a trunk port, enabling it to carry traffic for multiple VLANs. When a port is in trunk mode, it expects to receive VLAN-tagged traffic.
  4. switch(config-if)# switchport trunk allowed vlan [VLAN_LIST]: This command specifies the list of VLANs that are allowed to traverse the trunk port. Replace [VLAN_LIST] with the numerical identifiers of the VLANs you want to allow on the trunk, separated by commas. For example, "10,20,30".
  5. switch(config-if)# end: This command exits the interface configuration mode and returns you to the global configuration mode. It indicates the end of the configuration changes for the selected interface.

 Second Method to configure Trunk with encapsulation dot1q





  1. interface GigabitEthernet0/1 selects the specific interface (switch port) that you want to configure.
  1. switchport mode trunk configures the selected interface as a trunk port, allowing it to carry traffic for multiple VLANs.
  1. switchport trunk encapsulation dot1q specifies the encapsulation method as IEEE 802.1Q, which is the industry standard for VLAN tagging.

After entering these commands, the switch port specified (GigabitEthernet0/1) will be configured as a trunk port using the IEEE 802.1Q protocol for VLAN tagging. This means it can carry traffic for multiple VLANs with VLAN tags attached to each frame.



Interface range command to select multiple interfaces



  1. interface range GigabitEthernet0/1 - 24 selects a range of interfaces from GigabitEthernet0/1 to GigabitEthernet0/24.
  1. switchport mode trunk configures all the selected interfaces as trunk ports, enabling them to carry traffic for multiple VLANs.

network source

Previous Post Next Post