HomeWindowsWindows networkingXP and 2000 Users that Employ Static IPs in One Location and...

XP and 2000 Users that Employ Static IPs in One Location and DHCP in Another

Laptop users, particularly in the workplace, often find they need to use their devices with a static IP in one location and DHCP in another. This tutorial contains bat files that allow one to switch from a static IP to DHCP or vice versa with as little inconvenience as possible. The user simply double clicks the appropriate .bat file for his or her location.


The DHCP bat is as follows:
netsh interface ip set address “Local Area Connection” dhcp

The static bat is as follows:
netsh interface ip set address “Local Area Connection” static 127.0.0.1 255.xxx.xxx.xxx 127.xxx.xxx.xxx 1

The first series of numbers is the IP. The second series is the Subnet Mask. The third series is the Gateway, and the last number is the multiplier.

Create these in Notepad, and save them as dhcp.bat and static.bat. They can also be named by location: Topeka.bat and Lawrence.bat.

Use the following .bat to check the configuration after running one of the batch files:

Netsh interface ip show config
pause

RELATED ARTICLES

12 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments

Cleveland Furia on How to Clear Google Activity
Sid Wohlfarth on How to Clear Google Activity
Riley Magsayo on How to Clear Google Activity
สมัครรับเครดิตฟรี ทันที on How to improve Remote Desktop Protocol Performance
Neal Wangstad on How to Clear Google Activity
Slavcho Andov on How to install Ubuntu
Slavcho Andov on How to fix bad sectors
Sheraz Ali on How to Backup Android