Configure Static IP with the Netsh Command-Line Utility

by Eric Geier [Published on 2 Feb. 2011 / Last Updated on 4 Dec. 2009]

Advertisement GFI LanGuard your virtual security consultant. Scan your LAN for any vulnerability and automate patch management for Windows, Mac OS & Linux. Get your FREE trial now!

GFI LanGuard is the essential tool for sysadmins:

  • Automate multiple OS patching
  • Scan for vulnerabilities
  • Audit hardware and software
  • Run compliance reports

Your FREE trial awaits:

Download a 30 day, fully functional, free trial which also includes GFI technical support.

No credit card required

Manually set the IP address of network connections via the Command Prompt.

You can perform a variety of tasks using the Netsh command-line utility, including configuring the IP addresses of network adapters in Windows.

Here’s how to configure a static IP address:

netsh interface ip set address "connection name" static 192.168.0.101 255.255.255.0 192.168.0.1

NOTE: The default connection names are Local Area Connection for wired adapters and Wireless Network Connection for Wi-Fi adapters. The IP address order: client IP, subnet mask, and gateway IP.

Here’s how to configure the DNS addresses:

netsh interface ip add dns "connection name" 208.67.222.222

netsh interface ip add dns "connection name" 208.67.220.220 index=2

NOTE: Remember to replace the connection names and IP addresses.

The Author — Eric Geier

Eric Geier (Dayton, Ohio) is a Freelance  Tech Writer and Author specializing in computer networking. He's also the Founder and Owner of NoWiresSecurity, which provides a hosted cloud-based RADIUS service to help businesses easily secure their Wi-Fi networks with the Enterprise (802.1X) mode of WPA/WPA2 security. He’s also the Founder and Owner of On Spot Techs, which provides on-site computer and technology services.

Latest Contributions

Featured Links