Author Topic: wondering about setting up a local DNS cache [resolved]  (Read 2008 times)

Offline mmmmna

  • Full Member
  • ***
  • Posts: 167
Re: wondering about setting up a local DNS cache
« Reply #15 on: April 17, 2011, 01:14:15 PM »
can you post the content of your /etc/resolv.conf ?
additionally can you check the status of the services resolvconf and nscd:
chkconfig --list resolvconf
chkconfig --list nscd



Of course I can post that!

BTW, a post ago, I dropped using Google as my DNS and returned to the OpenDNS as set in my wireless router.

Code: [Select]
[mmmmna@localhost ~]$
[mmmmna@localhost ~]$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1
[mmmmna@localhost ~]$ chkconfig --list resolvconf
resolvconf      0:off   1:off   2:on    3:on    4:on    5:on    6:off   7:off
[mmmmna@localhost ~]$ chkconfig --list nscd
nscd            0:off   1:off   2:off   3:on    4:on    5:on    6:off   7:off
[mmmmna@localhost ~]$
[mmmmna@localhost ~]$
Desktop: ECS RC410L/800-M (ATI chipset, ignoring onboard graphics), ATI PCIe X500XL graphics, 64 bit Celeron D 3.33GHz, 1G SDRAM, 2x IDE HDD, DVDRW, Dynex media reader, NEC firewire card, Broadcom 4302r3 based wireless nic.
Netbook: Eee PC 900A upgraded with a 32G SSD and 2G SDRAM

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: wondering about setting up a local DNS cache
« Reply #16 on: April 17, 2011, 01:27:53 PM »
can you post the content of your /etc/resolv.conf ?
additionally can you check the status of the services resolvconf and nscd:
chkconfig --list resolvconf
chkconfig --list nscd



Of course I can post that!

BTW, a post ago, I dropped using Google as my DNS and returned to the OpenDNS as set in my wireless router.

Code: [Select]
[mmmmna@localhost ~]$
[mmmmna@localhost ~]$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1
[mmmmna@localhost ~]$ chkconfig --list resolvconf
resolvconf      0:off   1:off   2:on    3:on    4:on    5:on    6:off   7:off
[mmmmna@localhost ~]$ chkconfig --list nscd
nscd            0:off   1:off   2:off   3:on    4:on    5:on    6:off   7:off
[mmmmna@localhost ~]$
[mmmmna@localhost ~]$

try the following (your result should be something less than 10 ms):
ping -c 5 192.168.1.1

from PCC -> Network and Internet -> Network center -> {choose your wireless connection} -> click button advanced settings and mark disable IPv6

turn off resolvconf service:
chkconfig resolvconf off

verify using:
chkconfig --list resolvconf

reboot your system   <<-----------

then try to surf the net ...

AS

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6214
Re: wondering about setting up a local DNS cache
« Reply #17 on: April 17, 2011, 01:29:23 PM »
so you send your DNS request to your router and then your router send them to openDNS? How sure are you that the router is not the one slowing you down?

Try setting the dns server on your computer(in /etc/resolv.conf) and see if you still experience the slowdown

did turning off ipv6 in firefox make any difference?
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6214
Re: wondering about setting up a local DNS cache
« Reply #18 on: April 17, 2011, 01:32:06 PM »

try the following (your result should be something less than 10 ms):
ping -c 5 192.168.1.1


He can go online and hence the address is valid and his problem is with DNS response time hence this test is not very useful since it doesnt check for DNS requests response time
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: wondering about setting up a local DNS cache
« Reply #19 on: April 17, 2011, 01:37:04 PM »

try the following (your result should be something less than 10 ms):
ping -c 5 192.168.1.1


He can go online and hence the address is valid and his problem is with DNS response time hence this test is not very useful since it doesnt check for DNS requests response time

of course, wanted to be sure that the wireless connection was working as expected ... but you are right wireless is working because of previous pings results ...

Offline mmmmna

  • Full Member
  • ***
  • Posts: 167
Re: wondering about setting up a local DNS cache
« Reply #20 on: April 17, 2011, 02:30:10 PM »
try the following (your result should be something less than 10 ms):
ping -c 5 192.168.1.1
My Results:
Code: [Select]
[mmmmna@localhost ~]$ ping -c 5 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.711 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=2.17 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=50.8 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.835 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=2.31 ms

--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4053ms
rtt min/avg/max/mdev = 0.711/11.369/50.817/19.735 ms
[mmmmna@localhost ~]$ ping -c 5 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.910 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.678 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=1.51 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.788 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=0.915 ms

--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4350ms
rtt min/avg/max/mdev = 0.678/0.960/1.513/0.292 ms
[mmmmna@localhost ~]$

