Configure two gateway to work at same time

15 pts.
Router Flapping
I have a network with two routers with different IP addresses. One of the routers is for Internet access and the other makes a VPN connection to another location. What should I do in order to allow a PC with Windows 2000/XP to access both locations (Internet and VPN) at the same time since Windows Network configuration doesn't allow for more than one gateway configured? Many thanks.

My question is what exact setting should I apply? Following is the configuration of my system:
internet setting system ip subnet mask gateway (adsl) dns used by adsl ( VPN setting system IP subnet mask gateway dns used by vpn 

My company's software run on internet but my mail is configured thru VPN. It is not possible to keep the two system all together, so I manually set the internet setting (IP, Subnet, Gateway, DNS).....later in advance setting I add VPN setting (IP, subnet, gateway, DNS) Now if I start pinging all the IP's, gateway's and DNS.....all are replying except VPN DNS just because it is pinging from default gateway( Here I want to set the VPN gateway ( as additional default gateway. Is there any way to route between two different gateway?

Answer Wiki

Thanks. We'll let you know when a new response is added.

You use one router for your VPN and the other for general Internet
activities, so what you’ll need to do is create multiple route entries
in your Windows machine, so it knows when it should use either router.

The easiest way to achieve this would be to set as a gateway the router
you use for your main Internet connection, and then use the following
commands to pass all traffic related to your VPN through the VPN router:

'route –p add <vpn network> mask <vpn router IP>'

You’ll need to repeat this commands depending on the number of networks you need to contact through your VPN.



option makes the route entry permanent, meaning
that if you reboot your PC, these entries will still remain in your
routing table so you don’t need to retype them.


refers to the VPN network you need to access, (e.g.,, and the mask parameter is standard, assuming your
networks are Class C type.

In closing, the <vpn router
IP> is the IP address of your VPN router. I think that pretty much
covers it. Remember that you’ll need to create multiple entries for each
VPN network you require to access!

Good luck.

Discuss This Question: 5  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Rached
    Hi What about setting an VRRP instance ?
    110 pointsBadges:
  • Sarasvatas
    ok....where to add the entry...after adding the entery will it start pinging the mail server
    15 pointsBadges:
  • Darkstar911
    C:windowsSystem32driversetchosts edit that file with notepad. add the entry like
    790 pointsBadges:
  • Darkstar911
    10. 6.4.249 "" without the quotes. this editor putting it as an active url when i type it without the quotes
    790 pointsBadges:
  • Darkstar911
    my solution will work only if you can ping the email server via ip address. If you can not ping the email server you will need to add the static route on the xp client. you can do so from command prompt route add mask metric 0 -p This will add the vpn network to the client machine permanently. It's directing any traffic that are destinedto to use the vpn gateway.
    790 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: