Create a dual-nic Server Load balancer (improving upload/download efficiency) [copy]

Source: Internet
Author: User
Create a dual-nic Server Load balancer (improving upload and download efficiency)
Create a dual-nic Server Load balancer (improving upload and download efficiency)
Author:★Source of the sub-blog article: site original clicks: 517 updated:

[Switch] creating a dual-nic Server Load balancer
Currently, there are not many NICs that support the binding function by nature on the market, and most of them are names of high-end server NICs, which are expensive and professional in the setup process. They are not easy to use and maintain. Do I have to wait for the average person to get rid of the pleasure of Dual-nic binding when I buy dozens of Yuan of cheap 8139 yuan? Today, I will teach you how to use an ordinary 8139 Nic to experience the pleasure of binding a pair of NICs with only one small software. This software is called "nicexpress ", maybe the experts have already reached their mouths. Well, the author's starting point is to give the cainiao brothers difficult to solve their puzzles and to entertain themselves in a poor way. If you say something too hot, don't laugh, this is the pleasure of DIY.

A friend may ask why dual NICs are used? What are the benefits of using dual NICs? The so-called dual-nic is to bind a dual-nic to an IP address through software. This technology is no stranger to many friends and many high-end server NICs (such as intel8255x series and 3Com server NICS) you can bind two or more NICs to the same IP address through hardware and software settings.

Multi-nic binding has many advantages. First, you can increase the bandwidth. If the bandwidth of one Nic is 100 m, the two NICs are 200 m in theory, and the three are 300 m in theory, of course, the actual effect will not be simply increased. However, it is certainly beneficial to increase the bandwidth and maintain the stability of the bandwidth by using multiple network cards, if the switch and other related conditions are good, this effect is satisfactory. Second, you can form a Redundant Array of NICs to share the load. After the dual Nic is bound to a "One nic", it will work together, the access traffic to the server is evenly distributed to two NICs, so that the load pressure on each Nic is much lower, and the ability to defend against concurrent access is improved, the stability and smoothness of server access are ensured. When one of them fails, the other immediately takes over all the loads. The process is seamless and the service will not be interrupted until the service personnel arrive.

OK. Now I will teach you how to use 50 yuan to create a dual-nic effect!

Download the software first (Click here to download). This is the latest version of 4.0, which is only 2.15 MB. The software compatibility has been well done and supports Win98/ME/2000/XP/2003. Basically, it supports a variety of common network adapters on the market. Both MB and GB network adapters can be used for binding, but it is best to use the same network adapter for binding, at least it is based on the same chip, so that multiple NICs can work together better. Do not bind a 10 m Nic to a m Nic.

After downloading the software, do not install it. We should prepare the hardware first.

Part 1: hardware Installation

Although, theoretically, the more network cards to be bound together, the more obvious the final improvement will be. However, considering the complexity, we will take the BIND Dual Network Card as an example to describe it. If you think it is fun, if you are very interested, follow the following method to bind as many NICs as you want. In fact, it is enough to bind two or three NICs to the same server. It is said that because of the inherent shortcomings of link aggregation, it will occupy too much server resources, which in turn will affect the server speed (I did not experiment with this, but I think everything is inseparable from the principle that everything is absolutely necessary, moderately the best ).

I took out a pair of 8139d10m/M Adaptive NICs that can be seen everywhere on the market. The market price is 25 yuan. The work of a factory in Beijing is still fine, and the total cost is 50 yuan.

Then, I picked up a private server from the author. Although it was a little worn out, I did a lot of work. Now I am running FTP, mail, and other services, it is used to send emails from hundreds of friends. The configuration is intel810 motherboard (integrated graphics card) + 256msd memory + 10gide hard disk (System Disk) + 120gide hard disk (storing internet garbage ). The system software is Windows2000 Advanced Server Edition.

If you do not need to talk about it, open the server chassis, and twist the two NICs into the PCI slot of the motherboard. If you have screwed them up, it looks good.


Then let's take a look at the effect.

Come up with the 10m-8 hub. Haha, don't joke. I only have this in hand. You can make it clear. If it is your own DIY, You must select a good switch, at least 10/100 M self-adaptation is required. This is the key to smooth the network. Don't connect a m Nic to a 10 m hub. How can this problem be solved. Make several network cables to connect the hub and network card, and connect the hub to the upper-level switch. Because it is an experiment at home, I connected the uplink port of the hub to any network port of the home router, and the router connected to my ADSL "Big Cat ".


