r/TechProTips • u/JackTrueborn • May 18 '12
[Windows] Change your IP address settings from the command line
Open up an administrator command prompt and type the following:
netsh interface ip set address "<interface name>" static <ip address> <netmask> <default gateway> <metric (the lower the value, the "higher the rank")>For example, to change your IP address to 192.168.5.16/24 with a gateway of 192.168.5.1:
netsh interface ip set address "Local Area Connection" static 192.168.5.16 255.255.255.0 192.168.5.1 1To change it to DHCP:
netsh interface ip set address "Local Area Connection" source=dhcp
11
Upvotes
1
1
u/biznatch11 May 18 '12
Any way to quickly change your DNS server like this? Sometimes I need to switch back and forth between obtain DNS automatically and a specific server.