Networking Forums

Networking Forums > Computer Networking > Windows Networking > Batch file to assign an IP configuration?

Reply
Thread Tools Display Modes

Batch file to assign an IP configuration?

 
 
boe
Guest
Posts: n/a

 
      02-08-2005, 09:29 PM
I have a client who works at several locations but she needs a static IP
assigned at one location. Is there a way to make a batch file to chance the
network card from DHCP to static with ip address, mask, gateway and DNS all
filled in and then a batch file to reverse the configuration?

Thanks


 
Reply With Quote
 
 
 
 
Mark Gamache
Guest
Posts: n/a

 
      02-08-2005, 10:01 PM
I do this all the time using the netsh interface ip set command

It will allow you to change the IP address, DNS and WINS settings from a
script.

--
Mark Gamache
Certified Security Solutions
http://www.css-security.com



"boe" <(E-Mail Removed)> wrote in message
news:ellN%(E-Mail Removed)...
>I have a client who works at several locations but she needs a static IP
>assigned at one location. Is there a way to make a batch file to chance
>the network card from DHCP to static with ip address, mask, gateway and DNS
>all filled in and then a batch file to reverse the configuration?
>
> Thanks
>



 
Reply With Quote
 
boe
Guest
Posts: n/a

 
      02-09-2005, 12:08 AM
Thanks - do you have any links to this method?

"Mark Gamache" <(E-Mail Removed)> wrote in message
news:eOT$(E-Mail Removed)...
>I do this all the time using the netsh interface ip set command
>
> It will allow you to change the IP address, DNS and WINS settings from a
> script.
>
> --
> Mark Gamache
> Certified Security Solutions
> http://www.css-security.com
>
>
>
> "boe" <(E-Mail Removed)> wrote in message
> news:ellN%(E-Mail Removed)...
>>I have a client who works at several locations but she needs a static IP
>>assigned at one location. Is there a way to make a batch file to chance
>>the network card from DHCP to static with ip address, mask, gateway and
>>DNS all filled in and then a batch file to reverse the configuration?
>>
>> Thanks
>>

>
>



 
Reply With Quote
 
Robert L [MS-MVP]
Guest
Posts: n/a

 
      02-09-2005, 05:05 AM
This how to may help, http://www.howtonetworking.com/netsh.htm

Don't send e-mail or reply to me except you need consulting services. Posting on MS newsgroup will benefit all readers and you may get more help.

Bob Lin, MS-MVP, MCSE & CNE
How to Setup Windows, Network, Remote Access on http://www.HowToNetworking.com
Networking, Internet, Routing, VPN Troubleshooting on http://www.ChicagoTech.net
This posting is provided "AS IS" with no warranties.
I recommend Brinkster for web hosting!

"boe" <(E-Mail Removed)> wrote in message news:ellN%(E-Mail Removed)...
I have a client who works at several locations but she needs a static IP
assigned at one location. Is there a way to make a batch file to chance the
network card from DHCP to static with ip address, mask, gateway and DNS all
filled in and then a batch file to reverse the configuration?

Thanks


 
Reply With Quote
 
Iván Torres
Guest
Posts: n/a

 
      02-09-2005, 09:11 AM
Hello,

If you have time to look into the scripting and do it elegantly, go ahead.
In the mean time, a quick and dirty solution could be to go into TCP/IP
properties, Alternate Configuration and enter the static settings you want
on the special location. Windows will use that Alternate Configuration when
it doesn't find a DHCP server on the network.

So, you can tell her to boot the machine without connecting to the network,
no DHCP will be found, Alternate Configuration would be used. Then she can
plug in.
I assume the fixed IP is reserved on that network's DHCP or else you risk
some other PC having the same IP as the static one.

What do you think? :-)

Ivan Torres

"boe" <(E-Mail Removed)> wrote in message
news:ellN%(E-Mail Removed)...
> I have a client who works at several locations but she needs a static IP
> assigned at one location. Is there a way to make a batch file to chance

the
> network card from DHCP to static with ip address, mask, gateway and DNS

all
> filled in and then a batch file to reverse the configuration?
>
> Thanks
>
>



 
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
Run a batch file remotely Dane Windows Networking 3 08-03-2009 10:25 PM
Single Batch File Vis-MCSA Windows Networking 11 12-03-2007 05:45 AM
Rinominare File con data attraverso un file Batch Daytan Windows Networking 1 09-18-2007 05:40 PM
Batch File Problems Nikon Windows Networking 2 04-26-2006 07:50 PM
NT Batch file doesn't run Carl Gross Windows Networking 5 10-08-2003 12:51 AM



1 2 3 4 5 6 7 8 9 10 11