Dual network setup problem

  • Thread starter Thread starter Thomas Refsdal
  • Start date Start date
T

Thomas Refsdal

Hei,

I use my Laptop both at home and at work. At home I use DHCP with no
problem, at work I need to force a manual IP due to spesific firewall/VPN
settings.

The snag is that there is a DHCP-server at work but that I don't want to use
it's services. Thus, XP's "alternate configuration" is not possible to use.

There's no domain present and I do not need to restart the computer to get
the new settings applied. Is it possible to write a batch or registry
script to change from DHCP tp fixed IP, GW and DNS (and vise versa)?



Rgds

Thomas, Norway
 
quoted from http://www.chcagotech.net

How to use netsh command change from DHCP to a static address

netsh interface ip set address "Local Area Connection" static ipaddr
subnetmask gateway metric


--
For more and other information, go to http://www.ChicagoTech.net

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.

Robert Lin, MS-MVP, MCSE & CNE
Networking, Internet, Routing, VPN, Anti-Virus, Tips & Troubleshooting on
http://www.ChicagoTech.net
This posting is provided "AS IS" with no warranties.
 
Robert L said:
quoted from http://www.chcagotech.net

How to use netsh command change from DHCP to a static address

netsh interface ip set address "Local Area Connection" static ipaddr
subnetmask gateway metric

Thanks. Netsh does the job, here a quote from another usenet post:

"
I asked that question myself about a month ago, and the solution is to

use netsh.

Manually set up TCP/IP then capture the settings to a configuration

file using:

netsh -c interface dump > IPconfig.txt, where IPconfig.txt can be any

name you choose for each configuration: eg., homeIP.cfg, officeIP.cfg.

Then you can apply each setting by using a batch file associated with

each config file, or a sigle batch file with a menu option.

Eg:

batch file 1:

netsh -f c:\homeIP.cfg

batch file 2:

netsh -f c:\officeIP.cfg

etc...

"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top