I have create a batch file to change IP address in ms dos, you can paid me copyright fees, I don’t mind to accept 😛 With using the IP shifter on my previous post, the software require to paid. After I doing some research and testing, now I can create my own IP shifter software for free.
Actually is not a software, is just a list of command which able to change your local ip address in ms dos. Still remember the ms-dos command I post up quite some time ago? I am using the “netsh” command to change the local ip address via ms-command prompt.
Change Local Static IP Address in Ms-DOS
Ok, to change a local Static IP Address, open your command prompt and type:
c:\>netsh interface ip set address local static xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy zzz.zzz.zzz.zzz 1
Which X represent IP address, Y represent subnet mask and Z represent gateway, and at the end you require to put “1” You my check your setting manually after apply the above command for change IP address in ms dos
Change Local DHCP IP Address in Ms-Dos
To set the IP address to become DHCP IP Address, here the command to change IP address in ms dos:
c:\>netsh interface ip set address local dhcp
Before you do any changes, you can actually save your current IP address setting into a text file, and restore the IP address later on.
Save Local IP Address in Ms-Dos
To save the current local IP address setting, you can use this command:
c:\>netsh -c interface dump > network1.txt
After you save this setting, you can apply the command above Static IP Address or DHCP IP Address
Restore Local IP Address in Ms-Dos
To restore back the setting you have save, you just require to use this restore IP Address setting command:
c:\>netsh -f network1.txt
You can play around this few ms-dos command, to change, save and restore your IP address setting.
Here come iCalvyn’s Freeware
With the above coding, you may design your self different batch file, I have create the most simple way to change ip address in ms dos. Assume you require 2 network setting, Office and Home
.
Open a notepad, type in below command and save it as name.bat, which you can name the batch file with your network name, eg. Office.bat, Home.bat, School.bat
cd\ netsh interface ip set address local static xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy zzz.zzz.zzz.zzz 1
Create 1 for your office network and name it as office.bat, another for home network, which name it as home.bat. If your home network using DHCP, type the below code in your notepad and save it as home.bat
:
cd\ netsh interface ip set address local dhcp
Now, you have this 2 batch file on your desktop, just plug in your network cable while you at that particular location, double click on the file, your local IP address will be change accordingly. You may create more different batch file if your laptop require to plug into different network. If you require any assit regarding this change ip address with ms dos, you are welcome to contact me 🙂
So I can change my ip address easily lar?
Il netsh è favoloso vero?
L’ho scoperto anche io invece di programmi stupidi per salvare profili di rete, ho usato e uso ancora netsh e funziona alla grande!
Bel Blog complimenti!
Zama >
I no idea on your language, can you post in english?
thanks a lot it really help. especially for batch files purposes
What about external IP address?? I have just one PC in my home.
Thanks for the useful hint
But,,
Just for the record
when using windows vista and you have two types of internet protocols , especially to mention ipv4,ipv6
and for those who have many network interfaces like wired and wireless network adapters ,
the command line must contain the following additions:
for the dhcp config:
cd\
netsh interface ip set address “local area connection” dhcp
and for the specific ip config:
cd\
netsh interface ip set address “local area connection” static xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy
and note that the “local area connection” must be changed to suit the name of your currently meant network adapter , so , for ex, when you have it named home , you put home inbetween ” ”
Another note is that you require to run the batch file as an admin to avoid having “this process requires elevation” error message
Good luck all,
Mohammed L.J/Iraq..
This site is very good for knowledge.