Quickest way to change an IP in windows
Quite often at work we need to manually change the IP of our laptops for testing various things. Since our laptops are not the quickest around town I quickly got bored of clicking on 5 different windows just to change IP. The I found the quite useful
netsh interface ip set address name="Local Area Connection" static IP MASK GATEWAY 1
The above command would change the IP on the interface "Local area connection" to whatever values of IP/MASK?GATEWAY you define. Typing all that in rather than clicking (and waiting) for a few windows is maybe not as good so I've made a very simple bat script.
- Will ask for IP, mask and gateway then configure "Local Area Connection" and display its config to confirm
- Will configure "Local Area Connection" for DHCP then display the address it uses
- Manually configure the DNS servers used
- Show the current interface config
- Will relese and renew the DHCP address on "Local Area Connection"
- Asks for an address and pings it continually
- Asks for an address and pathpings to it (similar to traceroute)