SoFunction
Updated on 2025-04-12

TRUNK configuration of core switch

What exactly is TRUNK? What application advantages can TRUNK function bring to us? There is also how to configure TRUNK in specific switch products. Let’s learn about these aspects below.

In the performance parameters of layer 2 switches, an important indicator is often mentioned: TRUNK. When introducing its performance, many layer 2 switch products will mention that they can support TRUNK functions, which can provide better transmission performance between interconnected switches. So what exactly is TRUNK? Use TRUNK function

What application advantages can it bring to us? There is also how to configure TRUNK in specific switch products. Let’s learn about these aspects below.

1. What is TRUNK?
TRUNK means port aggregation, which means that through the configuration software settings, two or more physical ports are combined into a logical path to increase the bandwidth between the switch and the network node, and merge the bandwidth of these ports to provide the port with a unique high bandwidth several times that of independent ports. Trunk is a packaging technology, which is a point-to-point link. Both ends of the link can be switches, switches and routers, or hosts and switches or routers. Based on the port aggregation function, it allows switches to connect to switches, switches and routers, hosts and switches, or routers to simultaneously transmit through two or more ports in parallel to provide higher bandwidth and greater throughput, greatly providing the entire network capability.

Generally speaking, when TRUNK is not used, everyone knows that the transmission media characteristic of the twisted pair of 100 megabit Ethernet determines that the bandwidth of two interconnected ordinary 10/100 switches is only 100M. If the full duplex mode is used, the maximum transmission bandwidth can reach a maximum of 200M, which forms a bottleneck for the network backbone and server. To achieve higher data transmission rates, you need to replace the transmission medium, use gigabit fiber or upgrade it to gigabit Ethernet. Although it can reach gigabit in bandwidth, it is very expensive (even the switches may need to be replaced together), and it is not suitable for low-cost small and medium-sized enterprises and schools. If TRUNK technology is used, the four ports are bundled together to achieve 800M bandwidth, which can better solve the contradiction between cost and performance.

2. Specific application of TRUNK
TRUNK (Port Aggregation) is a relatively economical way to increase bandwidth between a switch and a network device, such as a server, router, workstation or other switch. This method of increasing bandwidth is more effective when the connection between a single switch and a node cannot meet the load.

The main function of TRUNK is to bind multiple physical ports (usually 2-8) into a logical channel, making it work like a channel. After bundling multiple physical links together, not only can the bandwidth of the entire network be increased, but the data can also be transmitted through multiple physical links that are bound at the same time, with the role of link redundancy. When one or more of the links are disconnected due to network failure or other reasons, the remaining links can still work. However, in VLAN data transmission, various manufacturers use different technologies. For example: Cisco's products use its VLAN TRUNK technology. Most of the products of other manufacturers support the 802.1q protocol and put the TAG header, which generates a small Giant frame, which needs to be identified by the same port protocol. Since the size of the small Giant frame exceeds the 1518-byte limit of the standard Ethernet frame, ordinary network cards cannot recognize it, and there is a switch that needs to be removed from the TAG.

The TRUNK function is more suitable for the following specific applications:
1. The TRUNK function is used to connect with the server and provide the server with exclusive high bandwidth.
2. The TRUNK function is used to cascade between switches. By sacrificing the number of ports, it provides bundled high bandwidth for data exchange between switches, improves network speed, breaks through network bottlenecks, and greatly improves network performance.
3. Trunk can provide load balancing capabilities and system fault tolerance. Since Trunk balances the traffic of each switch port and server interface in real time, once a port fails, it will automatically undo the failed port from the Trunk group, and then reassign the traffic of each Trunk port, thereby achieving system fault tolerance.

3. How to set TRUNK?
To set TRUNK, you need to specify a port as the backbone, such as 2/24. If you set a port to Trunk, the command is as follows:
set trunk mod/port [on | off | desirable | auto | nonegotiate] [vlan_range] [isl | dot1q dot10 | lane | negotiate]。
This command can be divided into the following 4 parts:
mod/port: Specify the port the user wants to run Trunk;
Trunk's operating modes are: on | off | desirable | auto | nonegotiate.
To automatically identify Trunk on Fast Ethernet and Gigabit Ethernet, it must be guaranteed to be in the same VTP domain. You can also use On or Nonegotiate mode to force a port to start a Trunk, whether it is in the same VTP domain or not.

The VLAN range that is carried. By default, it is 1~1005, which can be modified, but there must be a TRUNK protocol. When using TRUNK, the protocols on adjacent ports must be consistent.

In addition, the port connected to the lower switch needs to be set to TRUNK on the central switch, so that multiple VLANs in the lower switch can communicate with the central switch through one link.

4. Things to note when configuring TRUNK
In a TRUNK, data is always from a specific source point to a destination point, and a single link is designed to process broadcast packets or packets that are unknown to the destination. When configuring TRUNK, the following rules must be followed:

1: The number of ports to correctly select TRUNK must be 2, 4 or 8.
2: The ports in the same group must be used, and the ports on the switch are divided into several groups, and all ports of TRUNK must come from the same group
3: Use continuous ports; the ports on TRUNK must be continuous, such as you can use ports 4, 5, 6 and 7 to form a port aggregation.
4: Only one TRUNK is generated in a set of ports;