Battlezone Universe

Battlezone Universe => Overdrive Terminal => Topic started by: ScarleTomato on July 22, 2009, 07:56:56 PM

Title: multiple static IP configurations
Post by: ScarleTomato on July 22, 2009, 07:56:56 PM
I've got a wireless laptop and I use it frequently between two separate networks. I'm trying to find a way to have static IP's on both networks, to where it will automatically switch the primary DNS, gateway and local IP address automatically depending on where it's at. (maybe depending on what the SSID of the wireless is)

Using XP SP3 and windows' network configuration applications

I can't figure out what to search for on google and i keep getting results for business class multiple external static IPs which isn't at all what I'm looking for.

Has anyone had a problem like this or might be able to point me in the right direction?
Title: Re: multiple static IP configurations
Post by: Red Devil on July 22, 2009, 11:25:54 PM
Look under your LAN setting, scroll dowm and select Internet Protocol (TCP/IP), clcik Properties button, click Advanced button, Add button, etc.
Title: Re: multiple static IP configurations
Post by: ScarleTomato on July 23, 2009, 02:20:27 AM
I tried that first but it doesn't change my primary IP address or DNS server. I can make 192.168.2.1 my primary DNS and 192.168.5.1 my secondary but when i'm at the *.*.5.1 site it takes a very long time to connect if it ever does.

The other thing is that I need to be able to communicate with computers within each of the local networks. Using the mentioned method, if i make 192.168.2.10 the first ip address and 192.168.5.10 the second IP address I cant communicate with any of the 192.168.5.* computers when i'm on that network. And vice versa
Title: Re: multiple static IP configurations
Post by: Red Devil on July 23, 2009, 02:22:36 AM
Add the other gateway, too?
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 23, 2009, 02:39:48 AM
Its easy most of the time, if you want to set up a static internal/network IP. If you set the IP address of your computer to a static one in the config of the router/gateway, then it should stick.

On different types of router configs, the setting is typically located in the settings which control the internal network or DHCP server (the DHCP server is what assigns IPs to all of the computers on your network)

On my D-LINK router for example. If I wanted to set my computer to have a static internal IP (like say 192.168.0.133), then I would log into my router. Go to Setup -> Network Settings -> DHCP Reservations.
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 23, 2009, 02:50:01 AM
Also, the auto wireless settings on XP SP3 are designed to gracefully switch between the networks when you carry your lappy between multiple APs (Access Points). It is the job of your Router/Gateway to assign you an IP and to tell you which DNS servers to use.

Also why are you trying to use internal IP's (192.*) as DNS servers? It doesnt make much sense to do it on a computer which is not directly connected to the internet.

If you're using internal computers (ones which are not DIRECTLY internet connected) as DNS servers, then it seems problematic because the DNS stuff would flow like this:

Your computer communicates with another LAN computer for DNS,
LAN computer communicates with external DNS (aka: you're ISP's DNS servers, or an OpenDNS server, if so configured).
External DNS actually does all of the IP/Domain Name lookups

It adds one more point of potential failure to your networking system.

