Routing settings for Intranet and Internet networks on dual NICs

Source: Internet
Author: User


It's actually easy to achieve dual-nic Internet access at the same time !!! Please refer to the following !!! In fact, it's easy to do. You only need to add two routes! Open CMD (you should know what it is, start-run-press CMD.) 1. route delete 0.0.0.0 // delete the route 0.0.0.0. Because there is a conflict between the route 0.0.0.0 and the two network segments, the packet does not know which route to be sent, even if it can occasionally access the Internet,> 2. route add 0.0.0.0 mask 0.0.0.0 192.168.1.1 // add the default Nic to the Internet to ensure the Internet can be accessed. route add 0.0.0.0 means to add an IP address for any purpose, mask 0.0.0.0 is any subnet mask 192.168.1.1 connected to the Internet Gateway 3. route add 192.168.19.0 mask 255.255.255.0 192.168.161.1 // add the Intranet as 192.168.19.0, And the subnet mask 255.255.0 gateway 192.168.161.1. I mainly want to access this Intranet. Maybe someone will ask my friend if the Intranet is not 192.168.161.0, smart people should know that friend companies are divided into segments. After several routers, they are divided into friend departments to divide the network segment 192.168.161.0, for example: if your intranet is 192.168.0.0 or 172.16.0.0, you only need to set 192. Replace 168.19.0 with your CIDR block. After adding the two CIDR blocks, you can access the Intranet and Internet at the same time. It feels good. You can't try it now! Www.2cto.com should also be noted that, in this way, the restart is disabled, because it is only set temporarily, -p route-p add should be added to the route table permanently (if you want to write data to the route table permanently, do not add the route delete 0.0.0.0). However, I do not recommend this method, because every restart will have two 0.0.0.0 networks, although their metric values are different, but sometimes the Internet is still on and off, sometimes the Internet connection is not connected, the best way is to write a batch processing, don't worry about writing. In fact, it's easy to open a notebook and add route delete 0.0.0.0 route add 0.0.0.0 mask 0.0.0.0 192.168.1.1 route add 192.168.19.0 mask 255.255.255.0 192.168.161.1 to add the above three items, save as route. bat, which can be any name, but with a suffix. bat to add route. ba T. log on to the script! Start-run-tap gpedit. msc-user configuration-windows Settings-script (login/logout)-double-click Login-add, find the batch processing-OK, and restart later! Author shanblue

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.