[linux] Alternate DNS Servers


Recommended Posts

My ISP's DNS server is dogggggggg slow .... at times, it takes up to 10 seconds just to resolve a url, and for some urls that resolve fine with other isps, they don't resolve at all here (it's been about a week now since I was able to dns www.fark.com, for example ;) ). First of all, could this have been due to a kernel compilation error? I'm hoping not, because I checked it over, but are there any settings I could have missed?

Next, if there's nothing in the kernel that might be affecting speeds, than it's definitely my ISP's dns server... if so, is there a way I can use an alternative? This is kind of starting to become annoying ;)

Link to comment
Share on other sites

please register ur linux distro, kernel version, if there were error on kernel build, how long have u been suffering from this , have u reported any authorities at the ISP .

Ur problem will be thoroughly anwsered / addressed 2night around 8 pm GMT.

Link to comment
Share on other sites

As far as I know, you should be able to enter the IP addy of another DNS server and run. As long as you have your ISP's router to get packets out of your subnet...

Link to comment
Share on other sites

Are you running SUSE? I had problems there too. The best thing to do is to boot up a live distro like knoppix and see if it's any better - you'll at least know if its your settings or the ISP then.

Link to comment
Share on other sites

stick alternates in /etc/resolv.conf. Running bind etc won't help much (it'll make lookups on domains you've been to recently quicker), as they'll just check with the dns servers they know about, which just happens to be the ones in /etc/resolv.con that you are currently using.

Link to comment
Share on other sites

Not true. BIND resolves its own DNSes. I've run it for months with only "nameserver 127.0.0.1" in my /etc/resolv.conf, so obviously it isn't just using another DNS server to resolve names.

Link to comment
Share on other sites

Not true. BIND resolves its own DNSes. I've run it for months with only "nameserver 127.0.0.1" in my /etc/resolv.conf, so obviously it isn't just using another DNS server to resolve names.

all dns servers perform recursion. dns is a hierarchical based system & bind does not resolve things on its own. bind does, however, perform a query out to one of the root hints servers if it doesn't know a name resolution. bind, like other dns servers, has a root hints list that lists all the root hint servers that it can query if it cannot resolve a name on its own (which is a lot of the time if the name isn't cached, because dns servers are only authoritative for a specific zone, being your local network and local domain name.)

it is however, better and much cleaner traffic-wise to forward unknown dns requests off to your isp's dns servers, which will then pass off to a top level dns if need be, and sometimes pass all the way up to root hints if it has to (usually doesn't, which is why forwarding is preferred, it cuts an extra jump out of resolution that may or may not be needed).

the reason you only need 127.0.0.1 in /etc/resolv.conf is because bind is doing it's own forwarding to the root hints servers and you don't need any other listings in resolv.conf

for this problem, i would try making another of your isp's dns servers in /etc/resolv.conf and run that way for a while. also if you don't have it installed, get nslookup and make sure that it is using that other dns server.

Link to comment
Share on other sites

please register ur linux distro, kernel version, if there were error on kernel build, how long have u been suffering from this , have u reported any authorities at the ISP .

Ur problem will be thoroughly anwsered / addressed 2night around 8 pm GMT.

Hehe, thanks :)

Gentoo Linux, love-sources 2.6.0-test11 (basically mm-sources with bootsplash, alsa 1.0rc1, and a few performance patches - not much to do w/ networking), no errors on kernel build, the last 1-2 weeks. I haven't reported it to my ISP because - they tend not to help at all unfortunately (they make me run ipconfig /release and ipconfig /renew on my windows box even though I'm *sure* that's not the problem ... and repeat it over and over again ;) ). I'm a bit jaded with them as they took about a year (ok, i exaggerate, but a *very* long time) to figure out there was something wrong with my phone line/on their end, and not with my software, although I had been telling them that for the span of that time. =)

I've just installed BIND, because, regardless of whether it will fix my problem, I *do* like the idea of DNS caching. Just wondering, is it possible to clear the cache, and if so, how?

Also, in regards to my ISP's other dns servers ... they don't list them anywhere I can see on their site or in any manuals. I have two of the servers listed in /etc/resolv.conf, which I'm assuming are automatically found.

Thanks alot for all your help you guys, neowin (and you) rock(s)!

Link to comment
Share on other sites

Well, just had time to configure bind (cool, gentoo chroots it for you :D). Thanks so much for the help, I am now able to resolve addresses that I was previously unable to. My prior questions regarding the cache (how to clear) still stand however, along with the following;

- does it clear on reboot?

- where can i find it?

- can i clear specific entries?

Thanks!

Link to comment
Share on other sites

Sorry to keep bumping this, but since I can't edit my posts ....

Every time I reboot, my /etc/resolv.conf is reverted to its previous state (eg, with just my 2 isp's dns servers, with no nameserver 127.0.0.1 line). I took a look in /etc/init.d, and did a grep resolv.conf *, and found that the only script that actually modifies resolv.conf is domainname, which, according to rc-update show, is not even set up to run on boot. Also, I ran grep domainname * in /etc/init.d, and apparently no script depends on this either.

I am at a loss as to what to do ... how can I keep my /etc/resolv.conf modified for bootup?

Thanks :)

Link to comment
Share on other sites

I believe your resolv.conf is modified by the DHCPCD system, as I can only assume your machine is getting a dhcp address on boot.

Have a read here :

http://linux.cudeso.be/linuxdoc/tweaky_net.php#hint_network1

If *that* doesn't work, what you could do is in your rc.local file, start a new resolv.conf file by just echoing out some lines to the resolv.conf, because I think the dhcpcd does its stuff way before the rc.local is parsed.

Could just put in rc.local :

# This is to put my DNS server info back

echo "nameserver 127.0.0.1" > /etc/resolv.conf

Edited by Chicane-UK
Link to comment
Share on other sites

Thanks a lot! :D You assumed correctly in that I was using dhcpcd, so I did a man dhcpcd and took a look at the options. Apparently, there is an option (dhcpcd -R) that prevents overwriting of /etc/resolv.conf , so adding that to the command line options of my net.eth0 startup script worked like a charm. Thanks again =)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.