Notebook automatically switches inside and outside the network

At work, due to the company network will restrict access to most of the site, and we often need to use external networks to use search engines, etc., so you need to configure automatically switches inside and outside the network.

First, start Command Prompt as administrator]

The first step: connecting the network, acquires network gateway: enter commands the ipconfig , the transport, network gateway to obtain, record

Step two: the network is disconnected, connected to the external network, use the same command ipconfig Enter obtained outside the network gateway (if the outer wifi network is typically the wireless LAN adapter [WLAN]), recorded

The third step: Delete the default route

route delete 0.0.0.0

Step four: first use the route print to view the routing situation to see whether the route you want to add a permanent presence, such as my network gateway is 172.xx254, then see if there is 172.0.0.0 exist, there is removed, there may ignore the step (if not, delete the following figure appears the case)

Step Five: Add persistent routes

1) configure the default gateway, here the gateway to external networks 192.168.xx second step is obtained

route -p add 0.0.0.0 mask 0.0.0.0 192.168.x.x 

2) Add the network gateway, here 172.1.11.254 is the first step to get the network gateway

route -p add 172.0.0.0 mask 255.0.0.0 172.1.11.254

Step Six: route print View Results

Step 7: Use a browser to test whether the automatic switch and external network

Reference: How the same time on the intranet and extranet

 

Published 95 original articles · won praise 43 · views 70000 +

Guess you like

Origin blog.csdn.net/lyxuefeng/article/details/105064243