Manually add routes and use both AD and Campus Network

Source: Internet
Author: User
Haha, after suddenly saying "I want to modify the route table" in the group tonight, I caught the attention of the class. Haha, I also learned some chicken feathers.

The requirement is probably like this: there are currently two NICs in the computer, and the dormitory has AD and campus network. In order to simultaneously access the AD and campus network, but when the accessed site is a campus network, use the network card connected to the campus network to access other websites.

The idea is to manually add IP addresses of known campus network segments to the route table, and specify the gateway as the gateway connecting to the Campus Network (which is assumed as 192.168.2.1 ), use the Default Gateway (for example, AD, 192.168.3.1) to access other IP segments.

The command used:
ROUTE [-f] [-p] [command [destination] [MASK netmask] [gateway] [METRIC metric] [IF interface]

For details, see route?

Actual Operation:
1. Check the route table before the settings:
Route print
2. Add route ing for campus network segments:
Here are two examples, for example, the Intranet segment of the Emy is 10.10.0.0 mask 255.255.0.0, and the network segment of the school is 222.99.0.0 mask 255.255.255.0.0.
The command is as follows:
Route-p add 10.10.0.0 mask route 0.0 192.168.2.1
Route-p add 222.99.0.0 mask route 255.0.0 192.168.2.1
3. view the configured route table:
Route print

4. default Gateway settings: Here, set AD: 192.168.3.1 as the default gateway. On "network connection", select the network connection that connects to AD, choose Properties> TCP/IP> Properties> advanced> set the number of hops to 10. Then, select the network connection connecting to the campus network and set the number of hops to 20. (milk child: If the routing table has multiple default gateways with the lowest hops, the TCP/IP IP address is determined based on the binding priority of the network interface corresponding to the default gateway in the advanced settings of network connection)

5. test:

Finally, the disadvantage is that there are too many campus network IP segments. If you can identify them automatically, record them.

Hope to be useful to friends with dual NICs.

12.20 Add "route settings assistant". You must install. NET Framework 2.0 to run the program. Alternatively, you can directly run the batch file "SetCENETIPv4.bat" in the compressed package ".
: Route settings Assistant
Defects in the Code: continuous start and close CMD, resulting in clicking "Update route table", the program has a false state.

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.