Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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 :) –  ThE_-_BliZZarD Aug 13 '10 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 '10 at 14:42
    
Because you are using the nic interface as the gateway. –  DanBig Aug 13 '10 at 14:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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