PDA

View Full Version : set dns using cms



zodehala
10-10-2009, 09:22 AM
i am using following command to set dns but i cant secondary dns why ?


netsh interface ip set dns name="lan" static 208.67.221.221
netsh interface ip add dns name="lan" 208.67.220.220 index=2

wratterus
10-10-2009, 10:15 AM
Which OS are you running?

Erayd
10-10-2009, 10:59 AM
Which OS are you running?
He's running Windows - netsh is a Windows utility.

zodehala
10-10-2009, 09:52 PM
Which OS are you running?

windows XP_SP3_EN

zodehala
11-10-2009, 09:27 AM
anybody knows ?

Blam
11-10-2009, 01:46 PM
Why do you need to to set DNS via command line?

Have you tried Googling?

Blam
11-10-2009, 01:49 PM
Why do you need to to set DNS via command line?

Have you tried Googling?

nedkelly
11-10-2009, 02:06 PM
think you need to name what connection you want to have the secondary dns settings for not just say netsh interface ip

wratterus
12-10-2009, 03:13 PM
I had one a while back for XPSP3 that looked like this, it seemed to work...


netsh interface ip set address name="Local Area Connection" source=static addr=192.168.1.229 mask=255.255.255.0
netsh interface ip set address name="Local Area Connection" gateway=192.168.1.1 gwmetric=0
netsh interface ip set dns name="Local Area Connection" source=static addr=60.234.1.1
netsh interface ip add dns name = "Local Area Connection" addr =60.234.2.2

Maybe try copying and pasting that, just replace the 'Local Area Connection' with the exact name of your network connection, again copying and pasting is your best bet. And change the DNS settings too obviously...

http://www.astahost.com/info.php/switch-network-settings-batch-files_t9048.html

That gives a good guide.