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..!!
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
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.
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.
Re: Command prompt to change dns
nice topic........................
Quote:
Originally Posted by
johnson22
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