How to use different gateways for different IP addresses when connected to multiple gateways - Win7

1

My office has a LAN and a Open ADSL (without proxy) via WIFI. Though I'm connected to both I can't use them same time. So How am I edit and add routes so for specific ips uses different gateways. I found this article which I don't understand it well.

Configuring multiple gateways on a network

Prashan Fernando

Posted 2014-04-08T03:38:24.463

Reputation: 11

Answers

0

Say your LAN has gateway 192.168.0.1(i.e. IP are in the range 192.168.0.xxx) and WIFI has gateway 192.168.1.1(i.e. IP are in the range 192.168.1.xxx)

use this at command prompt:

route -p add 192.168.0.0 mask 255.255.255.0 192.168.0.1 metric 1 if 20
route -p add 192.168.1.0 mask 255.255.255.0 192.168.1.1 metric 2 if 21

Interface index(20,21) says, which interface to use for each route. Interface index is seen at route printenter image description here

After adding use

route print

and check if the routes have been added.

pulsarjune

Posted 2014-04-08T03:38:24.463

Reputation: 1 242

I added routes. But still it's not working. pls correct me if i am wrong.

Screenshot

– Prashan Fernando – 2014-04-08T15:45:13.237

@PrashanFernando the routes have added. could you detail on the IP ranges of each network, and gateway of each? – pulsarjune – 2014-04-09T11:09:25.653