<---- template headericclude ----->
DNS (?) resolving too slow on Linux
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Join Date
    Jan 2005
    Location
    CA
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DNS (?) resolving too slow on Linux

    I have SBC DSL at home that is connected to a Dlink router. When I connect to internet on Windows, the internet works fine. But when I am on Linux, and when I try to open a web page, I see 'Looking up www.fedoraforum.org ...' on the browser status bar too long (about 5-6 seconds or more) before it loads the page. Once it makes the connection, the speed is very fast (about 150KB). I am guessing that it is trying to resolve the domain name. I am using FC3 with the latest updates and original networking configuration. Again, no such problem on Windows part (or anything noticeable). Any ideas why this might be happening? Thx.

  2. #2
    awdac Guest
    I don't know, but one of my FC3 machines is doing that and one is not. I have tried practically everything I can think of and everything that I can find having to do with it on Google and this site's search. I've disabled ipv6, I've added DNS servers to the list, I've taken away DNS servers in all kinds of combinations. Everything seems to be ok configuration-wise, and it seems limited to [some installations of] FC3. I would love to hear further suggestions outside of changing DNS servers and orders and adding and taking away the router as DNS and disabling ipv6.

    You have done those things too, no?

  3. #3
    Join Date
    Jan 2005
    Location
    CA
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, I didn't try anything yet. The setup is original install setup. Could this be a hardware specific problem (since you are getting different installs on different computers)?

  4. #4
    awdac Guest
    Maybe, but the first thing you should do is disable ipv6. Go to /etc/modprobe.conf and append these two lines to the end. It usually cures your symptoms:
    Code:
     alias net-pf-10 off
    alias ipv6 off
    Then reboot.

  5. #5
    Join Date
    Jan 2005
    Location
    CA
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestion. It did cure the problem a little bit. It is not happenning as offen as used to. But again every now and then, it takes long to resolve the name. Thx.

  6. #6
    blammo Guest
    Setting up and turning on bind as a caching name server should speed things up even more. Here's an excellent guide: BIND for the Small LAN Anonther way to speed things up on a home LAN ls by using squid. Simply by adding permissions for the local machines to the config and proxying through it, you will see a noticable improvement in the loading of your web pages.

  7. #7
    Northern Guest
    A similar problem was mentioned last week, but I cant find the thread.
    Anyway heres a possible solution I posted that may or may not help you.

    If your using DHCP with you DLink as the DHCP server then chances are your /etc/resolv.conf will be using the Dlink for it's DNS, this is because the DHCP server (your Dlink router) updates your /etc/resolv.conf when your linux box requests an IP address.

    Try changing your /etc/resolv.conf to point to your ISP's DNS servers instead of the Dlink.

    If that fixes it then either tell your DLink to give you the correct DNS server addresses or switch to static IP.

    Hope that helps

  8. #8
    Join Date
    Jan 2005
    Location
    CA
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the suggestions. But the fact that this problem is happening only on FC3 (not on Windows) suggests that this is a FC3 networking bug (may be something to do with IPv6 in kernel). Is there a bug report for networking part of the Linux kernel? Any pointers? URLs? Thx.

  9. #9
    Join Date
    Dec 2004
    Location
    Under your bed
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Things to try to speed up DNS resolution:
    • Install and have the nscd service running
    • Have the router serve the home LAN with DNS requests


    1: nscd (Name service cache daemon)
    Do all this while logged in as root. First, check to see that it is installed:
    Code:
    # rpm -q nscd
    nscd-2.3.4-2.fc3                                 // Ok, nscd is installed
    If it isn't, we have to install it:
    Code:
    # yum -y install nscd
    And let yum do it's thing... Then we make sure it starts when you boot Fedora Core 3 the next time
    Code:
    # chkconfig nscd on
    ...and start it up so it runs now:
    Code:
    # service nscd start
    That should improve things

    2: DSL router as DNS cache
    This may very well be different from router to router. I'm assuming you have the router setup to act as a DHCP server and Fedora and WinXP grabs its adress that way. Some routers might even send out a "correct" list of DNS server adresses with the router's own adress at the top. This then leads to the /etc/resolv.conf be as we want it. If not, read on...

    My router, a Netgear FR114P, works fine as a DNS proxy/cache but doesn't seem deliver that info to LAN computers via DHCP. Instead, it serves out whatever ISP DNS:es it gets on the WAN interface (xDSL side). Therefore, I have to do a wee trick to have my Fedora machine use it as a DNS service.

    2a: Does the router work as a DNS cache?
    Let's do a short test to figure out if the router does work as a DNS proxy. My router is on 192.168.0.1, so I used this to force nslookup to ask the router:
    Code:
    # nslookup www.fedoraforum.org 192.168.0.1
    Server:         192.168.0.1
    Address:        192.168.0.1#53
    
    Non-authoritative answer:
    Name:   fedoraforum.org
    Address: 67.15.84.69
    Yep, works splendidly.

    2b: Do the DHCP replies from the router reflect that?
    Check your /etc/resolv.conf. Here's an example of how it might look
    Code:
    # cat /etc/resolv.conf
    ; generated by /sbin/dhclient-script
    nameserver xxx.xxx.xxx.21
    nameserver xxx.xxx.xxx.22
    nameserver xxx.xxx.xxx.23
    search localdomain
    As you can see, the router's IP# isn't there (192.168.0.1 in my case). If your /etc/resolv.conf automatically gets the router's IP#, stop reading and be happy.

    Me, I had to find a way to have that added there while still adapting to any ISP changes my router forwarded. The trick was to create a new file, /etc/dhclient.conf, with the following content:
    Code:
    prepend domain-name-servers 192.168.0.1;
    That way, every time my computer boots, it gets it's IP address from the router along with other vital network properties, including a list of the DNS server my ISP offers. The first nameserver entry of /etc/resolv.conf will now be 192.168.0.1. That way, DNS lookups will ask that server first if it isn't already cached in memory by nscd (assuming I've understood how that works, anyhow ).

    On my machine this means that name resolution is first handled by nscd, then the router and as a last resort my ISP's name servers.

    3) Alternative: Using bind as a caching nameserver running locally on the machine
    Assume your router can't be made to work as a DNS cache/proxy. Then, as hinted in a reply above, one can set up a DNS server as a cache. Luckily, in Fedora, there's a ready-made RPM package for just that use - caching-nameserver. I have that one installed on my machine but I'm not using it at the moment.

    Check if caching-nameserver is installed:
    Code:
    # rpm -q caching-nameserver
    caching-nameserver-7.3-3
    If it isn't installed, and you'd like to try it, issue
    Code:
    # yum -y install caching-nameserver
    Since it depends on a few other packages, they might be installed too (the bind name server service being one)

    First, make sure the local bind server is used first for DNS requests:
    /etc/dhclient.conf:
    Code:
    prepend domain-name-servers 127.0.0.1;
    Start it up
    Code:
    # chkconfig named on
    # service named start
    And that should do it...

    To make the changes take effect, you can always reboot. But since this isn't toy trash like Win9x/Me, we do it the proper way:
    Code:
    # ifdown eth0; ifup eth0
    or, if that doesn't do it
    Code:
    # service network restart
    I'm using the first alternative above, nscd + router as DNS proxy. It works a treat. I hope that some of this will help you analyse your problem and perhaps solve it.

    Good luck!

    EDIT: The service to run in #3 is "named", not "bind". (Mixed them up since the RPM package that installs named is called bind). Fixed. Thanks for the heads-up, awdac
    Last edited by jowah; 22nd February 2005 at 10:45 AM.

  10. #10
    Jesus-Franco Guest

    [Help] Webbrowsing is slow on FC3

    Well I was on windows (agian) got sick of it and now I'm back on linux. Installed Fedora Core3 agian. Can someone tell me how I can speed up my webbrowsing. Up2date is fast (sometimes upto 600kbs) but surfing and filetransfers in IM is slow. I'm behind a router and the settings seems to be setup perfectly.

    Please help. I dont want to go back to windows but webbrowsing is something I do alot.

  11. #11
    jim's Avatar
    jim is offline Retired Community Manager & Avid Drinker Of Suds
    Join Date
    Feb 2005
    Location
    Rochester NY
    Age
    49
    Posts
    4,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    open firefox & in the address bar type about:config
    right click anywhere in the window and select new--> integer
    in the dialog box type browser.cache.memory.capacity
    in the following dialog box, type in 16000 <-- represents 16 MB of memory

    http://forums.mozillazine.org/viewto...age=15&start=0
    http://www.tweakfactor.com/articles/...oxtweak/4.html
    Registered Linux User: #376813
    Western NY
    My linux site
    Smolt Profile

    please remember to say if you problem was solved

    Did you get your id10t award today?

  12. #12
    Jesus-Franco Guest
    Weird, My internet is faster in linux than in windows when the pc is connected directly to the cable modem. I will try changing the routers settings, and will try those tips above. Thanks man.

  13. #13
    awdac Guest
    Hi all,
    I finally got to implement some of the things suggested in jowah's post above, and they wroked very well indeed on the machine that was giving me fits. I think in my case, it's a matter of my isp's DNS servers intermittently sucking (as confirmed by members of my local LUG) and my cheapo home router that combined to make this home machine much slower than the similar setup at work. So, anyway, now that the caching nameserver is set up (and I actually ended up using options 1 and 3 -- with the minor correction that service bind, etc should be service service named, etc), everything is moving along swimmingly. Thanks.

    And you got a point for that one, jowah... .

  14. #14
    carlwill Guest
    Another for great info!

  15. #15
    bluetrident Guest
    Thanks for posting this info. I've been scouring the net for a few weeks trying to figure out this same problem. Had basically resigned to running my own DNS. Thanks again.

Page 1 of 2 12 LastLast

Similar Threads

  1. resolving DNS from client PC to linux router
    By wlpl in forum Servers & Networking
    Replies: 0
    Last Post: 20th January 2008, 08:17 AM
  2. FC6: DNS Resolving is Too Slow!!!
    By dealmaker in forum Servers & Networking
    Replies: 14
    Last Post: 28th December 2006, 04:56 PM
  3. Slow resolving hosts in anything HELP???
    By garymayor in forum Servers & Networking
    Replies: 5
    Last Post: 2nd February 2005, 10:36 PM
  4. Slow host resolving
    By sindbad in forum Using Fedora
    Replies: 13
    Last Post: 26th June 2004, 06:42 AM
  5. Web browsers slow at resolving hosts in FC2
    By jdc in forum EOL (End Of Life) Versions
    Replies: 5
    Last Post: 20th May 2004, 02:56 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]