Concepts and settings of trunk (Port aggregation)

Source: Internet
Author: User

An important indicator is often mentioned in the performance parameters of L2 switches: trunk. Many L2 Switch products will mention that it can support the trunk function when introducing its performance, this can provide better Transmission Performance Between Interconnected switches. So what is trunk? What application advantages can trunk bring to us? In addition, how to configure the trunk in a specific switch product. Let's take a look at these knowledge.

1. What is trunk?>
Trunk indicates port aggregation, that is, by configuring the software settings, combine two or more physical ports into one logical path to increase the bandwidth between the vswitch and the network node, and merge the bandwidth of these ports, the port is provided with a high bandwidth that is several times the exclusive bandwidth of the Independent Port. Trunk is a encapsulation technology. It is a point-to-point link. both ends of the link can be a switch, a switch, a router, or a host, a switch, or a router. Based on the port aggregation (trunk) function, allows a vswitch and vswitch, vswitch and vro, and host and vswitch or vro to communicate with each other through two or more ports simultaneously to provide higher bandwidth and higher throughput, greatly providing the overall network capability.

Generally, when trunk is not used, we all know that this transmission medium feature of the 10/100 M Ethernet twisted pair determines that the bandwidth of the two common 100 switches is only M, if the full duplex mode is used, the maximum bandwidth for transmission can reach 200 MB, which forms a network trunk and server bottleneck. To achieve a higher data transmission rate, you need to change the transmission media, use a gigabit optical fiber or upgrade to a Gigabit Ethernet, although the bandwidth can reach a Gigabit, however, the cost is very expensive (or even switches need to be replaced), which is not suitable for low-cost SMEs and schools. If the trunk technology is used, four ports are bundled together to achieve mbps bandwidth, which can better solve the contradiction between cost and performance.

II. Specific Application of trunk

Trunk (Port aggregation) is a relatively economical method to increase bandwidth between a vswitch and a network device, such as a server, router, workstation, or other vswitch. The method to increase the bandwidth is 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 (generally 2-8) to a logical channel to make it work like a channel. Bundling multiple physical links not only improves the bandwidth of the entire network, but also data can be transmitted through multiple bound physical links at the same time, which has the function of link redundancy, when one or more links are disconnected due to network faults or other causes, the remaining links can still work. However, in VLAN data transmission, different manufacturers use different technologies. For example, Cisco products use VLAN trunk technology. Most products of other manufacturers support the 802.1Q protocol with the tag header, in this way, a small giant frame is generated and must be identified using the same port protocol. Because the size of a small giant frame exceeds the 1518-byte limit of the standard Ethernet frame, it cannot be identified by a common Nic and requires a switch to remove the tag.

The trunk function is suitable for the following applications:

1. The trunk function is used to connect to the server and provide the server with an exclusive high bandwidth.

2. The trunk function is used for cascade between switches. It sacrifices the number of ports to provide bundled high bandwidth for data exchange between switches, improving network speed and breaking through network bottlenecks, this greatly improves network performance.

3. Trunk can provide load balancing capabilities and system fault tolerance. As trunk balances the traffic of each switch port and server interface in real time, once a port fails, it will automatically remove the faulty port from the trunk group, and then re-allocate the traffic of each trunk port, so as to realize system fault tolerance.

3. How to Set trunk?

To set the trunk, you must specify a port as the trunk, for example, 2/24. To set a port to the trunk mode, run the following command:

Set trunk MOD/port [ON | off | desirable | auto | nonegotiate] [vlan_range] [isl | dot1q dot10 | Lane | negotiate].

This command can be divided into the following four parts:

MOD/port: Specifies the port on which the user wants to run trunk;

Trunk running modes: On | off | desirable | auto | nonegotiate.

To automatically identify the trunk over fast Ethernet and Gigabit Ethernet, you must ensure that the trunk is in the same VTP domain. You can also use the on or nonegotiate mode to force a trunk on a port, regardless of whether it is in the same VTP domain.

VLAN range. The default value is 1 ~ 1005, which can be modified, but must have the trunk protocol. When trunk is used, the protocol on the adjacent ports must be consistent.

In addition, you need to set the port connected to the following switch to trunk on the central switch, so that multiple VLANs in the following switch can communicate with the central switch through one link.

Iv. Precautions for trunk Configuration

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 uncertain packets. When configuring trunk, you must follow the following rules:

1: correctly select the number of trunk ports, which must be 2, 4 or 8.

2: the ports in the same group must be used. The ports on the vswitch are divided into several groups. All ports of the trunk must come from the same group (see figure 1 ).

3: Use Continuous ports. The ports on the trunk must be continuous. For example, you can combine ports, 6, and 7 into a port aggregation.

4: generate only one trunk in a group of ports; for example, there are three groups of AT-8224XL Ethernet switches for annett, assuming there is no expansion slot. Therefore, the vswitch supports aggregation of three ports. The expansion slot allows the switch to support one more port aggregation.

5: Maintain the wiring Sequence Based on the port number: The most important connection lines at the two ends must be the same. The port with the lowest serial number of one vswitch must be connected to the port with the lowest serial number of the other. For example, assuming that you aggregate from the OPF-8224E switch port to another OPF-8288XL switch, on the OPF-8224E (see figure 2) You choose the second group of ports 12, 13, 14, 15, on the OPF-8288XL (see figure 3) You choose the first group of ports 5, 6, 7, and 8 to keep the connection order, you have to connect Port 12 on the OPF-8224XL to Port 5 on the OPF-8288XL, Port 13 to port 6, and so on.

