2

I am trying to route between two networks, both connected to my computer. Current situation:

card #1: IP: 172.18.37.64 Gateway: 172.18.36.1

card #2: IP: 192.168.2.187 Gateway: 192.168.2.1

System is Windows XP SP3

Connected to card #1 is the network of my office, card #2 connects me to a small ADSL router. My aim is to route all requests to the office network (all IPs in 172.0.0.0) over card #1 and all other traffic (internet) over card #2 to the ADSL router. Both networks provide DHCP and DNS.

Which rules do I have to add for this to work? I already tried it in my own, but my understanding of this is way too low.

Thank you in advance,

BliZZarD

1 Answer 1

1

route add 0.0.0.0 mask 0.0.0.0 192.168.2.1 -p should route all traffic to the adsl router

route add 172.18.37.0 mask 255.255.255.0 172.18.37.64 -p should then route all traffic destined for your work

You could also just specify an address manually on the work connection without a gateway, which will make all internet traffic go out of the other interface.

3
  • Thank you, but I think the range for the office-network is wrong, as it is the entire 172.xxx.yyy.zzz range AND why did yout put 172.18.37.64 as gateway? I think it should be 172.18.36.1, or am I wrong? So it should be: route add 172.0.0.0 MASK 255.0.0.0 172.18.36.1 -p Please correct my if I am wrong :) Aug 13, 2010 at 14:10
  • I think you need to modify that a little. Only the 172.16.0.0/12 subnet is meant for private networks. In other words, your above routing would cut off from a fair portion of Internet addresses. Use route add 172.16.0.0 mask 255.240.0.0 gw 172.18.36.1
    – wolfgangsz
    Aug 13, 2010 at 14:42
  • Because you are using the nic interface as the gateway.
    – DanBig
    Aug 13, 2010 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.