Networking Forums

Networking Forums > Computer Networking > Windows Networking > Quick way to flip flop between DHCP and static IP?

Reply
Thread Tools Display Modes

Quick way to flip flop between DHCP and static IP?

 
 
boe
Guest
Posts: n/a

 
      08-03-2006, 04:34 AM
Hello,

I have a Windows box that I'd like to make a shortcut of some kind that
would allow me to quickly switch all the IP settings - e.g. address, subnet,
gateway, DHCP, WINS from a static address to DHCP and vice versa. Is this
possible?



 
Reply With Quote
 
 
 
 
Miha Pihler [MVP]
Guest
Posts: n/a

 
      08-03-2006, 08:38 AM
Hi,

Sure, you can use netsh command line utility... Here are some examples...

Create a batch file from these entries. Name the batch file e.g. dhcp.bat
and whenever you want to switch to dhcp configuration run the batch file...

*********************************
netsh interface ip set address name="Local Area Connection" source=dhcp
netsh interface ip set dns name="Local Area Connection" source=dhcp
netsh interface ip set wins name="Local Area Connection" source=dhcp
*********************************

Create another batch file from these entries. Name the batch file e.g.
static.bat and run it whenever you want to switch to static settings...

***********************************
netsh interface ip set address "Local Area Connection" static 10.0.0.9
255.0.0.0 10.0.0.1 1
netsh interface ip set dns "Local Area Connection" static 10.0.0.1 primary
netsh interface ip set wins "Local Area Connection" static 10.0.0.1
***********************************

Replace above IP addresses with the ones that will work on your network.

I hope this helps you out,

--
Mike
Microsoft MVP - Windows Security

"boe" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello,
>
> I have a Windows box that I'd like to make a shortcut of some kind that
> would allow me to quickly switch all the IP settings - e.g. address,
> subnet, gateway, DHCP, WINS from a static address to DHCP and vice versa.
> Is this possible?
>
>
>



 
Reply With Quote
 
boe
Guest
Posts: n/a

 
      08-03-2006, 12:56 PM
Thank you

"Miha Pihler [MVP]" <mihap-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> Sure, you can use netsh command line utility... Here are some examples...
>
> Create a batch file from these entries. Name the batch file e.g. dhcp.bat
> and whenever you want to switch to dhcp configuration run the batch
> file...
>
> *********************************
> netsh interface ip set address name="Local Area Connection" source=dhcp
> netsh interface ip set dns name="Local Area Connection" source=dhcp
> netsh interface ip set wins name="Local Area Connection" source=dhcp
> *********************************
>
> Create another batch file from these entries. Name the batch file e.g.
> static.bat and run it whenever you want to switch to static settings...
>
> ***********************************
> netsh interface ip set address "Local Area Connection" static 10.0.0.9
> 255.0.0.0 10.0.0.1 1
> netsh interface ip set dns "Local Area Connection" static 10.0.0.1 primary
> netsh interface ip set wins "Local Area Connection" static 10.0.0.1
> ***********************************
>
> Replace above IP addresses with the ones that will work on your network.
>
> I hope this helps you out,
>
> --
> Mike
> Microsoft MVP - Windows Security
>
> "boe" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Hello,
>>
>> I have a Windows box that I'd like to make a shortcut of some kind that
>> would allow me to quickly switch all the IP settings - e.g. address,
>> subnet, gateway, DHCP, WINS from a static address to DHCP and vice versa.
>> Is this possible?
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Video Review BlackBerry Pearl 8220 flip mobile phone alex Broadband 0 12-01-2008 06:09 AM
Just a quick DHCP question TJ Windows Networking 3 06-17-2008 08:04 PM
DHCP Error 64 - No static IP bound to this DHCP Server DHCP Firewall Windows Networking 0 02-02-2006 04:04 PM
Flip I'm fed up no ADSL and Slooooow 56K Stevie Boy Broadband 7 10-11-2003 07:47 PM
DHCP to static IP - is this OK? Bob O'Connor Linux Networking 3 07-05-2003 08:17 PM



1 2 3 4 5 6 7 8 9 10 11