Dual-nic Intranet and Internet

Source: Internet
Author: User
Article 1

 

1. Set a gateway in the attributes of one network card (for example, you can set one of the two Intranet segments and one Intranet for the convenience of setting up the Internet). Leave the other gateway blank first.

2. Run cmd. Run the "route-p add Intranet CIDR Block mask subnet mask Intranet Gateway (left blank)" command. If the Intranet CIDR block has multiple segments, run the command several more times. The purpose of this command is to permanently use the original Intranet address through the Intranet gateway, which is suitable for schools and enterprises that have multiple different network segment servers at the same time and have different access.
Note that the correspondence between the CIDR Block and the subnet mask cannot be incorrect!
Example:
Route-p add 192.168.0.0 mask 255.255.0.0 192.168.180.254 metric 1

Note: Set the routing gateway of the 192. 168. IP package to 192.168.180.254, and the-P parameter indicates permanent writing to the route table.
Route-p add 10.0.0.0 mask route 0.0.0 192.168.180.254 metric 1

 

If the default gateway is always provided by the ISP and cannot be changed, try the following methods:

Route change 0.0.0.0 mask 0.0.0.0 gateway-p

Article 2

Q: The operating system I use on my office computer is Windows XP. I have installed two NICs. One is connected to the internal LAN of my office, and the other is connected to the Internet of ADSL cat. Colleagues from other departments use public IP addresses to access the Internet. Therefore, they can access both networks at the same time. If I want to access the Intranet, I have to disconnect ADSL and disable the Internet Nic, enable the Intranet Nic. If you want to connect to the Internet, you have to disable the Intranet Nic, enable the Internet Nic, and then enable the Internet Nic, which is very troublesome. Is there any way for me to access both the Intranet and the Internet?

A: You only need to add a static route. Procedure: click "Start> Run", enter "CMD", and enter the following commands in the open command line window:

Route add xxx. xxx mask yyy. yyy zzz. zzz metric 2 if zzz. zzz

Where: xxx. xxx. xxx. xxx is your intranet network address, yyy. yyy. yyy. yyy is your intranet mask, zzz. zzz. zzz. zzz is the address of your intranet Nic.

Dual Nic settings:

Assume that there is a network segment of 192.168.0.0/24, and the gateway 192.168.0.1

The other network segment is 10.1.0.0/24, and the gateway is 10.1.0.1.

Run the following routing command:

Route add-p 192.168.0.0 mask 255.255.255.0 192.168.0.1 metric 1

Route add-p 10.1.0.0 mask 255.255.255.0 10.1.0.1 metric 1

Route add-p 0.0.0.0 mask 0.0.0.0 10.1.0.1 metric 1 (depending on the specific situation. If you want to connect to another Nic by default, change the gateway address 10.1.0.1 to 192.168.0.1)

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.