Two NIC access to different network case sharing

Source: Internet
Author: User

Now a lot of notebooks have a wireless network card, there is a wired network card. How to achieve the use of these two network cards without switching, access to the intranet, and extranet? In fact, it is very simple, using routing can be done, look at the following sharing cases. In many companies are very useful, white-collar must

Background

The computer running Windows XP used by an enterprise user has two network cards, the network card 1 is connected to the Internet via PPPoE, and the network card 2 is connected to the intranet through the LAN, and the Enterprise internal network is 172.16.0.0/ 16, the Internal network gateway is 172.16.0.1, and the IP address of network card 2 is 172.16.0.17.

Symptoms

In the absence of a connection to the Internet, the user can access the entire enterprise internal network. When the user connects to the Internet, it loses the connectivity of the enterprise's internal network 172.16.0.0. The user correctly sets the IP address, subnet mask, and default gateway in the network connection properties.

Analysis

When the user is not connected to the Internet, we enter at the command line: Route print displays the routing table, as shown, and the current default gateway is 172.16.0.1. Ping Internal network 172.16.0.0 all appear normal.

Next the user is connected to the Internet, and then we re-enter the route print display routing table, discovering that the routing table default route has changed, and the default gateway from 172.16.0.1 to 61.30.30.61, which is the gateway address of the network card 1 connection. Then we ping 172.16.0.0 This network, show timeout.

As a result, we confirm that Windows has "arbitrarily" changed the routing error caused by the default route after PPPoE negotiation, sending the data sent to the intranet to the Internet incorrectly.

[Solution

For the Internet, we must use the default route. In the case that the intranet gateway can not provide the RIP information, we can only send the data belonging to the intranet to 172.16.0.17 by setting the static route. )

Under cmd Enter:

Route-p Add 172.16.0.0 Mask 255.255.0.0 172.16.0.17 metric 1 if []

Here [] represents the index of the export interface, which you can see using the route Print command. Note that this value is 16, so you have to add 0x to the front. For example, the export interface is local area Connection 2, the corresponding index is 0x10003, then these two commands should be written as:

Route-p Add 172.16.0.0 Mask 255.255.0.0 172.16.0.17 metric 1 if 0x100034 B8 X9 V, O5 W. F9 B

Now we're going to use route print to view the routing table. A new route appears in the routing table:

Network destination=172.16.0.0 netmask=255.255.0.0 gateway=172.16.0.17

Open

This route indicates that the data to go to 172.16.0.0/16 is chosen 172.16.0.17 as a gateway. This ensures that data destined for the internal network is routed through the correct gateway.

[FAQ]

Q: How did the 0x10003 in the above example come from?

A: Display using the route Print command. In the interface list shown in the first few lines. )

Q: What if I don't write the IF parameter?

A:windows will automatically choose the most appropriate interface. But Windows doesn't guarantee that the choice is what you want.

What does the metric of the Q:route Print command mean?

A:metric is in decimal. It represents which route windows prioritizes when multiple routes to the same prefix appear. The metric value is about the higher the small priority value. For example, for 172.16.0.0/16 this network, if one of the routes has a metric of 40 and the other is 39, then Windows takes precedence over the metric route 39. If at some point the route is not valid (for example, a network outage), then the route with metric is 40. If the route to metric 39 is later restored, Windows will skip back to using this route.

Q: Dual NIC is to the network for physical isolation, what is the purpose of this program?

A: The questioner does not understand the basic definition of the network, the problem itself has a problem with the logic of the statement, so do not answer

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

11.11 Big Sale for Cloud

Get Unbeatable Offers with up to 90% Off,Oct.24-Nov.13 (UTC+8)

Get It Now >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.