PDA

View Full Version : Internet Connection through lan (WXP-Pro)



acharif
03-21-2006, 01:50 AM
Ok, this is one of those things that i couldn't find info about anywhere on the Microsoft site. I have two lan connections to my computer, both of them supplying internet, how do i tell my computer which one to use specifically for internet? because they each have restricted sites, so i would like to be able to switch between them, specifying which one is the internet lan.

P.S. i do need both of them to be active, disabling one of them is not an option...

Many thanks in advance to any help!!!

motoflop
03-22-2006, 07:08 AM
I didn't quite understand what you like to do.

Are you hosting webservers on you computer and asking how to select which lan interface people can connect to your computer? Or do you need help how to configure windows to use specific network card to access specific web sites on internet?

If the case is later one, you need to use "route" command to tell windows how to access different hosts using several lan interfaces. Type "route /?" for command prompt to get some help.

Anyway, you should have posted this message to network discussion area. When you post to proper forum, you get better answers.

Brf
03-22-2006, 10:04 AM
I think he is saying his computer is connected to two LANs and therefore two default gateways.

You could probably delete one of the default gateways, using the before-mentioned ROUTE command, but it would probably refresh itself upon rebooting.

Another way, is to find the IP-address, or subnet, that is forbidden on one gateway and make a routing for the other gateway, so your computer uses that....

For instance...

ROUTE -p ADD 216.163.137.3 MASK 255.255.255.255 192.168.0.1

where 192.168.0.1 is your more permissive gateway.

acharif
03-23-2006, 01:54 AM
Thank you both for the help! what the situation is exactly, is that at work, i am connected to two lans, both of them supply internet! one of them allows hotmail and such, the other doesn't, so when i un-plug the restricted lan, i can access everything fine, however if i plug the other one in (to get access to my work files and such, which is every like 5 minutes!) i loose connectivitiy to msn and all blocked sites. why is that, even though lan2 is still connected? is there a way for me to tell windows use lan 2 as the gateway, and never lan1?

note that both lans use DHCP, so they might get different ip's every day.

Again, many thanks for your help!!

motoflop
03-23-2006, 03:40 AM
If you loose connectivity to some sites after 5 minutes, that could be because of DNS resolver cache timeout. When you first access for example MSN, windows will cache ip address (and perhaps also routing information) for it. If you don't use MSN for some period, windows will remove that information from DNS cache. When you next time use MSN, windows will do new DNS query. If now you have both lan interfaces available, it might be that now windows decides to access MSN thru your more restrictive lan interface.

Anyway, you should be able to solve your problems by defining persistent routes for your restricted services. Use ROUTE command with "-p" switch to make your definition persistent.

Brf
03-23-2006, 09:53 AM
DHCP will probably keep putting the bad default gateway back if he tries to delete it.... but we could probably fool it by putting in a couple lines like this:

ROUTE -p ADD 0.0.0.0 mask 128.0.0.0 192.168.0.1
ROUTE -p ADD 128.0.0.0 mask 128.0.0.0 192.168.0.1

where 192.168.0.1 is the more permissive gateway.

Those two lines include all possible IPs, so they should override the default gateway.

<P ID="edit"><FONT class="small">Edited by Brf on 03/23/06 09:53.</FONT></P>

acharif
03-24-2006, 12:03 AM
you are Right, this is exactly what is happeneing! one minute i am connected, then all of a sudden, it stops working! i have tried messing around with the route command, but somehow i am getting the syntax wrong i think?

acharif
03-24-2006, 12:05 AM
Ok, i will try adding those lines and hopefully it should work, thanks in advance for taking the time to help!