Easily configure multiple gateways for Windows

Source: Internet
Author: User
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.

Related Article

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.