Dreevoo.com | Online Learning and Knowledge Sharing
 
Home | Programs | Microsoft Windows | Windows 7 | How to change DNS settings in command prompt
Guest
Click to view your profile
Topics
Programs
Languages
Recipes
Home
Shortcuts
 
 

How to change DNS settings in command prompt

For the advance Windows XP or Windows 7 users, this is how you change the DNS settings using command prompt.

 
  Author: mat | Version: 7 | 21st November 2012 |  
 
 
1.
 

Click Windows Start button and enter cmd.exe into Search programs and files field.

 
 
2.
 

Right click the cmd.exe in the Programs search results and choose Run as administrator.

 
 
3.
 

In the Command Prompt (cmd) window enter the following command:

netsh interface ip show config

Press Enter.


 
 
4.
 

With the command you just entered you got the network settings of all the installed network interfaces on your computer.

If you want to change the DNS settings of your LAN network card, then mark and copy the "Local Area Connection" text.

In case you want to change the DNS settings of your WLAN network inerface, then copy "Wireless Network Connection" text.

Basically you need to copy the name of the network interface you want to change the DNS settings for as you will need that name in the next command that will actually change the DNS settings.

 
 
5.
 

Let's say I want to change the DNS settings on my LAN interface to IP 192.168.1.10 this is the line that I need to enter in command prompt window (it's one line not two):

netsh interface ip set dns "Local Area Connection" static 192.168.1.10

... and press Enter and you are done.

To change the static DNS IP into dynamic DNS IP, meaning you will get it automatically from a router or your Internet provider, then you need to enter the following command:

netsh interface ip set dns "Local Area Connection" dhcp

 
 
 
   
  Please login to post a comment
  Click to open user profile  
podtalje, 25th Nov 2012, 2:37 PM
Changing DNS is sometimes useful, but most of the time you also need to change the IP address.

Fortunately this can be done in a similar way:
netsh interface ip set address "Local Area Connection" static ipaddr subnetmask gateway metric

Below is an example for changing IP to 192.168.0.10:
netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1

 
   
 
 
online learning made for people
Dreevoo.com | CONTRIBUTE | FORUM | INFO