6. Configure port parameters for the trunk: all ports on the trunk are automatically considered to have the same configuration as the port parameters of the lowest port number (such as members in the VLAN ). For example, if you use ports 4, 5, 6, and 7 to generate a trunk, port 4 is the master port, and its configuration is spread to other ports (ports 5, 6, and 7 ). As long as the port has been configured as a trunk, you cannot modify any parameters of ports 5, 6, and 7, which may cause a conflict with the settings of port 4.

7: Use expansion slot: Some expansion slots support trunk. This depends on the number of ports on the module.
Advantages of trunk:

1. You can connect multiple VLANs between different vswitches and extend the VLAN to the entire network.

2. Trunk can bind any related port or cancel the setting at any time, which provides high flexibility.

3. Trunk can provide load balancing capabilities and system fault tolerance. As trunk balances the traffic of each switch port and server interface in real time, once a port fails, it will automatically remove the faulty port from the trunk group, and then re-allocate the traffic of each trunk port, so as to realize system fault tolerance.

To transmit communications between multiple VLANs, a dedicated protocol encapsulation or tag must be used to enable the receiving device to distinguish the VLAN to which the data belongs. The VLAN identifier logically defines which packet has multiple protocols, and we most commonly use isl based on: 802.1Q and Cisco-specific protocols. Below I will briefly introduce these two protocols.

1. The Inter-switch link (ISL) is a Cisco-specific protocol used to connect multiple switches. The protocol that maintains VLAN information when data is transmitted between switches. In an isl trunk port, all received packets are expected to be encapsulated using the isl header, and all transmitted and sent packets carry an isl header. The local frame (non-tagged) received from an isl port is discarded. It is only used in Cisco products.

2. the formal name of 802.1Q is the virtual bridge LAN standard, used between switches produced by different manufacturers. A 802.1Q trunk port supports both tagged and unlabeled traffic. A 802.1Q trunk port is assigned a default port vlan id (PVID), and all untagged traffic is transmitted on the default PVID of the port. A packet with the same vlan id as the default PVID of the outbound port is not tagged when it is sent. All other traffic is sent with VLAN tags.

After the trunk is set, the trunk link does not belong to any VLAN. The trunk link acts as a VLAN pipe between switches. The switch automatically distributes loads from other ports in the same VLAN with the ports in the same trunk to each port in the same trunk. Because the ports in the same VLAN forward data packets to each other, the trunk port in the trunk is treated as a port, if the loads of other non-trunk ports in the VLAN are not allocated to each trunk port, some datagram data may be randomly sent to the trunk, resulting in disordered frame sequence. Because the trunk port is regarded as a logical port, after the trunk is set, the trunk will be automatically added to the VLAN to which its member ports belong, the member ports are automatically deleted from the VLAN.

When data of different VLANs is transmitted on the trunk line, two methods can be used to identify data of different VLANs: frame Filtering and frame marking. The frame filter method checks the detailed information of Frames Based on the filter table of the switch. Each vswitch maintains a complex filter table and performs a detailed check on each frame passing through the trunk, which increases the network latency. Currently, this method is no longer used in VLAN. Currently, frame labeling is used. When a data frame is transmitted over a trunk line, the switch tags the frame header information to specify the corresponding vlan id. After a frame passes the relay, the flag is removed and the frame is switched to the corresponding VLAN port. The frame labeling method is selected as a standard relay mechanism by IEEE. It has at least three processing methods:

1) Static trunk line configuration

Static trunk lines are easy to understand. Each vswitch on the trunk line can be set by a program to send and receive frames using a specific trunk line connection protocol. In this setting, ports are usually dedicated to trunk connection, but cannot be used to connect end nodes. At least they cannot connect end nodes that do not use the trunk connection protocol (Trunking Protocol. Static configuration is very useful when the automatic negotiation mechanism cannot work normally or is unavailable, but it must be manually maintained.

2) trunk line function announcement

The switch can periodically send announcement frames, indicating that they can implement certain trunk connection functions. For example, a vswitch can notify itself that it can support certain types of frame tags v l a n. Therefore, it is not wrong to send frames to the vswitch according to the frame format advertised by the vswitch. The function of a vswitch is stopped, and it can also advertise which v l a n it wants to provide the trunk line connection service. This type of trunk line setting may be useful for a network segment composed of end nodes and trunk lines.

3) Automatic trunk line negotiation

The trunk line can also be set automatically through the negotiation process. In this case, the switch periodically sends indicator frames, indicating that they want to be switched to trunk connection mode. If the switch at the other end receives and recognizes these frames and configures them automatically, the two switches set these ports to the trunk connection mode. This automatic negotiation usually depends on the existing links between two switches (on the same network segment), and the ports connected to this link must be dedicated to trunk connections, this is very similar to static trunk line settings.

Runk is an encapsulation technology. It is a point-to-point link. Its main function is to connect multiple switches through only one link to expand the configured VLAN. You can also use the trunk technology and the upper-level switch-level connection to expand the number of ports, which can achieve the function of approximate stacking, saving the cost of network hardware, thus expanding the entire network.

The VLAN range of the trunk. The default value is 1 ~ 1005, which can be modified, but must have 1 trunk protocol. When trunk is used, the protocol on the adjacent ports must be consistent.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.