howto change an IP address, DNS server or WINS server from the command line in Windows

howto change an IP address, DNS server or WINS server from the command line in Windows

  • netsh interface ip show config
    is the same as ipconfig, shows your current configuration
  • netsh interface ip set address “Local Area Connection” dhcp
    this sets the adapter with name “Local Area Connection” to DHCP.
  • netsh interface ip set address “Local Area Connection” static 192.168.0.5 255.255.255.0 192.168.0.1 1
    this changes the ip address of the adapter “Local Area Connection” to 192.168.0.5, with as subnet mask 255.255.255.0 and gateway 192.168.0.1, metric 1.  Do not forget to set the metric!
  • add dns “Local Area Connection” 192.168.1.22
    adds a dns server
  • add dns “Local Area Connection”192.168.1.23 2
    adds a 2nd dns server, with 2nd priority
  • add wins “Local Area Connection”192.168.1.23
    adds a wins server
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s