How can I break through the speed limit when dual-network card bandwidth is difficult to merge?

Source: Internet
Author: User

Network speed is slow, and it takes too long to download resources. Many enterprise network administrators want to improve their speed. Expand the network egress and optimize the internal network structure. Many network administrators once hoped to merge multiple NICs in some way, so that the network communication speed can be improved by merging one or more NICs. However, in the actual use process, the bandwidth combination of the two NICS is not a small problem. On the one hand, it is impossible to determine the network card from which each communication data is transmitted, and on the other hand, it is impossible to perfectly bind two NICs.
I. bandwidth merging of dual access lines is not a small problem
Recently, I am also having a headache for this problem, but I finally found a good solution, today, I would like to invite readers of the IT168 network channel to follow the author's approach to break through the dual network card speed limit through Wei Jie Zhao.
My company applied for two external lines, one being China Netcom ADSL line with 1 mbps bandwidth and the other being China Telecom line with 2 mbps bandwidth. An enterprise forwards internal data packets through a proxy server. The proxy server has dual NICs, but it has never found a perfect tool and means to merge bandwidth. at ordinary times, the Netcom ADSL line is used as a backup line. Generally, it only accesses the Internet through the communication line.
The goal of the author is to connect the two NICs on the proxy server to the two Internet egress lines respectively, and then merge them together to improve the overall network communication speed. After testing, we can see that the download speed reaches the sum of the two lines. The former is China Netcom's ADSL line. The bandwidth is 1 Mbps, the corresponding download speed is 130KB/s, and the latter is the communication channel. The bandwidth is 2 Mbps, and the corresponding download speed is 260KB/s; the total bandwidth limit after merging should be kb/s.
2. Start with a local route: effectively merge bandwidth of two NICs
Some tools on the Internet are used to combine multiple NICs. However, I have tried to use these tools in a poor way, because any software merging is not intelligent enough, it often causes two NICs to conflict with each other, thus affecting the actual transmission speed. The method I want to introduce today is to break through the network speed limit by starting from the local route.
As we all know, for a computer with multiple NICs, we can regard it as a router, and the proxy server uses this routing data principle to work. A data entry named "route table" exists in the router, and data is forwarded through the information in the route table. When a computer has multiple NICs, can we set a route table to forward data? How can I send some data to NIC 1 while others to Network 2? The answer is yes. We can add route entries for the computer operating system as we set routes.
In Windows, we run the route print command to view the route table. The route table belongs to the local system. We run the route add command to add a route table entry and delete the route entry through route delete.
Since we can use commands to add route table and entry information, how can we fill in route entries? In the route add command, we need to know the forwarding network IP segment and the corresponding subnet mask, and the next hop address of the route. I will introduce the actual application of enterprises as an example.
When an enterprise computer has multiple NICs, we can use ipconfig to view the addresses of each Nic. For example, if Nic 1 is 192.168.1.120, Nic 1's gateway is 192.168.1.1, and nic 2 is 116.245.96.246, because PPPOE is used for dialing, the gateway is also 116.245.96.246. (1)

Next, we need to determine the network card from which the data goes by default. Here we assume that the default data goes from network card 2, when we enter route print in the Command Prompt window, we can see the default gateway at the bottom. This is the default gateway, you can see that the default gateway of the current system is the IP address 116.245.96.246 of Network Card 2, rather than the IP address 192.168.1.1 of Network Card 1. (2)

 

How can I change the default gateway address displayed in route print if it is not the default Nic we want? For example, in the above example, the default gateway is 192.168.1.1 of Network Card 1. We can solve this problem in two ways: Disable Nic 1, restart the computer, and view the default Nic through route print. Because only NIC 2 is enabled, therefore, the default Nic is also changed to the NIC 2, and then enable Nic 1. If this method is not used, we need to edit the key values related to local connections in the registry. By modifying the key value, we can change the key values of network adapter 2 to the front of network adapter 1, this solves the problem of the default Nic. The specific key value is [HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesTcpipParametersInterfaces. Due to the length relationship, it is not detailed here. Generally, the first solution can be used in most cases.
Make sure that the default network adapter is the default data communication address, and then we need to add the route table according to the actual situation. Suppose we want to access the 58.129.0.0 address segment, however, to increase the speed so that they do not communicate from the default gateway (Network Card 2) but from Network Card 1, we need to add such a command) route add 58.129.0.0 mask route 255.0.0 192.168.1.1. (3)

 

First, the route add is followed by the network segment, including the network number and subnet mask. In addition, you also need to write the next hop address, which is generally the gateway address of Network Card 1, such as 192.168.1.1 in this example.
After adding route table entries, we can see the route information corresponding to 58.129.0.0 appears in the route table through the route print command. The next hop address is 192.168.1.1. (4)

 

TIPS:
The next hop address is the data forwarding address. You must enter the gateway address of Network Card 1, not the IP address of Network Card 1. Otherwise, the route entry will not work properly, the network segment 58.129.0.0 will have an endless loop and the communication data connection times out.
Of course, in addition to the route add command, you can also use the route delete command to delete an entry if a writing error occurs. Remember to write it all before the delete command takes effect, of course, the route command also has many additional parameters, such as the number of hops such as metric, which are not used in this example. Because our routes are only one hop, we can leave it empty, of course, if you are interested, you can use /? .
 
4. How to achieve data delivery? Download Nic 1 and browse Nic 2?
Previously, we introduced network segment-based traffic distribution. By adding multiple network segments, we can achieve more detailed address segmentation and transmit data packets sent to different addresses through different NICs. However, in actual use, I also encountered this problem. Is there a way to allow all downloads to go through Nic 1 and browse the page to go through Nic 2 for communication? I want to think about it and cannot find an efficient solution. I hope experienced readers can contact us to discuss it.
The solution is to use agents to distribute the software. We can find a fast and secure proxy server on the Internet, after knowing the proxy server address, we can use the route add command to specify the network card used to access the proxy server. Next, specify a software to communicate with the proxy server. For example, we have specified thunder to download and use the proxy server 1.1.1.1, and then use route add to forward the data accessing 1.1.1.1 to the gateway of Network Card 1. Other data is still transmitted from network card 2, this solves the problem of Software Delivery. However, this method has a problem, that is, it requires high stability and speed for the proxy server. If the proxy server is unavailable, we also have to worry about frequent agent requests and frequent route entries. (7)

TIPS:
For software that does not have the proxy setting function, we can use the third-party proxy tool winsocks to specify the software to use the proxy function.

V. Summary:
Through the methods described in this article, we can easily combine the two NICs to maximize their speed limit, so as to serve enterprise applications at the best speed, this greatly improves the efficiency of enterprise applications and enables business development to get twice the result with half the effort.

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.