Method for simultaneous Intranet and Internet access-Static Routing

Source: Internet
Author: User

Add a static route.

Route add 10.123.36.0 mask limit 255.0 10.123.36.254-P

In this way, the restart will not be lost, but Lin Zi is big and there are all animals. No matter how disabled or exchanged after a computer's dual Nic is started, the default gateway is the one provided by the ISP, this will make me feel at a loss and decide to change it with a try.

Route change 0.0.0.0 mask 0.0.0.0 202.138.38.254-P

Again, the default gateway is actually changed.

 

Another referenceArticle:

1.Set the IP address and gateway of the NIC connected to the Internet as required.

-- Note: This is the NIC corresponding to the Internet. IP address, mask, DNS, and so on are configured in the TCP/IP attribute according to the IP Address Allocation of the Internet of your organization.

2.After the nic ip address of the intranet connection unit is configured, set the gateway to null (that is, no gateway is set). After the gateway is enabled, the Intranet cannot be routed through the gateway.

Note: OnlyIP addressAndSubnet Mask

3.Go to CMD and run:Route-P add192.0.0.0Mask 255.0.0.0192.168.0.1Metric 1

-- Note: Set the routing gateway of the 192 * IP package to 192.168.0.1, and the-p parameter indicates that the route table is permanently written. We recommend that you do not add this parameter first, and write it after practice.

-- 192.0.0.0 and 192.168.0.1 are the Intranet CIDR blocks and gateways of your organization. You can set them based on your organization.

4.OK! Enable two NICs at the same time. The two gateways can work at the same time, and the two subnets can be accessed at the same time. You do not need to reset them after Shutdown and restart!

 

Also:

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 route entry. 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 netric 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.

The machine has two NICs connected to the two switches.

Internet address: 192.168.1.8, subnet mask: 255.255.255.0, Gateway: 192.168.1.1

Intranet address: 172.23.1.8, subnet mask: 255.255.255.0, Gateway: 172.23.1.1

If you set the IP address and gateway of each network card according to the normal setting method, you will see it when you use Route print in cmd.

Network destination netmask Gateway Interface Metric

0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.8

0.0.0.0 0.0.0.0 172.23.1.1 172.23.1.8

That is, there are two gateways pointing to 0.0.0.0, so there will be a route conflict and both networks will not be accessible.

How can I access two networks at the same time? The route command is used.

Step 1: Route Delete 0.0.0.0 "delete all 0.0.0.0 routes"

Step 2: Route add 0.0.0.0 mask 0.0.0.0 192.168.1.1 "add 0.0.0.0 network route", which means you can access the Internet.

Step 3: Route add 172.23.0.0 mask route 0.0.0 172.23.1.1 "add 172.23.0.0 network route". Note that the mask is 255.0.0.0 rather than 255.255.255.0, so that multiple internal network segments are available.

In this case, you can access the two networks at the same time. However, if you encounter a problem, the route added using the above command will be automatically lost after the system restarts. How can you save the existing route table?

Route add-P adds a static route. After restart, the route will not be lost. Note: remove the gateway that is connected to the NIC of the enterprise intranet in the TCP/IP settings before use.

Bytes ------------------------------------------------------------------------------------------------------------------------------

Some organizations separate the Intranet from the Internet. This is painful, even if the unit is. Of course, boss is based on security considerations, but what should I do without a notebook? You have to work and have Internet access. There is no way to carry forward the DIY spirit and secretly install a network card to keep chatting and working together. Make your host both inside and outside. This is what I found on the Internet. Thank you. The method is as follows:
1.Set the gateway to 10.0.0.1 for the NIC connected to the Internet.
-- Note: This is the NIC corresponding to the Internet. According to the IP Address Allocation of your organization's Internet, IP addresses, masks, and DNS are configured in the TCP/IP attribute.

2.After the nic ip address of the intranet connection unit is configured, set the gateway to null (that is, no gateway is set). After the gateway is enabled, the Intranet cannot be routed through the gateway.

3.Go to CMD and run:Route-P add 192.0.0.0 mask 255.0.0.0 192.168.0.1 metric 1

-- Note: Set the routing gateway of the 192 * IP package to 192.168.0.1, and the-p parameter indicates that the route table is permanently written. We recommend that you do not add this parameter first, and write it after practice.

4.OK! Enable two NICs at the same time. The two gateways can work at the same time, and the two subnets can be accessed at the same time. You do not need to reset them after Shutdown and restart.

 

 

 

 

 

Many companies' network administrators try to solve the problem of dual NICs. Next I will explain in detail how to use dual NICs at the same time, so as to ensure the security of the Intranet and solve the problem of computer access to the Internet, two birds in one fell swoop. I hope you will like it.

