How to set your network, gateway, and DNS IP address from the MSDOS command line?
In order to automate setting the IP address, e.g. by using this
commands in a batch file, or by having to switch quickly between
different IP settings (e.g. for your laptop when having to connect to
the network on different locations, and so needing different IP
settings) you can use the the netshell command:
netsh
-to set the IP address, type the following:
netsh interface ip set address name= source= addr= mask=
for example :
netsh interface ip set address name="Local Area Connection" source=static addr=10.0.0.254 mask=255.255.255.0