Manually setting DNS IPs when using DHCP

jcdill

Registered
Is there any way to manually set the DNS IPs for all networks, rather than accept the DNS IPs provided via DHCP? Perhaps thru editing a config file or with a terminal command?

I just changed the DNS IPs in our home router to use Google's DNS IPs after ComCraptastic decided to do a SiteFinder redirect on 404s. However, I regularly use other wifi networks - at coffee shops, businesses, clients, friend's homes, etc. I don't have access to those wifi routers to change the DNS IPs they give out. :) I can't find a way to set or override the DNS IPs those routers deliver to my laptop during DHCP setup.
 
Preferences -> Network -> Advanced -> DNS (in 10.4 it was under TCP/IP)

I have noticed an oddity though, I use Google on the Router and I also had it set in Network prefs. Safari sometimes would spend a long time on lookups, Firefox did not.

When I removed the duplication, e.g. no assignments in Network prefs, just relying on the router, the problem went away.
 
When I go to Network -> Airport, click Advanced button and select the DNS tab, the settings I want to over-ride (settings provided by the routher via DHCP) are grayed out. I can't delete them, or move them down below the Google DNS settings.
 
When you hit the plus button and add a server then it will automatically delete the one that was added by default.
 
I added 2 new servers (the Google DNS servers) and it does NOT delete the automatic entries. The default entries (from the DHCP server) are grayed out and I can't select them, delete them, put them in a different order.
 
I added 2 new servers (the Google DNS servers) and it does NOT delete the automatic entries. The default entries (from the DHCP server) are grayed out and I can't select them, delete them, put them in a different order.

That is very odd, I have tried this just today and it worked perfectly for me.
What system are you running?
Could you post a screen shot of what is going on? (Press Shift+Command+3) The screen shot will show up on the desktop.
 
I added 2 new servers (the Google DNS servers) and it does NOT delete the automatic entries. The default entries (from the DHCP server) are grayed out and I can't select them, delete them, put them in a different order.

Mine is the same. I had assumed that it was telling me that it found a DNS server address upstream from me.

Edit: That's what it is. When I turn Airport off the grayed out entries vanish.
Turn it back on while still viewing the prefs DNS panel they reappear.

This is why I decided to not add Google on the machine, having the duplication seemed to make the DNS resolving sluggish.
 
Last edited:
Well thats the thing.... It's supposed to overrider the automatic entries without having to select them or anything else. They are supposed to just dissapear, but apparently it's not?
 
Mine is the same. I had assumed that it was telling me that it found a DNS server address upstream from me.

Edit: That's what it is. When I turn Airport off the grayed out entries vanish.
Turn it back on while still viewing the prefs DNS panel they reappear.

Are there manual DNS addresses set up in your router configuration? Even if there are not this is the best place to make your changes.
 
Are there manual DNS addresses set up in your router configuration? Even if there are not this is the best place to make your changes.

Sure, the router has the DNS server set to google and I have it that way because others access the web via that wifi router. I'm trying to give everyone the best experience.

I'm mainly trying to help answer the question posed in the original post...

Is there any way to manually set the DNS IPs for all networks, rather than accept the DNS IPs provided via DHCP? Perhaps thru editing a config file or with a terminal command?
 
Well thats the thing.... It's supposed to overrider the automatic entries without having to select them or anything else. They are supposed to just disappear, but apparently it's not?

For some reason I can't post an image or upload an attachment but here's what I just learned.

I added OpenDNS to the DNS entries on my machine.

Now I see the google IPs (grayed out) and the OpenDNS ones.

I tried a garbage url as a quick test and I did end up in OpenDNS's search page so apparently the system works as expected, the router's setting for the DNS server is ignored.

So I guess the question is answered, the only confusion was that the prefs panel still displays the DNS addresses served by DHCP although they are disregarded.
 
It seems that OpenDNS is a little quicker and that confirms a comment that I read on the OpenDNS forums in which the poster listed times for both. He said it was not true for all countries but that it was the case in North America.

My observation is only empirical, no measurements, but that's how it looks this morning.

It kind of makes sense that OpenDNS would be doing everything it can to maximize the speed now that they have competition from google.
 
I've been using openDNS addresses for a while now through my network and I'm happy with the speeds. Before that I was basing my DNS though DNS Server List. I have good results with this as well.
 
Back
Top