First, your machine must have two NICs connected to the two switches respectively,

Internet address: 192.168.1.8, subnet mask: 255.255.255.0, Gateway: 192.168.1.1

Intranet address: 172.23.1.8, subnet mask: 255.255.255.0, Gateway: 172.23.1.1

If you set the IP address and gateway of each network card according to the normal setting method, you will see it when you use Route print in cmd.

Network destination netmask Gateway Interface Metric

0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.8

0.0.0.0 0.0.0.0 172.23.1.1 172.23.1.8

That is, there are two gateways pointing to 0.0.0.0, so there will be a route conflict and both networks will not be accessible.

How can I access two networks at the same time? The route command is used.

Step 1: Route Delete 0.0.0.0 "delete all 0.0.0.0 routes"

Step 2: Route add 0.0.0.0 mask 0.0.0.0 192.168.1.1 "add 0.0.0.0 network route", which means you can access the Internet.

Step 3: Route add 172.23.0.0 mask route 0.0.0 172.23.1.1 "add 172.23.0.0 network route". Note that the mask is 255.0.0.0 rather than 255.255.255.0, so that multiple internal network segments are available.

In this case, you can access the two networks at the same time. However, if you encounter a problem, the route added using the above command will be automatically lost after the system restarts. How can you save the existing route table?

Route add-P adds a static route. After restart, the route will not be lost. Note: remove the gateway that is connected to the NIC of the enterprise intranet in the TCP/IP settings before use.

Bytes ------------------------------------------------------------------------------------------------

Some organizations separate the Intranet from the Internet. This is painful, even if the unit is. Of course, boss is based on security considerations, but what should I do without a notebook? You have to work and have Internet access. There is no way to carry forward the DIY spirit and secretly install a network card to keep chatting and working together. Make your host both inside and outside. This is what I found on the Internet. Thank you. The method is as follows:
1. Set the gateway for the NIC connected to the Internet to 10.0.0.1. The default gateway is enabled
-- Note: This is the NIC corresponding to the Internet. According to the IP Address Allocation of your organization's Internet, IP addresses, masks, and DNS are configured in the TCP/IP attribute.

2. Configure the nic ip address of the intranet connection unit and set the gateway to null (no gateway is available). After the gateway is enabled, the Intranet cannot be routed through the gateway.

3. Go to CMD and run: route-P add 192.0.0.0 mask route 0.0.0 192.168.0.1 metric 1

-- Note: Set the routing gateway of the 192 * IP package to 192.168.0.1, and the-p parameter indicates that the route table is permanently written. We recommend that you do not add this parameter first, and write it after practice.

4. OK! Enable two NICs at the same time. The two gateways can work at the same time, and the two subnets can be accessed at the same time. You do not need to reset them after Shutdown and restart!

In fact, this is a way to fold .... It is a good method to make your dual-nic run at the same time. Let's take a look ..

Bytes -----------------------------------------------------------------------------------

We often encounter the need for a computer to access two networks at the same time (one is the Internet and the other is the enterprise intranet ).
Take this unit as an example: the address is fictitious ^_^

The machine has two NICs connected to the internet address 218.22.123.123 on the two switches, subnet mask: 255.255.255.0, Gateway: 218.22.123.254
Intranet address: 10.128.123.123, subnet mask: 255.255.255.0, Gateway: 10.128.123.254
If you set the IP address and gateway of each network card according to the normal setting method, you will see it when you use Route print in cmd.
Network destination netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 218.22.123.254 218.22.123.123 20
0.0.0.0 0.0.0.0 10.128.123.254 10.128.123.123 1
That is, there are two gateways pointing to 0.0.0.0, so there will be a route conflict and both networks will not be accessible. To access two networks at the same time, you must use the route command.
Step 1: Delete route 0.0.0.0 to delete all route entries 0.0.0.0
Step 2: Add route add 0.0.0.0 mask 0.0.0.0 218.22.123.254 add 0.0.0.0 network route> Step 3: Add route 10.0.0.0 mask route 0.0.0 10.128.123.254 add 10.0.0.0 network route
In this case, you can access the two networks at the same time. However, if you encounter a problem, the route added using the above command will be automatically lost after the system restarts. How can you save the existing route table?
In Win2000, you can use Route add-P to add a static route. After restart, the route will not be lost. Note: remove the gateway that is connected to the NIC of the enterprise intranet in the TCP/IP settings before use.
If you do not have the-p Parameter in Win98, you can save the preceding command to A. BAT file and then call it at startup.

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.