You are aware exactly what DNS does right? (i'm just asking to make sure)
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 23, 2009, 02:51:53 AM
Also, if you want to use a custom DNS server, why not just set it up on the router/gateway of both of the networks that you use? If your ISP DNS's are bad enough that you need to use something else, I have heard good things about OpenDNS. (OM recommended it, I believe)
Title: Re: multiple static IP configurations
Post by: ScarleTomato on July 23, 2009, 04:10:40 AM
the router acts as the DNS server for anyone within the network. Yeah i thought it was weird too, but that's how the ISP wants it set up. My guess is that its simply an iterative DNS and just redirects any computers with an unknown DNS request to go out to a real server.

QuoteAdd the other gateway, too?
both gateways are listed and they seem to do fine. (I think) I can ping them at least and every now and then I can reach the web.

QuoteIt is the job of your Router/Gateway to assign you an IP and to tell you which DNS servers to use.
While that should be correct, if i tell windows that i want to use my own IP addresses it forces me to enter my own DNS and gateway addresses as well.

QuoteOn my D-LINK router for example. If I wanted to set my computer to have a static internal IP (like say 192.168.0.133), then I would log into my router. Go to Setup -> Network Settings -> DHCP Reservations.
unfortunatley one of the main reasons for setting up static IP addresses is that the DHCP server goes out frequently. Aint a problem till I go off the network and then want back on, then it just hangs while trying to aquire an IP address.

i remember having an IBM a long time ago that could do this but I'm thinking it was part of IBMs software.

I've also noted that Vista seems to have wireless profiles (home, office, etc...), though i'm not sure what they actually manage. Just remembered them in passing really.

Basically all i want it to do is have specific settings for certain SSIDs.
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 23, 2009, 07:09:53 AM
Vista's profiles manage permissions, mostly -- as far as i'm aware. A home profile is more trusting than a work profile (or vice versa) and a public profile doesnt trust anything but what is needed to get online.

You try inputting your ISP's DNS servers into the DNS fields, and see if that works. You could also try using the OpenDNS server which has the IPs:

    * 208.67.222.222
    * 208.67.220.220

Your gateway SHOULD handle the accessing of the external DNS's since there is no domain names to resolve before it reaches the OpenDNS servers.
Title: Re: multiple static IP configurations
Post by: Nielk1 on July 23, 2009, 07:18:43 AM
I have my router ip, followed by my ISP ones that might change, followed by open DNS. If a page fails it tests them all till it hits open DNS (since I didn't set it to not show the failed page, been meaning to do that).
Title: Re: multiple static IP configurations
Post by: ScarleTomato on July 23, 2009, 03:42:54 PM
okay, i'll see if using the openDNS servers works when i get up to the office today. The bigger problem though is that it wont let me find any computers on the 192.168.5.* subnet if 192.168.2.10 is the first IP on my list. Any idea on how i can fix that?
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 23, 2009, 04:29:48 PM
You seem to know what you're talking about mostly so I don't know if I can help you. I'm just putting stuff out in the hopes that something will stick.  :-)

I don't know if this article would be helpful at all, but I just thought it would be interesting and relevant somehow.
http://www.simongibson.com/intranet/dns2003/

The only reason I could think of that anyone would use an internal DNS server is if they want to do it similar to the HOSTS file and redirect certain website data to another computer on the network, or if there are hidden intranet sites which the network admin wants to keep out of the public domain.  An internal DNS server seems like more trouble than its worth in most other cases, really.

QuoteThe bigger problem though is that it wont let me find any computers on the 192.168.5.* subnet if 192.168.2.10 is the first IP on my list. Any idea on how i can fix that?
That's odd.

I'm assuming that the static IP of the computer you are using is of the exact same subnet as the rest of the computers, the subnet mask is exactly the same (usually 255.255.255.0), and that your gateway is the same as your subnet, but instead points to your gateway (which is YOUR.LOCAL.SUBNET.1).
Title: Re: multiple static IP configurations
Post by: ScarleTomato on July 23, 2009, 07:54:56 PM
QuoteI'm assuming that the static IP of the computer you are using is of the exact same subnet as the rest of the computers, the subnet mask is exactly the same (usually 255.255.255.0), and that your gateway is the same as your subnet, but instead points to your gateway (which is YOUR.LOCAL.SUBNET.1).

Well thats the hitch, the laptop has two static IPs assigned to it. (192.168.2.10/24 and 192.168.5.10/24) The thing is, when im connected to the .5. subnet being in a different subnet (.2.) isn't a critical problem so it just uses the first IP in the list (192.168.2.10).
Windows wont let you easily connect to computers outside of your own subnet though, so when i'm dealing with 192.168.5.* computers, quirks start appearing.
I can't, for example, simply type \\computername in the address bar if they're on different subnets. I have to type \\ipaddress. And i can't for the life of me figure out how to get synergy to work over separate subnets since it seems to use this same network name service.

PS: tried the openDNS too, no dice. Although i'm gonna have to write those down somewhere where i'll remember them. Seems as though they might be helpful when i go to customer sites and cant find ISP information. I keep thinking there's another universal DNS server but i can't remember exactly. I think its 4.2.2.2? or maybe the other way around... i'll have to go play around with it and see...
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 23, 2009, 08:58:04 PM
A simple hack for that would be to write a simple batch script which connects to the computer using a command called "Net use"

EDIT: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_use.mspx?mfr=true

I've had to use it on a few occasions. Sometimes you can get around stubborn filesharing problems with it. Of course it has a higher chance of succeeding if you connect directly to the IP address of the remote computer instead of its hostname. Of course it could be possible for the DHCP server to give the remote computer a different IP address once in awhile, its a good workaround till a more permanent solution is discovered.
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 23, 2009, 09:19:38 PM
Theres also the ROUTE command, which might be of use. I've not experimented with it, but I did find it on a google search for "connecting different subnets"

If you type route in the command prompt it should show some detailed help with examples. The one you wanna use is probably the "route ADD" command similar to the example, for connecting the subnets a little better. The fields for metric and interface are probably optional -- as i'm quoting this post:
Quotechanging subnets is a bit drastic, instead use static routes.

ie. route add 192.168.1.0 mask 255.255.255.0 192.168.32.2

you will need to physically connect the two network hubs as you said you have done. You need to do the same route add on the other machine as well but swap trhe numbers round.

Again, it seems a bit hacky.
Title: Re: multiple static IP configurations
Post by: Axeminister on July 24, 2009, 12:25:15 AM
My brother told me something that might be useful. Most work networks assign dhcp information that sticks in your pc, and when you go home and hook up to a different network it has a hard time with that. Go to command prompt and type ipconfig /release and it should release that dhcp info. Then type ipconfig /renew and it should help find new network info. While this doesn't help you do everything from one location like work or home without a bit of work, it might make the connections you're looking for at least work.
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 24, 2009, 12:35:23 AM
AH! The old IPConfig release/renew! Thats one of the very first things anyone should try before trying to mess with their settings too much, in order to solve a networking problem. That trick has solved almost half of the network problems i've ever come across.
Title: Re: multiple static IP configurations
Post by: ScarleTomato on July 24, 2009, 01:13:50 AM
ipconfig release/renew just clears your ip information and requests new information from the DHCP.
With static IPs im trying to circumvent the DHCP server.

"ipconfig /release" won't work if you have a static IP set up. IIRC it says something like "the device is not set up to release this information"

I'll definitely have to look up those ROUTE commands. They seem promising. I've gathered that the naming service is actually part of the old decrepit NetBEUI protocol and sets up the last computer to connect to the local network as the name server (which is insane IMO), but since it works that way what it's doing is, instead of getting all the names from the other network and setting up the server, it thinks it's by itself and so just sets up itself as the first name server, ignoring all other devices. Ah, the joy of windows.
It seems like it will eventually turn out to be more hassle than its worth. For the time being I've got some batch scripts to change the ip, gateway and DNS. If i can just find a way for the script to know what SSID i'm connecting to i can make it automatic.

EDIT:found a script to get SSID, good enough for me :P
I definitely appreciate all your help guys, thanks.
Title: Re: multiple static IP configurations
Post by: Zero Angel on July 24, 2009, 01:27:55 AM
Awesome dude. I know I wasnt much help, so thank you because I actually learned some things from this thread. :)