Static IP address only at home

  Chris_J 09:38 21 Aug 10
Locked

Hi Guys,

This one has been bugging me for ages and I cannot figure out how to set it up.

Basically, my laptop is configured inside my home wireless network such that it has a static IP address. The reason being is I often remote into it from work and hence have configured port forwarding in the router to forward to this address.

The laptop spends most of its life at home, so most of the time, all is well. The problem comes when I take the laptop to a friends house and want to use his network. Each time, I have to go into the wireless adaptor settings and change the IPv4 configuration to use DHCP. Easy enough to do, but it's annoying having to reset it all back once I return home to use static again.

What I'd like it to set it up so that when the laptop detects that it is inside my home network, it will use the static ip address. Then if the home network cannot be found and I tell it to connect to another network, it will allow the DHCP server to assign its ip address.

Could you tell me whether this is possible and if so how I would go about doing it? My iPhone seems to have no trouble doing this, I just can't get my laptop to!

Thanks in advance.

P.S I'm using Windows 7 Ultimate.

  mgmcc 13:08 21 Aug 10

The adapter's TCP/IP Properties need to be configured either to get the addresses automatically by DHCP or with fixed addresses. You can't have a different arrangement depending on the network you're connecting to.

What you should be able to do though is to configure your home wireless router always to allocate a *specific* IP address by DHCP to a particular network adapter. That way, the Laptop would have the correct IP address for your port forwarding.

  Chris_J 15:25 21 Aug 10

I see. Okay, I'll have a look through my router's configuration and see what I can find. Don't remember being able to do anything like that, but worth a try.

Out of interest, when I set my adaptor settings automatically obtain address, an "alternate configuration" tab appears, which it says can be used if the computer is used on more than one network.

Could this be what I need, if properly configured?

  mgmcc 16:53 21 Aug 10

You could try it and see. I seem to recall trying to use the "Alternate Configuration" with settings to connect to a different router; it didn't work as I anticipated, but it's worth a try.

Don't remember being able to do anything like that, but worth a try.

  Chris_J 08:57 26 Aug 10

Had a look at the router's config, and there is nothing I can see to force it to allocate a MAC address with a particular IP address.

I read elsewhere that you can switch off the router's DHCP server and setup your laptop to have its IP address allocated by DHCP. Then, when it detects the DHCP server isn't there, it will fall back to the alternate config, where you fill in your desired IP address. Sounds great, as then when you move to a public network, it will work as normal via DHCP.

I tried this and found that there is an annoying side-effect. Upon booting the machine up, it will search for the DHCP server for about 2 full minutes, before it falls back to the alternate config.

That would start to annoy me, so I've just gone with static for now. It would be nice if Windows would allow you to use alternate config when you've set a static address for your primary configuration.

  mgmcc 13:41 26 Aug 10

What is the make and model of your Router? My D-Link and Netgear routers both support DHCP Address Reservation.

If the TCP/IP settings of the Laptop's network adapter are set to obtain the IP address automatically by DHCP, and you disable the Router's DHCP server, Windows will default to allocating a "169.254" APIPA address (Automatic Private IP Addressing). This won't let the Laptop access either the router or the internet, so that is not the way to go.

  Chris_J 13:49 26 Aug 10

Router is a Linksys WAG354G. I'm soon to upgrade to a Draytek Vigor 2820N to gain wireless N. The Draytek is quite advanced, so I suspect it will support address reservation.

The Linksys probably does, I just don't know what I'm looking for!

  mgmcc 18:35 26 Aug 10

You are probably correct in that your Linksys router doesn't support Address Reservation. I've just connected up a Linksys WRT54GS (which is a Cable/DSL Router) and I couldn't find the option.

  Chris_J 19:29 26 Aug 10

Ah well, I guess I'll wait 'til I get hold of the Draytek and try what you suggest.

Thanks for all your help.

This thread is now locked and can not be replied to.

What is Amazon Go and will it come to the UK? The store without checkouts or queues

1995-2015: How technology has changed the world in 20 years

Hands-on with the Star Wars fighting drones you can fly yourself

15 macOS Sierra tips | How to use macOS Sierra: Secret tricks and best new features in Apple's new…