Quote
from PCC -> Network and Internet -> Network center -> {choose your wireless connection} -> click button advanced settings and mark disable IPv6
Ok, will do this much, but not the rest until after I get to respond to muungwana.
Desktop: ECS RC410L/800-M (ATI chipset, ignoring onboard graphics), ATI PCIe X500XL graphics, 64 bit Celeron D 3.33GHz, 1G SDRAM, 2x IDE HDD, DVDRW, Dynex media reader, NEC firewire card, Broadcom 4302r3 based wireless nic.
Netbook: Eee PC 900A upgraded with a 32G SSD and 2G SDRAM

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: wondering about setting up a local DNS cache
« Reply #21 on: April 17, 2011, 02:55:13 PM »
Quote
$ ping -c 5 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.711 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=2.17 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=50.8 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.835 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=2.31 ms

There is something not right with this .......  especially the one marked ....... 

Offline mmmmna

  • Full Member
  • ***
  • Posts: 167
Re: wondering about setting up a local DNS cache
« Reply #22 on: April 17, 2011, 03:10:10 PM »
so you send your DNS request to your router and then your router send them to openDNS? How sure are you that the router is not the one slowing you down?
ALL of my times were taken by going through an unchanged configuration: the wireless router (Netgear WNR2000) then on to the DSL modem (Actiontec 704c). Everyone in the house is wireless.
Quote

Try setting the dns server on your computer(in /etc/resolv.conf) and see if you still experience the slowdown
In a moment or 2.
Quote
did turning off ipv6 in firefox make any difference?
Yes, it did.




Quote
$ ping -c 5 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.711 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=2.17 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=50.8 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.835 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=2.31 ms

There is something not right with this .......  especially the one marked ....... 
Even when you consider that there are 2 other PCs using the network at the same time? More of the same:
Code: [Select]
[mmmmna@localhost ~]$ ping -c 50 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=1.25 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.711 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=0.686 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.926 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=0.659 ms
64 bytes from 192.168.1.1: icmp_req=6 ttl=64 time=0.711 ms
64 bytes from 192.168.1.1: icmp_req=7 ttl=64 time=0.823 ms
64 bytes from 192.168.1.1: icmp_req=8 ttl=64 time=0.818 ms
64 bytes from 192.168.1.1: icmp_req=9 ttl=64 time=0.690 ms
64 bytes from 192.168.1.1: icmp_req=10 ttl=64 time=0.701 ms
64 bytes from 192.168.1.1: icmp_req=11 ttl=64 time=0.690 ms
64 bytes from 192.168.1.1: icmp_req=12 ttl=64 time=1.16 ms
64 bytes from 192.168.1.1: icmp_req=13 ttl=64 time=0.698 ms
64 bytes from 192.168.1.1: icmp_req=14 ttl=64 time=0.688 ms
64 bytes from 192.168.1.1: icmp_req=15 ttl=64 time=0.685 ms
64 bytes from 192.168.1.1: icmp_req=16 ttl=64 time=0.629 ms
64 bytes from 192.168.1.1: icmp_req=17 ttl=64 time=0.659 ms
64 bytes from 192.168.1.1: icmp_req=18 ttl=64 time=0.675 ms
64 bytes from 192.168.1.1: icmp_req=19 ttl=64 time=0.685 ms
64 bytes from 192.168.1.1: icmp_req=20 ttl=64 time=0.683 ms
64 bytes from 192.168.1.1: icmp_req=21 ttl=64 time=0.705 ms
64 bytes from 192.168.1.1: icmp_req=22 ttl=64 time=0.664 ms
64 bytes from 192.168.1.1: icmp_req=23 ttl=64 time=0.702 ms
64 bytes from 192.168.1.1: icmp_req=24 ttl=64 time=0.699 ms
64 bytes from 192.168.1.1: icmp_req=25 ttl=64 time=0.651 ms
64 bytes from 192.168.1.1: icmp_req=26 ttl=64 time=1.13 ms
64 bytes from 192.168.1.1: icmp_req=27 ttl=64 time=9.90 ms
64 bytes from 192.168.1.1: icmp_req=28 ttl=64 time=0.667 ms
64 bytes from 192.168.1.1: icmp_req=29 ttl=64 time=0.686 ms
64 bytes from 192.168.1.1: icmp_req=30 ttl=64 time=0.700 ms
64 bytes from 192.168.1.1: icmp_req=31 ttl=64 time=0.834 ms
64 bytes from 192.168.1.1: icmp_req=32 ttl=64 time=0.730 ms
64 bytes from 192.168.1.1: icmp_req=33 ttl=64 time=0.713 ms
64 bytes from 192.168.1.1: icmp_req=34 ttl=64 time=0.720 ms
64 bytes from 192.168.1.1: icmp_req=35 ttl=64 time=0.685 ms
64 bytes from 192.168.1.1: icmp_req=36 ttl=64 time=0.682 ms
64 bytes from 192.168.1.1: icmp_req=37 ttl=64 time=0.724 ms
64 bytes from 192.168.1.1: icmp_req=38 ttl=64 time=0.848 ms
64 bytes from 192.168.1.1: icmp_req=39 ttl=64 time=7.04 ms
64 bytes from 192.168.1.1: icmp_req=40 ttl=64 time=0.711 ms
64 bytes from 192.168.1.1: icmp_req=41 ttl=64 time=1.04 ms
64 bytes from 192.168.1.1: icmp_req=42 ttl=64 time=0.678 ms
64 bytes from 192.168.1.1: icmp_req=43 ttl=64 time=0.671 ms
64 bytes from 192.168.1.1: icmp_req=44 ttl=64 time=0.668 ms
64 bytes from 192.168.1.1: icmp_req=45 ttl=64 time=0.682 ms
64 bytes from 192.168.1.1: icmp_req=46 ttl=64 time=0.687 ms
64 bytes from 192.168.1.1: icmp_req=47 ttl=64 time=0.702 ms
64 bytes from 192.168.1.1: icmp_req=48 ttl=64 time=0.778 ms
64 bytes from 192.168.1.1: icmp_req=49 ttl=64 time=1.03 ms
64 bytes from 192.168.1.1: icmp_req=50 ttl=64 time=0.678 ms

