Go Back   TechArena Community > Technology > Technology & Internet
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Command prompt to change dns

Technology & Internet


Reply
 
Thread Tools Search this Thread
  #1  
Old 11-08-2009
Member
 
Join Date: May 2008
Posts: 95
Command prompt to change dns
  

Hello friends,

I would like to alter my DNS address using the command prompt line.I like to change my ip simply by clicking a .bat file. I know the commands to change my ip but the command to change my dns address is some way absent. I know there are some other ways to do it,but I am stubborn with this way.Can any one guide me in this concern..

Any ideas should be brilliant and highly appreciable.!!
Cheers..!!

Reply With Quote
  #2  
Old 11-08-2009
Member
 
Join Date: May 2008
Posts: 2,134
Re: Command prompt to change dns

Netsh is a utility to alter system networking settings, locally or remotely.When the command prompt comes up type Netsh, To change the Local Area Connection TCP/IP settings type the following command:

interface ip set address name=”Local Area Connection” static 192.168.10.42 255.255.255.0 192.168.1.1

Netsh IP address change
Altering the DNS IP address is almost identical as the procedure above, type the following command on the Netsh prompt.interface ip set dns “Local Area Connection” static 192.168.1.1To Setup WINS, type the following command:

interface ip set wins “Local Area Connection” static 192.168.1.1

To configure the network properties to obtain the IP address from a DHCP server, type the following command:

interface ip set address “Local Area Connection” dhcp

To set DNS to obtain IP address automatically type the following:

netsh interface ip set dns “Local Area Connection” dhcp
Reply With Quote
  #3  
Old 11-08-2009
Member
 
Join Date: Oct 2005
Posts: 2,356
Re: Command prompt to change dns

Dude, If you're Aiming at the locations of the DNS servers your computer is using they are given by your ISP when you get an IP address. If you know the address of alternate DNS servers you can "hardcode" them into your settings.If you wan to the reverse DNS name you show up as when on the internet, that again is assigned by your ISP.
Reply With Quote
  #4  
Old 11-08-2009
Member
 
Join Date: Apr 2008
Posts: 2,566
Re: Command prompt to change dns

Command to alter IP

netsh int ip set address “local area connection” static 192.168.0.101 255.255.255.0 192.168.0.254 1.

Command to alter DNS

netsh int ip set dns “local area connection” static 192.168.0.254 primary

You have to alter these values according to your own network.Both commands are designed by assuming that you want to change your IP to 192.168.0.101, your default gateway is 192.168.1.254, your DNS is 192.168.0.254 and the name of the network adapter is local area connection.
Reply With Quote
  #5  
Old 11-08-2009
certifications4you
 
Posts: n/a
Re: Command prompt to change dns

nice topic........................

Quote:
Originally Posted by johnson22 View Post
Netsh is a utility to alter system networking settings, locally or remotely.When the command prompt comes up type Netsh, To change the Local Area Connection TCP/IP settings type the following command:

interface ip set address name=”Local Area Connection” static 192.168.10.42 255.255.255.0 192.168.1.1

Netsh IP address change
Altering the DNS IP address is almost identical as the procedure above, type the following command on the Netsh prompt.interface ip set dns “Local Area Connection” static 192.168.1.1To Setup WINS, type the following command:

interface ip set wins “Local Area Connection” static 192.168.1.1

To configure the network properties to obtain the IP address from a DHCP server, type the following command:

interface ip set address “Local Area Connection” dhcp

To set DNS to obtain IP address automatically type the following:

netsh interface ip set dns “Local Area Connection” dhcp
Reply With Quote
Reply

  TechArena Community > Technology > Technology & Internet
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Command prompt to change dns"
Thread Thread Starter Forum Replies Last Post
Change the colors in the command prompt Venator Customize Desktop 1 08-06-2011 06:33 AM
How to change Command Prompt settings rIh@n Operating Systems 3 17-08-2009 03:04 PM
Can’t change drive in command prompt Zayd Operating Systems 3 14-08-2009 03:26 PM
about the command prompt Gorganzola Windows Software 2 17-10-2008 06:24 PM
Command prompt "COPY" command not working in brand new Windows Vis CMD COPY command not working in Vista Vista Help 7 06-02-2008 01:50 AM


All times are GMT +5.5. The time now is 05:30 AM.