Warning: Undefined array key "rcommentid" in /customers/1/6/9/steffenjahn.de/httpd.www/wp/wp-content/plugins/wp-recaptcha/recaptcha.php on line 348 Warning: Undefined array key "rchash" in /customers/1/6/9/steffenjahn.de/httpd.www/wp/wp-content/plugins/wp-recaptcha/recaptcha.php on line 349
Sway's Blog

Set A Static IP Address On Windows 7 From The Command Line

by on Sep.03, 2012, under Allgemein

Windows has traditionally been all about the GUI. However, in Windows 7 it’s possible to set a static IP address from the command line. Here’s how to do it.

Let’s say you want to give your Windows 7 system an IP address of 192.168.1.2, a subnet mask of 255.255.255.0, a default gateway of 192.168.1.254, and a DNS server address of 192.168.1.200. Go to an elevated command prompt (right-click on the command prompt icon and select Run As Administrator) and type these two commands:

netsh interface ipv4 set address “local area connection” static 192.168.1.2 255.255.255.0 192.168.1.254

netsh interface ipv set dnsservers “local area connection” static 192.168.1.200

These commands will configure the Local Area Connection with a static IP, netmask, gateway, and DNS server.

If you want to switch back to receiving your networking settings from a DHCP server, use these commands:

netsh interface ipv4 set address name=”local area connection” source=dhcp

netsh interface ipv4 set dnsservers name=”local area connection” source=dhcp

This will set the Local Area Connection back to using DHCP.


Leave a Reply

Warning: Undefined variable $user_ID in /customers/1/6/9/steffenjahn.de/httpd.www/wp/wp-content/themes/pixel/comments.php on line 140

Warning: Undefined array key "rerror" in /customers/1/6/9/steffenjahn.de/httpd.www/wp/wp-content/plugins/wp-recaptcha/recaptcha.php on line 291
 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!