Set a route table for two-line Internet access

Source: Internet
Author: User

There are two separate broadband lines in the home, one of which is China Telecom, the other of which is China Netcom, and the other of which has two NICs and two Modem. to make full use of both the two broadband lines, we can ensure that the address access speed of China Netcom and China Telecom lines is relatively fast.

We want to merge the two lines and access the China Telecom Network through the China Telecom ADSL, while access to the China Netcom network through the China Telecom ADSL. This requirement and application are common in actual use.

If you simply bind two NICs together through some network card merging software, this smart routing cannot be achieved. in fact, what this reader needs to solve is similar to the Policy Routing we have previously introduced to allow intelligent transmission of network packets. However, since this reader only has one computer and uses ADSL dial-up to access the Internet, all methods that have previously been introduced to select different lines through policy routing will not work.

Is there a solution such as policy routing in a single-host network environment? The answer is yes. We can use the route table function of the computer. each computer connected to the network has a route table, which is similar to the route table of the router and helps the computer send network requests to the specified IP address. you can start. run "Enter command line window, and then run" route print "to view the route table information of the local machine.

The route table in the computer is the same as the route table on the router. You can add or delete the route table as needed. in this way, the key to solving the reader's problem is how to reasonably plan the route information, so that the telecom network can access the telecom network card and the Netcom network can access the network card.

Step 1:

The network card connecting to China Netcom in the computer. The IP address is set to 192: 168.1.111, the gateway is set to 192.168.1.1, the network card connecting to China Telecom is set to 192: 168.0: 111, and the gateway is set to 192.168.0.1.

Step 2:

Use the "route print" command to query the Default Gateway of the current computer (the Default Gateway address is displayed after the Default Gateway ). if 192.168.1.1 is displayed, the system uses the Netcom line as the egress by default. If 192.168.0.1 is displayed, the system uses the telecom line as the egress by default.

Step 3:

Assume that the default gateway is the China Telecom egress. the IP address segment of China Netcom is 61.156.0.0, so we need to manually add the IP address segment routing information of the China Netcom line. enter route add-p 61.156.0.0 mask1_255.0.0 192.168.1.1 in command line mode. This command will specify that all data transmitted to the address segment 61.156.0.0 will be sent to the Netcom egress Nic 192.168.1.1.

Step 4:

Add all the CIDR blocks to the route table of the Local Machine in sequence. After the settings are complete, the access speed of the China Netcom line and the China Telecom line will be guaranteed.

Related Article

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.