LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Slackware, dns lookups are slow because resolv.conf includes my routers nameserver (https://www.linuxquestions.org/questions/linux-newbie-8/slackware-dns-lookups-are-slow-because-resolv-conf-includes-my-routers-nameserver-4175529847/)

952audio 01-02-2015 03:32 PM

Slackware, dns lookups are slow because resolv.conf includes my routers nameserver
 
This is frustrating as heck. The router is a Myessentials el cheapo (DHCP) sold at one time by Belkin.

If the router's internal DNS server is allowed to do name lookups, it slows down browsing dramatically.

Windows does not exhibit any slowdown with this same router, on the same PC.

The fix is to edit resolv.conf, take out the routers dns server (192.168.2.1) and make sure it doesn't get overwritten on the next boot, by editing /etc/rc.d/rc.inet1.conf to include:

DHCP_KEEPRESOLV[0]="yes" # need this with the new router

$ cat /etc/resolv.conf
# Generated by dhcpcd for interface eth0
search roc.mn.charter.com
# nameserver 192.168.2.1
nameserver 24.159.193.40
nameserver 68.115.71.53
# timeout 1

Name lookups take over 60 ms using the router vs less than 15 using Charters'.

$ ns_bench 192.168.2.1 24.159.193.40
Nameserver Response Time (ms)
min/avg/max/stdev/retries

192.168.2.1 61.65/61.86/62.44/0.29/0
24.159.193.40 12.52/12.78/13.23/0.25/0

So now if I want to try out slackware 13 on a live CD. Slow, Slow, Slow Name lookups until I edit resolv.conf and take out 192.168.2.1, then wonderful !

I've tried getting the router to stop reporting that it's a valid Name server to no avail, and Charter uses dynamic IPs.

I suppose the answer is to "buy a new router" but it's not a problem when running the same PC under Windows, and a new router might do the same thing.

I have found a workaround, so the problem is solved for me, but newbies trying linux may discover that browsing under windows is faster than browsing under linux, which doesn't need to be.

onebuck 01-03-2015 03:07 PM

Moderator response
 
Since you state the thread is [Solved]. I am replying to take the thread off zero reply.

I do suggest that in the future you should reply to the thread with a solution post instead of editing the OP to include potential solutions.


All times are GMT -5. The time now is 03:31 PM.