Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I can change my DNS settings for the connection that I am using via these windows, enter image description here but when I enter an alternate DNS, it gets clear every time I select the obtain DNS server address automatically.

Is there a way to save this information, or must I remember/copy down all the the DNS servers I use at one point or another?

Ideally I would like a drop down selection that would contain all of the addresses that I have used in the past, but probably the best I can hope for is just keeping the previous value.

share|improve this question
    
Related: superuser.com/questions/356495/… –  iglvzx Jan 9 '12 at 1:47
    
Just install and run your own resolving proxy DNS server on every individual machine, or on one machine servicing your whole LAN. You'll never have to worry about this tedious nonsense of switching among other people's DNS servers again. You have a machine that is more than capable of running daemons that provide UDP/IP and TCP/IP services. It's very likely already running several. –  JdeBP Jan 9 '12 at 11:15
add comment

3 Answers 3

up vote 1 down vote accepted

You can build your own scripts.

netsh should be pre-installed.

netsh interface ip set dnsserver "Wireless Network Connection" source=static addr=8.8.4.4
netsh interface ip set dnsserver "Wireless Network Connection" source=dhcp

If PowerShell is available,

Get-WmiObject Win32_NetworkAdapterConfiguration |
    Where { $_.Name -eq "Wireless Network Connection" } |
    Foreach-Object {
        $_.SetDNSServerSearchOrder(("8.8.4.4", "8.8.8.8"))
    }
Get-WmiObject Win32_NetworkAdapterConfiguration |
    Where { $_.Name -eq "Wireless Network Connection" } |
    Foreach-Object {
        $_.SetDNSServerSearchOrder()
    }

(I don't have Windows installed so I'm not 100% sure that's correct, but it should be close.)

share|improve this answer
add comment

Sadly there is nothing like that built in, you have to rely on external software to add functionality to let you have "Network Profiles" so you can switch around. Its a very common scenario for laptop users, for example, to move around a lot and it would be really nice to have it built in. But, for now, applications it is.

Some recommendations:
NetSetMan at http://www.netsetman.com/
Net Profile Switch at http://www.jitbit.com/net-profile-switch/

Good luck!

share|improve this answer
add comment

Yes, unfortunately all the custom information is wiped when you click the automatic option (though it is not saved until you click OK, so you should be able to click Cancel).

What I usually do is to just back up the registry entry(ies) for my NIC(s) at HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces (each NIC gets its own GUID under this key, but it is pretty easy to identify them based on the IPAddress and NameServer values).

This way, I have a record of all of the network settings for my NIC in a nice, plain-text (ie, human-readable) format, and I can even restore it simply by merging the .REG file—and rebooting—(of course the GUID may change depending on the circumstances, but that is easy enough to fix).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.