Set DNS IP address through command line
To add dns server ip address from command prompt, do the following
1. Assume Dns IP address to be added is 192.168.1.101 and network connection name is "Local Area Connection 1".
2. Now run the following command to add DNS IP 192.168.1.101
netsh interface ip add dns "Local Area Connection 1" 192.168.1.101
One can verify dns ip added by using the command ipconfig /all.
Note: The above command doesn't overwrite the existing DNS IP instead it appends the IP to the list.
3. To add DNS IP addresses say 192.168.1.113 at some index in the dns ip list, run
netsh interface ip add dns "Local Area Connection 1" 192.168.1.113 1
1. Assume Dns IP address to be added is 192.168.1.101 and network connection name is "Local Area Connection 1".
2. Now run the following command to add DNS IP 192.168.1.101
netsh interface ip add dns "Local Area Connection 1" 192.168.1.101
One can verify dns ip added by using the command ipconfig /all.
Note: The above command doesn't overwrite the existing DNS IP instead it appends the IP to the list.
3. To add DNS IP addresses say 192.168.1.113 at some index in the dns ip list, run
netsh interface ip add dns "Local Area Connection 1" 192.168.1.113 1
0 comments:
Post a Comment