After the company has done the internal and external network isolation, the same computer may need to switch back and forth when surfing the Internet, which brings no small trouble to the work. By modifying the Windows system default routing settings, you can enable a laptop to connect to both the intranet and the extranet at the same time.
Take the situation I encountered as an example: the intranet needs to be configured 10. Segment IP, extranet requires wireless acquisition of IP (192. Segment)
Prerequisites:
Notebook two network card, generally wireless card and wired network card, if your computer is not too old, this condition is basically satisfied;
Required Documents:
Create a new text file that is saved as a batch file with a. bat suffix, such as "Bridgingnet.bat", with the following code:
@echo Offecho=echo Please make sure the network is connected!! Echo=pauserem Delete default route information for local computer route Delete 0.0.0.0Rem create default route (extranet) route add 0.0.0.0 mask 0.0.0.0 192.168.100.254Rem Add route information to this computer segment route add 10.96.122.0 mask 255.255.255.0 10.96.122.1Rem Add route route information to server segment route add 10.96.123.0 Mask 255.255.255.0 10.96.122.1echo=echo Warning: If there is no intranet operation, please disconnect the Intranet, pay attention to data Security!!! Echo=pause
Code Description:
1, the local computer wired network segment for 10.96.122.*, because we want to access some 10.96.123.* network segment of the server, so in the add route information, to join another to you want to access the network segment routing point (note gateway input)
Route add 10.96.123.0 Mask 255.255.255.0 10.96.122.1
2, the local computer wireless network default gateway IP is: 192.168.100.254
Route add 0.0.0.0 Mask 0.0.0.0 192.168.100.254
Operation Configuration Process
1, first configure the local IP to ensure that the network is connected to normal;
2, switch wireless, to ensure that the computer can connect to the wireless network is normal, at this time the cable network will certainly be disconnected, because Windows can only have a default gateway in effect
3, Win7 or more version of the operating system, right-click "Run as Administrator" batch file, you can achieve both internal and external network connection.
Description
1, the batch processing modifies the default gateway information, is not a fixed gateway information, so every time the computer boot needs to run this file;
2, this file will delete the default gateway of the wired network card, if you find the network connection is abnormal, you need to manually configure the default gateway for local connection, after the network connection is normal, then switch to the external network connection is normal, and finally run the batch file.
3, online there seems to be a fixed configuration gateway method, from the point of view of network security, or do not fix good, since the enterprise to isolate, or temporary use of the connection is better.
Finally, I feel that the network knowledge learned during college is not wasted:)
This article is from the "LEO.R" blog, make sure to keep this source http://leo1986.blog.51cto.com/4303348/1765797
The solution of connecting the laptop computer to the intranet network of the company