Accessing Multiple ISPs on the fly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The situation:

We have a 30 machine network with two routers from two different ISPs
(and two gateways, natch) connected to one switch. Each machine in the
network has Win XP Pro working under a shell and a program that resets all
changes to the original config after each restart. All the machines have My
Documents moved to one (same) directory in a "central" machine that's
identified in each as a network drive (Z:\). They all share this directory
and "see" it as My Documents.

I want the user to select his preferred ISP so I set up two desktop
shortcuts that run NetSwitcher with the corresponding Gateway and DNSs. That
works ok (although I don't understand why I get the same IP when I run
www.whatismyip.com, but that's a secondary issue right now (1)).

The Problem:

When Netswitcher is executed (changing the gateway and DNSs) the network
drive Z: is cut off and reinstated (Z:\ is defined in Netswitcher) so "My
Documents" returns to its original Windows status but doesn't link back to
Z:\. Because of the shell the user cannot Move "My Documents" to the other
drive/subdirectory using the windows XP mouse commands and I wouldn't want
him to anyhow. I want to automate the process so the user isn't even aware
it's happening. Printers shared in the same central machine should still be
shared after the change, but NetSwitcher takes care of that.

I copied the registry keys responsible (2) but the process requires a
restart for "My Documents" to move using that technique (and that's verboten
in this case because everything is reset by the protection program). I'm
looking for a TweakUI type of thing that can be executed from the command
line (in a batch file that includes the NetSwitcher app) so switching from
one ISP to another is seamless.

Thanks for your help

PS: I know these could count as separate questions but they are soooo tiny
that I'll try to squeeze them in:

(1) After running netswitcher and changing the gateway and DNS I still get
the same outside IP when I check it with www.whatismyip.com. Does this mean
Netswitcher is not doing it real job (switching ISPs) on the fly? Would I
still need to restart or is there a "Network Reset".

(2) When I batch copy a key in the registry, how can I avoid the yes/no
confirmation questions.
 
hi,
have you tried netsh ?
ive attached 2 batch files that switch between 2 connections, just put
in the required ip. subnet mask and gateway etc
the second one is for auto ip assignment via dhcp

hth

philip ashley
 
Philip:

Thanks for the tip. No, I hadn't tried it and I've been trying to since
you mentioned it in the post but I can't seem to get it running. My Win XP is
in spanish and I suspect that's a problem. Anyhow, I'd like to try your batch
files, but I don't know where you attached them

Thanks
 
ok assume you have a connection called 'Local Area Connection' then this
script can be put in a text file and the extension changed to .bat
Obvioulsy you need to put the relevant IP addresses that you want.

@Echo On
netsh interface ip set address "Local Area Connection" static
192.168.1.5 255.255.255.000 192.168.1.1 1
netsh interface ip set dns "Local Area Connection" static 194.168.4.100
netsh interface ip add dns "Local Area Connection" 194.168.8.100
netsh interface ip add dns "Local Area Connection" 194.168.12.100

this version changes it to dhcp (auto)

@Echo On
netsh interface ip set address "Local Area Connection" dhcp
netsh interface ip set dns "Local Area Connection" dhcp

hth

philip ashley
 
Philip:

Thanks, it certainly helped BUT although the Local Area Network data
(dns, mask and gateway) changes according to the netsh commands and the
connection within the network (network drive) is kept, I'm still getting the
same ISP IP when I run www.whatismyip.com instead of the other router's IP.
The two routers are connected to the same switch with different dns's and
gateways (same local ip = 192.168.1.xxx). Shouldn't I be connecting to the
internet through the "other" router/ISP when I change gateway and dns? Do I
have to update or refresh something after running netsh? is there a way to
"force" a change of router other than the netsh command?

Thanks again
Michu
 
I am assuming that your WAN connections are going through two differnet
routers. There are a combination of issues here. I believe in order to do
this you have to do three things. First, setup each router to route
different IP subnets (e.g. router A IP subnet = 192.168.1.0 and Router B IP
subnet = 10.0.0.0). Second, each batch file should be setup to add the
workstation to the other subnet if it is used to reset the IP configuration.
Third, in-order-to keep the connection to the node that is hosting the "My
Documents" share you will have to dual home it in both private IP subnets
(e.g. give it an IP address on the192.168.1.0 network and the 10.0.0.0
network). Giving the node that has the "My Documents' share an IP in each
subnet will enable it to properly respond to requests without breaking the
connections.

Switches respond at layer two and could care less what the IP address is.
Its the routers that care. This, in theory, should solve your problem.

I am not sure why you have decided to set your network up like this. But,
if it is for load balancing purposes there are several reasonably priced
routers out there that will bond the WAN channels from different ISPs and
enable proper load balancing. i hope this helped.

Beau

Just a few dual WAN for load balancing. i have not checked this list. i
got it from dslreports.com.

Symantec VPN 200
Nexland Pro800
BroDigit NFR3024
Hawking FR24
Xincom XC-DPG402
Xincom XC-DPG502
Xincom XC-DPG602
OvisLink MN200
HotBrick Firewall VPN 600/2
HotBrick Firewall VPN 1200/2
ZyXel ZyWall 35
Linksys RV082
Edimax BR-6104K
Xterasys XR-4106
Pheenet BIG-02/4
 
Beau:

Thanks, I'm trying to digest all the info you gave me. How do I dual
home the PCs (one is where the "My Documents" and Printers reside and the
other is the machine with the billing app) so they are always "related" to
the client machines?

ps:
The reasons I'm doing this are:
a) The LAN is set-up and running with a 32 port (+ one input) switch
connected through an ADSL router to one ISP. We recently contracted another
ADSL connection with a second (cheaper) ISP. We don't want to throw away the
present - good - switch to buy a new one.
b) We don't want to disconnect the previous ISP until (and if) the new
one proves to be better. Meanwhile we'll be testing both simultaneously,
allowing the user to change between them. If (big if) it might be worth our
while to have both ISPs together we would leave the setup permanently.

Michu
 
Philip:

Thanks for your help. I was just drowning in a puddle. From the
beginning netsh was working just fine. I thought the IP (and therefore the
ISP) wasn't changing because I wasn't refreshing the browser cache. Your
netsh solution works perfectly, thank you.

Michu
 
you're welcome.
netsh is a very powerful command, be careful with it

philip ashley
 
Back
Top