--- 192.168.1.1 ping statistics ---
50 packets transmitted, 50 received, 0% packet loss, time 50425ms
rtt min/avg/max/mdev = 0.629/1.061/9.900/1.545 ms
[mmmmna@localhost ~]$
The data for icmp_req #27 and #39 was generated at the same time when I deliberately clicked to preview my post, just to show how my own traffic can change the results.

Thanks to everyone for all the help, things are much better now, have been decent since I A] returned to using OpenDNS and B] disabled IPV6 in Firefox. The Firefox tweak is definitely a classic adjustment that needs to be made, and is an adjustment which I tend to forget to make when I overwrite an older distro installation.
Desktop: ECS RC410L/800-M (ATI chipset, ignoring onboard graphics), ATI PCIe X500XL graphics, 64 bit Celeron D 3.33GHz, 1G SDRAM, 2x IDE HDD, DVDRW, Dynex media reader, NEC firewire card, Broadcom 4302r3 based wireless nic.
Netbook: Eee PC 900A upgraded with a 32G SSD and 2G SDRAM

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: wondering about setting up a local DNS cache [paused]
« Reply #23 on: April 17, 2011, 03:30:14 PM »
Quote
Thanks to everyone for all the help, things are much better now, have been decent since I A] returned to using OpenDNS and B] disabled IPV6 in Firefox. The Firefox tweak is definitely a classic adjustment that needs to be made, and is an adjustment which I tend to forget to make when I overwrite an older distro installation.


Good that things has improved. Still I'm thinking at something else because of:

Quote
[mmmmna@localhost ~]$ time -p ping -c 1 www.google.com
PING www.l.google.com (74.125.230.113) 56(84) bytes of data.
64 bytes from 74.125.230.113: icmp_req=1 ttl=57 time=92.5 ms

--- www.l.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 92.521/92.521/92.521/0.000 ms
real 5.34
user 0.00
sys 0.00


the above times are completely independent from Firefox settings.

AS




Offline mmmmna

  • Full Member
  • ***
  • Posts: 167
Re: wondering about setting up a local DNS cache [paused]
« Reply #24 on: May 10, 2011, 08:33:51 PM »
Well, I'm quite happy to report that I rarely get long delays now that I have disabled IPV6 in the 2 locations (in Firefox and in network configuration settings).

Still wondering how well things would work if I had my own DNS cache, but the need isn't as urgent.

Also still wondering if using IPV6 within (and on) an IPV6 network will remain as slow as I had been reporting in April. That would be sensational, if a simple DNS lookup took several seconds in a normal IPV6 future.
Desktop: ECS RC410L/800-M (ATI chipset, ignoring onboard graphics), ATI PCIe X500XL graphics, 64 bit Celeron D 3.33GHz, 1G SDRAM, 2x IDE HDD, DVDRW, Dynex media reader, NEC firewire card, Broadcom 4302r3 based wireless nic.
Netbook: Eee PC 900A upgraded with a 32G SSD and 2G SDRAM

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: wondering about setting up a local DNS cache [paused]
« Reply #25 on: May 10, 2011, 10:45:08 PM »
Well, I'm quite happy to report that I rarely get long delays now that I have disabled IPV6 in the 2 locations (in Firefox and in network configuration settings).

Still wondering how well things would work if I had my own DNS cache, but the need isn't as urgent.

Also still wondering if using IPV6 within (and on) an IPV6 network will remain as slow as I had been reporting in April. That would be sensational, if a simple DNS lookup took several seconds in a normal IPV6 future.

I really do not believe that you will see any stellar performance from using it.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: wondering about setting up a local DNS cache
« Reply #26 on: August 13, 2011, 09:37:27 AM »
Sounds to me like an IPv4/IPv6 problem.

I would ensure that IPv6 is disabled in FF if not in use.

Under about:config

network.dns.disableIPv6;                 true

Just posting to say that this has greatly improved my life :)
Thanks to you and also to mmmmna for starting this thread.
-SS.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6