Now, the hardware has been installed. That's simple.

Part 2: Set debugging

The following describes how to configure and debug the two 8139d low-cost NICs, which are bound together like the high-end server Nic. They use the same IP address and work simultaneously. The process is not complicated. It is estimated that 20 minutes is enough.

Decompress the nic4.rarpackage of the downloaded Nic expresssoftware to the installation file named nicexpressw2kee.exe. Double-click it to start the installation program. Next, the software prompts you to enter the unlock key (Registration Code). If there is no registration code, you have to click demo, in this way, you can get a free trial period of 30 days. If you feel good during these 30 days, you can find a way to get a registration code

On the page shown, the software prompts you to select whether to enable the load balancing function? What is the load balancing function? Load Balancing can be translated into load balancing, where network load balancing is used. That is, when multiple NICs are bound together, when the data traffic is high, the software automatically adjusts and distributes the data traffic load evenly to each Nic, to reduce the pressure on a single network card and achieve smooth access. We bind a dual-nic. One of the purposes is to achieve load balancing. We naturally need to enable this function, so we must select "enabled" here ". Of course, it doesn't matter if you select an error here. You can also enable it on the NIC Express software management interface in the future.

Continue to next. If the prompt "Nic express virtual miniport" fails to pass the Windows test during installation in Windows XP, you cannot verify its compatibility with Windows XP, select "continue.


On the interface shown, it is time to actually bind the NIC:

We can see that this interface is divided into three windows: upper, middle, and lower. The window is blank and the middle is 8139-2, the 8139-2 is the name of the bound NIC group. The new array is written by default here. You can also write other names based on your preferences. The following window lists the names of the two NICs currently installed on the server. The next step is to use the mouse to select the names of the two NICs, and then click the Add key in the middle of the interface to add the two NICs to the window above, in this way, the two NICs are added to the NIC group and initially bound to a "Nic". In the future, you can use the same IP address.

Click OK to continue. Nic Express has a configuration interface with many options, but you don't have to worry about it because these configurations do not have to be modified. You can use the default values, click OK and finish to complete the installation process. At this point, the software installation is almost complete, and some necessary settings are required for the software and network card.


Click the "Start" menu on the desktop and select the "Nic express Enterprise Edition" option in the execution menu. This is a monitoring program that comes with Nic Express software. First, click the "setting" option, here, you can set the network card traffic measurement unit, which can be calculated based on three units: Packets/sec, Mbits/sec, and kbits/sec. Generally, the default Mbits/sec is used for calculation, that is, the MB/second. In fact, you only need to modify "Graph detail" here and change the default "by Protocol" to "by incoming/outgoing ", you do not need to change anything else.


If you want to observe the traffic of each network card in the bound group or the traffic of the entire group, you only need to select the device in the select device option. Click the "advanced" option to set the network adapter binding mode. You can also click "Load Balancing disable" here to disable the network adapter load balancing function. By default, the dual NIC group bound to NIC express works in the NIC express ELB mode, which is a unique mode of NIC express and works well. We all know that the combination of Intel 8255x bound with the expensive Intel Xeon runs in "802.3ad" working mode, which can also be selected in Nic Express, however, most users think that the effect of the NIC express ELB mode is better than that of the 802.3ad mode. You can test and compare it in the future. If you also use the default Nic express ELB mode, you do not need to change anything in the "advanced" option. Everything is done by default. The NIC express settings are now complete.

Finally, let's take a look at the NIC settings. Right-click the "Network and dial-up connections" window on the desktop, and we can see that the two Nic connection icons have changed to three, an extra icon is "Nic express virtual adapter", which is the bound NIC group. The use of this NIC group is exactly the same as that of a single Nic, it is equivalent to a single "virtual network card ".

Right-click the icon and select Properties. You can set the IP address, subnet mask, gateway, and so on for the "virtual network interface". In fact, when installing "Nic Express, if these are already set for the server's original single Nic, the "virtual nic" is automatically set to be the same as the original Nic. Selecting Nic express transport for Ethernet here also allows you to adjust the NIC binding group freely, for example, reducing or adding a nic, which is much more convenient than intel manual, before adding or removing NICs in the bound group, Intel manual must delete the original binding group and recreate it.

Now everything is done. Our server has become a "dual-nic redundancy server" on the ground. Let's run it and see how it works.

Part 4: test the effect of Dual-nic binding

