1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Slow DNS requests(?).

Discussion in 'Tomato Firmware' started by MiseryQ, Nov 26, 2006.

  1. MiseryQ

    MiseryQ Network Guru Member

    I've been using Tomato for a little while now.
    I've tried it on three routers, two at home, one at work.

    All the routers loaded with Tomato take a few seconds to "find" the website, then once "found" it loads normally and quickly. Often it won't find the site and a refresh will get the site up.
    With DNS servers entered in Tomato manually it does'nt do this. Neither does other firmwares.

    Any ideas on this please?
  2. Rafatk

    Rafatk Network Guru Member

    Did you try to uncheck the option under ADVANCED -> DHCP/DNS -> Always use internal caching DNS forwarder ?
    Try that, and did you assign DNS server in the Tomato?

  3. MiseryQ

    MiseryQ Network Guru Member

    Thanks for the response.

    Yes I tried that both checked and unchecked.
    When the DNS server is manually entered it does'nt have the delay.
  4. Rafatk

    Rafatk Network Guru Member

    Yeah enter the DNS servers in your router.
    Then uncheck that option and repair de network connections of your computers on your network.
    If you check the DETAILS now in the status of the LAN connection you will see that the DNS server is the IP of your router, with the option checked.
    If you uncheck the option and check it again, you will see that the router assigned the DNS server that you entered in the router.
    Probably you will be good to go.
    This way you won't have to assign the DNS server manually in the computers of your network.
    The router will assign it.

  5. njeske

    njeske Network Guru Member

    i don't have the problem you're experiencing, but as others have alreadyu said setting your router to use your ISP DNS rather than internal DNS should solve your problem.
  6. rcordorica

    rcordorica Network Guru Member

    I have a similar issue with the dns caching.

    With caching enabled the router becomes the DNS server for clients connected to it. This works fine, and websites take a similar time to load the first time compared to just straight dns from my ISP.

    but with caching enabled every time I revisit a page my browser reloads all of the images despite having disk and ram caching in firefox. There is a perceptible "lag" with the caching enabled.

    when caching is disabled and I am using my ISP's assigned DNS, the page loads instantly and no image reloading is done.

    The issue isn't really speed related, but I feel that having the DNS cache just adds one more hop for the browser to travel before it gets it's destination address. I guess Windows should get the destination address and cache it too, but does having the router cache the DNS affect this process?
  7. MiseryQ

    MiseryQ Network Guru Member

    I did load the ISPs settings into the router.

    After I posted this I switched to OpenWRT firmware with X-WRT.
    It's Lightning fast. Well supported. And has daily builds :)
  8. GeeTek

    GeeTek Guest

    Does OpenWRT have the option that Tomato offers to Cache or not Cache or does it simply support only the direct DNS mode ? With Ver 9 Tomato DNS set either way, both on a GL, and on a WHRg54s, I cannot detect the slightest difference in page load times.

    Edit - What does one have to gain by making your local router act as a DNS caching system anyway ? What is wrong with using the ISPees DNS server ? As was mentioned higher in the thread, there is nothing to gain by forcing the request to be processed an extra time by an extra device ! I doubt that Tomato is even caching the DNS info. That would require a lot of memory that these routers do not have. Jon probably put the relay option there for some other application, and you are using it for the wrong thing.
  9. turbo53

    turbo53 Network Guru Member

    The main thing that I like about this is that it allows me to have a DNS server for my local network. Tomato and other firmwares running DNSMASQ will automatically resolve names on your local network, without having to use HOSTS files on each workstation. I like the convenience of this and the larger your home network is the more useful it is.

    A secondary advantage is that if your ISP changes the DNS IP addresses your router knows about it at the next DHCP renewal and will start forwarding to the new addresses. If you have any devices with static IP addresses, then you would otherwise have to manually update those devices with the new addresses. This actually happened to me. My devices with static IP addresses had hardcoded DNS addresses. When the ISP changed those addresses these devices stopped working until I figured out what happened. Now those devices simply point to the router for DNS which bypasses the issue.
  10. MiseryQ

    MiseryQ Network Guru Member

    I don't believe it does. I tried it with caching on and off and the delay was still there.

    The only way to get rid of it was to enter the ISP DNS in the routers settings.

    BTW I still have Tomato loaded on a V4 at work.
  11. NateHoy

    NateHoy Network Guru Member

    That's what a "cache" server does. On the first lookup, the DNS lookup takes longer (though it shouldn't be noticeable). On all subsequent lookups, the router's internal DNS server can provide you with the DNS lookup without having to go back out to the Internet and check it again. So that initial cost is paid back the second time you do a DNS lookup on the same domain.

    As far as memory is concerned, you can free up a bit of memory by not using the DNS cache, of course. You can also free up a small amount of processor resource, as well. However, each DNS cache entry is small (much smaller than, say, a NAT table entry). So even if the router cached a few thousand DNS entries, you aren't talking more than a few dozen KB at worst of data. Even on a modest 8MB WRT54GL, a 64-100K table isn't really a lot of storage.

    The balance point to that, of course, is whether you do a lot of repeat lookups on the same DNS address. If you do, then Tomato is FAR better off using its internal cache, as it does not have to do constant (and repeat) lookups over the Internet, freeing up WAN resources for actual data rather than asking about the same DNS address over and over and over.

    Of course, since your computer and possibly even your web browser itself ALSO have DNS caches, having yet another one in your router could be of dubious value anyway.

    The real value of a DNS cache in Tomato (as mentioned before) is "internal DNS" entries - that is, DNS entries that are internal to your LAN. Instead of accessing my Linux box by using, I can just type "linux.box" as my "IP address".

    If you don't use any internal addresses, and you are happy with the DNS caches built into your OS or your web browser, then by all means disable the internal DNS cache in Tomato and have your computer use your ISP's servers directly. (of course, you'll also have to release/renew each PC's connection to Tomato to get the settings loaded to your PC). You won't save a lot of resources, and it won't speed things up noticeably (unless something is wrong with the DNS cache), but it can't hurt.
  12. GeeTek

    GeeTek Guest

    NateHoy, it would appear that you are correct. The casher does seem to be working. I think my computer must be cashing locally as well, and was befusing me. I upgraded to Ver 1, and then 101 to be sure it was not ver .9 difference. It was not, and I do see a small but noticable improvement on page find times, particularly after re-booting the PC. My best performance seems to be with both DNS options boxes selected in Advanced - DNS, and one single foreign DNS entry as a static IP under Basic - Network. The foreign DNS server has faster and more consistent ping responses than my own ISP's DNS server.

    MizeryQ, that is a real interesting find you made. Your performance difference doesn't seem to be related to the DNS cache system, as the problem persisted with either cache option. Even without the static DNS entry that I made it was hard to see any difference. What models of radio do you have, and what type of internet service ?
  13. NateHoy

    NateHoy Network Guru Member

    Other possible DNS servers, if your ISP's are really bad.

    Ping each of them in turn, and pick the fastest. ;)

    I allow my ISP's to be listed, since they are pretty fast, then I added as a third option in case they are down.
  14. MiseryQ

    MiseryQ Network Guru Member

    I now have Cox on both work and home computers.

    My routers are a WRT54GSv1 & WRT54GSv4
    At Work the router is a WRT54Gv4
  15. GeeTek

    GeeTek Guest

    The whole problem is very curious. On my main Tomato status page, my 3 DNS entries are populated with the 2 addresses obtained by DHCP from my cable modem, and 1 address that I statically entered. When you obtain by DHCP, do the addesses show up in the status page ? If so, there should be no logical difference due to how the address was obtained. After obtained, DHCP addresses are essentially static until the lease expires. You have enough variety of radio to rule out a problem with a particular model. My service provider is not COX. It is just one, RoadRunner, so if there is an anomoly with Tomato and COX hardware, I would not be able to cross test anything. Thanks to the new out-bound QOS chart, I have discovered that during heavy browsing times (by about 40 concurrent users and 2.5 - 3 Mb steady download streams), the router is connected to all 3 of my DNS servers, and pushes out about a 55 kb continuous stream in requests, which suprised me by being so much bandwidth.
  16. dankim831

    dankim831 Network Guru Member

    would the massive amount of connections that bit torrent creates cause the dns cache to slow the router down at all?
  17. MiseryQ

    MiseryQ Network Guru Member

    That's a good quest dankim831 asks.
    The router at work is'nt as bad as the ones at home which run BitTorrent a lot.

    If I remember I'll change the settings on the router at work, and refresh my memory of the "problem". I'll also update it. It's probably still on .7.

    If 1.0 still has the issue I'll install Tomato on my V1 and try it at home.
  18. MiseryQ

    MiseryQ Network Guru Member

    Yeah I'm a slacker.
    I bought a new computer for my daughter and although she does'nt go on the net I needed access restriction so I installed Tomato 1.X last week. I still have'nt gotten around to updating at work.

    The delay is gone even with cache enabled. I absolutely love the real time bandwidth page. Besides, before I switched to OpenWRT my uptime with Tomato was over 3months!

Share This Page