Dual Nic, Internet Nic, Intranet Nic settings.

Source: Internet
Author: User
The following describes how to perform the operation. Take my computer as an example to give a demonstration.

I also have two NICs, one is the Office intranet and the other is the Internet.
Set the IP address to 192.168.1.111 and the gateway to 192.168.1.1.
Nic connected to the Internet, IP: 192.168.0.111, and Gateway: 192.168.0.1
In the command line, run the route print command to view the current default route table:
The bottom row: Default Gateway: 192.168.1.1
It means the default gateway. A computer has only one default gateway, and all data packets are sent to the gateway address first. According to the display, 192.168.1.1 represents my Intranet, that is, all data packets are automatically prioritized from the Internet line.

 

Add a route table permanently with this command
route-P add 0.0.0.0 mask 0.0.0.0 192.168.0.1 ( Note: all networks go 192.168.0.1 gateway ) (Internet)

Route-P add 192.0.0.0 mask route 0.0.0 192.168.1.1 (Note: Only192Network192.168.1.1Gateway)(Intranet)

 

It is also convenient to delete route records. Run the following command:
Route Delete 192.0.0.0

 

====================

 

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 ..

 

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.