Connect both internal and external network settings in WIN7

Source: Internet
Author: User

Connect both internal and external network settings in WIN7

The current work environment cannot be connected to the Internet, but there are some wireless hotspots around, use a laptop to connect to the wireless network, you can access the Internet, but if you connect to the Intranet, you can not connect to the Internet, this is very troublesome, so I try to find some ways to solve this problem, so that the Intranet and the Internet can be connected at the same time (this will make the Intranet insecure, do not learn ).

After checking on the Internet, you can set a permanent route to solve the problem. I tried to solve the problem.

You do not need to set both the integrated network card and wireless network card, but you need to view some of their information in the "command window" by entering "route print.

For example

Interface list 12 ...... 00 26 82 37 90 a2 ...... Broadcom 802.11g network adapter 11 ...... 00 26 9e 79 39 b9 ...... Broadcom NetLink (TM) Fast Ethernet

Note: My Wireless Network Card is 12 and the integrated network card is 11. This will be used later.

IPv4 route table ============================================ ====================================================== active routing: network target network mask Gateway Interface hops 0.0.0.0 0.0.0.0 172.16.0.1 172.16.0.63 41 0.0.0.0 0.0.0.0 10.111.128.11 10.131.18.141 276

Note: The Gateway is the focus of the entire process. Here, my Intranet gateway is 10.111.128.11 and the wireless gateway is 172.16.0.1.

You can set it here.

First, "All Programs"-"attachments"-"command prompt" and Right-click "Run as administrator" to open the command window.

First clear the network target 0.0.0.0, and run the command: route delete 0.0.0.0

Query the knowledge of route commands by yourself,

Route delete network target (some parameter filters can be added later, such as the network mask and gateway)

For example, route delete 10.0.0.0 mask route 255.0.0 deletes the route with the network target 10.0.0.0 and its mask is 255.255.0.0.

Route delete 10.0.0.0 mask route 255.0.0 192.168.1.1 delete the route with the network target IP address 10.0.0.0, whose mask is 255.255.0.0 and the gateway is 192.168.1.1.

And so on, there are not many parameters followed by add.

Add a wireless static route and run the following command: route add-p 0.0.0.0 mask 0.0.0.0 172.16.0.1 if 12

Add route

-The route added by p is static and exists after restart.

0.0.0.0 wireless connection network target, in order to make the Internet as the main, so the 0.0.0.0 to it

Same as mask 0.0.0.0

172.16.0.1 wireless connection gateway, this cannot be an error

If 12 12 is the wireless network interface, the query above shows

Add a static route on the Intranet. Run the following command: route add-p 10.111.128. 0 mask route 255.255.0 10.111.128.11 if 11 10.111.128.0. The target network on the Intranet is not 0.0.0.0.

Mask 255.255.255.0 is related to the specific Intranet settings.

10.111.128.11 the gateway connected to the Intranet. This cannot be an error.

If 11 11 is an integrated Nic interface, the interface shown in the preceding Query

If both Enis can go out of the Internet, you can manually change the level:

Connection attributes:

Open "network and sharing center", find "Change adapter Settings", enable "Local Connection", and select "Internet Protocol Version 4 ".

Then, find "advanced" in the lower right corner of the pop-up page. Here, an "automatic hops" will appear. Remove the marker before "automatic hops" and change it to a number, for example, 28.

The smaller the value of the hop, the more advanced the gateway is. Generally, the default value is 276. Modify the value as needed.

Note that the gateway and interface cannot be wrong. The Gateway is the key point and needs to be restarted after the configuration is complete. This step cannot be omitted.

Route add-p 190.160.2.0 mask limit 255.0 157.121.1.1 if 13

I set it successfully: Java code 1. view the NIC ID cmd> route print remember the wireless NIC AND INTEGRATED Nic ID

2. delete the default route cmd> route delete 0.0.0.0

3. add a wireless static route add-p 0.0.0.0 mask 0.0.0.0 192.168.1.1 if 12

Add route

-The route added by p is static and exists after restart.

0.0.0.0 wireless connection network target, in order to make the Internet as the main, so the 0.0.0.0 to it

Same as mask 0.0.0.0

172.16.0.1 wireless connection gateway, this cannot be an error

If 12 12 is the wireless network interface, the query above shows

4. add the static route add-p 172.26.1.1 mask route 255.255.0 172.26.5.254 if 11

172.26.1.1 target Intranet network, as long as it is not 0.0.0.0

Mask 255.255.255.0 is related to the specific Intranet settings.

172.26.5.254 cannot be an error

If 11 11 is an integrated Nic interface, the interface shown in the preceding Query

5. view route settings: route print

6. restart the system

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.