In-depth introduction to multi-nic Binding Technology

Source: Internet
Author: User


In a storage system, to increase the throughput of backend devices, the multi-nic binding technology is often required. For example, the backend storage can provide a maximum throughput of 300 MB/S. Therefore, you need to use 3 1 GPS NICs for concurrent transmission to achieve peak performance. From the perspective of R & D, how can I bind multiple NICs? This section provides an in-depth analysis of the Multi-nic binding technology to improve throughput.

Multi-nic binding can increase network throughput and network availability. The multi-nic binding technology of high-availability applications is not discussed here. From the software perspective, you only need to provide an additional bond driver for multi-nic binding. With this virtual NIC Driver, you can shield multiple NICs, only one Bond Nic exists for the TCP/IP protocol layer. Load balance for network traffic is implemented in the Bond driver, and a network request is relocated to different NICs to improve the overall network performance. Shows the software hierarchy for binding multiple NICs:
Www.2cto.com: To bind multiple NICs, what are the technical difficulties? A network switch uses a physical address for port routing. For a common switch that does not support the 802.3ab protocol, it can only connect to NICs with different physical addresses. Otherwise, the switch will not work properly. Each network adapter has one IP address, and each IP address is bound together with a MAC address through ARP. From this analysis, it is difficult for us to achieve the perfect multi-nic binding communication model without the combination of vswitches: If ARP supports ing an IP address to multiple MAC addresses, in the Bond driver layer, we can implement the multi-nic binding communication model shown in. In the actual IP network, to achieve the above binding effect, the 802.3ab protocol of the switch is required. The network card binding method of round robin is achieved through the switch, which cannot be achieved through a software-only method. 802.3ab protocol-based multi-nic binding, as shown in: with the support of 802.3ab, all the MAC addresses of the Server NIC are configured into one, such as MAC-A, then these ports are aggregated on the vswitch side. After receiving the data packets, the switch polls these ports and sends the data packets to the Bond driver. When the Bond driver wants to send data, it also sends the data packets to different NICs for transmission through the polling method. This method can be transparent to the Client, which is relatively simple in terms of the overall architecture. The only drawback is that it requires support from switches. I personally think that this solution is the best way to bind a network card to a storage system.
Www.2cto.com
In addition to the solutions supported by vswitches, we can also adopt software-only methods, but such binding is limited in some applications. A simple binding method is to bind only Transmit (Linux Bond5 Mode ). Shows the binding model: In this model, the Client sends an ARP request to the Server, and the Server sends the MAC address of the Bond adapter to the Client. The Bond Adapter driver selects an Slave-nic mac address as its MAC address. For example, Client-B sends an ARP request to the Server, and the Server tells the MAC-C address to Client-B. As a result, all the datagram files sent by the Client are received by the NIC where the MAC-C address is located. In other words, all clients understand that the MAC address of the Server is a MAC-C, and the Client does not see the MAC address of other NICs on the Server. When the Server sends data packets, the Source-Address encapsulated by the Server is the MAC Address configured by the Bond adapter, and the destination Address is the MAC Address of the Client NIC. During data transmission, the Bond driver distributes the sent packets evenly to all NICs according to certain algorithms. Because the NIC driver does not change the contents of the Ethernet packets, the Bond driver can take full advantage of the physical bandwidth of all NICs. This method is easy to implement. The Bond driver does not need to intercept any data of the transmitted packets. You only need to select the NIC for data transmission. Because the Client only knows the physical address of one network card, it cannot receive concurrent data from multiple network cards and can only send concurrent data. This solution is very effective for applications that only focus on data transmission throughput.
Www.2cto.com
In storage applications, two-way data transmission throughput needs to be considered. The above solution has a data receiving bottleneck. So how can we make the Server perform efficient two-way data transmission? The key problem is that the Client needs to know the MAC addresses of different NICs. In the above solution, all clients only know one MAC address. To achieve bidirectional transmission, the Bond driver needs to intercept ARP packets and data packets and modify the MAC address. Shows the data transmission model (Linux Bond6 Mode) bound to the network adapter. When the Client sends an ARP request to the Server, the Bond driver intercepts the ARP response packet returned to the Client, select an Slave-nic mac address and use this MAC address to modify the ARP response packet. In this way, the Server assigns a network card to a Client, and each Client gets the MAC address of different NIC, so that the Client can transmit data through different network cards. In the case of multiple clients, the Server can receive concurrent data.

When sending data on the Server, the Bond driver needs to intercept the data packet and modify the source MAC address in the Ethernet packet (bond_alb_xmit function implements Bond's data transmission function ), then, the algorithm selects a NIC to send data to achieve concurrent data transmission (the data packet is not fixed on a NIC, And the demo model is only a special case ). The biggest difference between this scheme and the above scheme is that the Bond driver needs to intercept ARP and normal data packets and process them. From the Client side, each Client's data transmission can be bound to a separate NIC card.

Here we have summarized the binding technology of multiple NICs, which is worth noting.

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.