In the more complex network environment, users need to access different network servers through different gateways, for example, when users use ADSL at home, they need to switch different gateways when they use LAN. With the Windows System Control Panel in the configuration of the network, although you can configure multiple gateways, but really effective only one gateway, that is, the default gateway, and therefore can not meet the needs of users.
How can I configure multiple gateways in a Windows system? The first step is to write the routing program "Route.bat" file under the Windows installation directory, which reads:
Route Add target 1 mask subnet Mask Gateway 1
Route Add Target 2 mask subnet Mask Gateway 2
Route add 0.0.0.0 mask 0.0.0.0 default gateway
Goal 1 is the first network number for the route, and Goal 2 is the second network number for the route. The subnet mask is a subnet mask of two networks, respectively.
The second setting automatically executes the routing program "Route.bat" Each time you start Windows, and the shortcut to the program "Route.bat" is added to the menu's startup bar. The specific steps are: Click "start → settings → taskbar and Start menu" To customize the Start menu program. Click Add, enter "C:/windows/route.bat" and press ENTER. Here we assume that the installation directory for Windows is "c:/windows". Then double-click the Startup folder, enter the name of the program on the Start menu, and then click Next to select the program icon. Finally, to modify the properties of the shortcut to the program "Route.bat", click "start → program → start", the right mouse click "Route.bat", select Properties, select "Minimize" and "close on exit" can be.
Through the above settings, you can meet the needs of users to configure multiple gateways.