PDA

View Full Version : Mulitple IP configs - one for the Windows network gurus?


Juz
November 4th 04, 06:39 AM
I have a laptop that I regularly take between two offices. At my main
office, I use a fixed IP address that allows me access to hosts within the
DMZ.

At the secondary office however, I cannot use that IP address, I instead
have to switch to standard DHCP to obtain an address.

What I want to know is, can i configure Windows with two different TCP/IP
configurations, that can be selected at startup?

I've seen the technote that tells me I can have an "alternate" IP config,
but that only kicks in when DHCP is unavailable. DHCP is available in my
primary office, I just don't want to use it.

I can't think of any way to have two different fixed IP addresses, can
anyone else?

Juz.
--
I have a dream...a dream where end users don't have to setup anything
themselves...it all just works, first time, every time. Then my Mum would
stop calling me with PC problems!

Steve Winograd [MVP]
November 4th 04, 07:48 AM
In article >, Juz
> wrote:
>I have a laptop that I regularly take between two offices. At my main
>office, I use a fixed IP address that allows me access to hosts within the
>DMZ.
>
>At the secondary office however, I cannot use that IP address, I instead
>have to switch to standard DHCP to obtain an address.
>
>What I want to know is, can i configure Windows with two different TCP/IP
>configurations, that can be selected at startup?
>
>I've seen the technote that tells me I can have an "alternate" IP config,
>but that only kicks in when DHCP is unavailable. DHCP is available in my
>primary office, I just don't want to use it.
>
>I can't think of any way to have two different fixed IP addresses, can
>anyone else?
>
>Juz.

Use the "netsh" command to set the configuration. Put the appropriate
commands in .bat files and run them as needed:

To specify a fixed IP address:

netsh interface ip set address <connection> static <ip> <mask>
<gateway> <gateway metric>

For example:

netsh interface ip set address "Local Area Connection" static
192.168.0.100 255.255.255.0 192.168.0.254 10

netsh interface ip set address "Wireless Network Connection" static
10.20.30.100 255.0.0.0 10.0.0.1 20

To specify a DHCP IP address:

netsh interface ip set address <connection> dhcp

For example:

netsh interface ip set address "Local Area Connection" dhcp
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com

Google