Check the line. we mentioned that the two NICs have been connected to a 10 m hub with a network cable (equivalent to a m switch in the cabinet of the data center ), the uplink port of the hub is connected to any network port of the Home Router. The router accesses the Internet through the ADSL big cat (Beijing K monthly subscription ADSL), and the server is connected to the Internet, press the power key to start the server. Because dynamic domain name software has been installed on the server, after the server is started, soon connected with the international domain name www.usacase.com (please refer to the "absolutely crazy" published on the Pacific website not long ago! Create an email server with a capacity of 1 GB). Then, you only need to access the www.usacase.com domain name to access my server from all over the world, I asked a friend in Shanghai to log on to this "dual-nic redundancy server" using FTP software and download a 50 m compressed file package. Sorry, the two 8139d NICs on the server are flashing at the same time, and the flashing frequency is completely synchronized!

Looking at the antique 10 m hub, the two interface indicators connected to the network card are also flashing fast, indicating that the two network cards are working simultaneously, while sharing the access traffic. My friends in Shanghai said they felt that the speed was good. After all, it was only KB of ADSL, and they could only see the beautiful effect of network card synchronization.

Then, I conducted a transmission experiment in the LAN. Because of the bottleneck of the 10 m hub, the effect was not very good, but we can see some significant improvements. Access the server that has been bound to the dual 8139d Nic by using Nic express from another computer that uses a single wildcard 10m8029 Nic through the network neighbor on the LAN, and transfer the M file, according to the curve Monitoring Chart in "Nic express Enterprise Edition", the transmission rate of the dual-nic binding group starts from 8 Mb/s and reaches 8.2 Mb/s. The average transmission rate between the two machines is relatively stable, occasionally, the software is adjusting the load balancing of the two NICs, and it only returns to normal after a few seconds, basically stable at around 7.5-8 Mb/s, it is close to the maximum transmission limit of the 10 m hub. Then, remove a network card from the server and conduct another two-machine transmission experiment. It is found that the maximum transmission rate has been suddenly reduced to 5 m/s, and the transmission rate fluctuates greatly during transmission, the average transmission rate is about 3 Mb/s, and the difference is obvious.

Now, the server bound with dual NICS is running without downtime during the day and night. You can use www.usacase.com or mail.usacase.com to access the server. What I run above is my "absolutely crazy! As mentioned in the article "Creating a mail server with 1G capacity", any friend can apply for a free MB mailbox to experience the performance of the dual-nic redundancy server of "Tang Hua brand" (hey, in fact, you do not feel anything ).

The last few sentences can be summarized and supplemented in this article:

1. After actual use, I found that the dual NIC group bound with Nic Express runs very stably and has never encountered any software conflicts, A friend of mine has applied it to my own Telecom hosting server. It has been running for more than half a year and is stable;

2. Theoretically, the more NICs bound to NIC Express, the more obvious the improvement should be. If possible, you can manually bind 3 or 4 NICs, however, remember that the network card should be a brand or model;

3. When Nic Express was initially played by the old birds, they did not expect the application to be used as a NIC redundancy array on the server. Most of us bind several computers in the LAN to dual NICs at the same time, in this way, the transmission rate and transmission stability between computers have been significantly improved. Later, we found that as long as one computer is bound to a dual NIC group using Nic Express, other computers using a single Nic can access this computer with a NIC binding group, which also improves the transmission rate and stability. So I thought of applying this technology to the server.

4. I personally think that using Nic express to bind multiple NICs has some practical significance in today's data era. It is inspired by Internet servers and LAN servers, when we bind multiple NICs to the server to form an array, we can not only expand the server's network bandwidth, but also effectively balance the load and improve fault tolerance capabilities, avoid server transmission bottlenecks or stop services due to a network card failure.

5. Maybe you will say that in today's era when Gigabit NICs are already popular, how can we bind several hundred megabytes of NICs? In fact, the purpose of binding multiple NICS is not just to increase the bandwidth, but also the biggest advantage is that multiple NICs can effectively enhance the server's load capacity and redundancy and fault tolerance capabilities. Maybe you have also experienced that when you use a single 10 m/m Nic to copy a large file larger than 1g in the LAN, the computer often stops responding, or when the speed is very slow, it will be significantly improved when multiple NICs are bound.

6. Let's try again. What would happen if we didn't bind several hundred megabytes of NICs but several Gigabit NICs? Do you want to try it? Let's join us in DIY to welcome the arrival of the 10G era.

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.