Gentoo Archives: gentoo-user

From: michael higgins <linux@×××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] caching DNS the Gentoo way?
Date: Sat, 10 Dec 2005 01:02:07
Message-Id: 20051209165217.4e84bdaa@localhost
In Reply to: Re: [gentoo-user] caching DNS the Gentoo way? by Richard Fish
1 On Fri, 9 Dec 2005 17:08:55 -0700
2 Richard Fish <bigfish@××××××××××.org> wrote:
3
4 > On 12/9/05, michael higgins <linux@×××××××.com> wrote:
5 > > I've found that it'll often takes longer to get DNS resolution than content over my connection, so I thought a caching DNS server the way to go. With that in mind, I installed BIND.
6 >
7 > nscd does this, and is much simpler. It is already installed as part
8 > of glibc. Just do rc-update -a nscd default.
9
10 Ah. Now, that sounds like the better way to go.
11
12 >
13 > > From what I understand (right or wrong, IDK), I should only have to look up something once, then that info is available locally until I reboot. Or, like that...
14 >
15 > It will cache until named is restarted, or the lookup expires. The
16 > lookup expiration time is determined by the authoritative name server
17 > for that domain.
18 >
19 > > So, how do I know if this is doing what I want? If anyone knows the right and proper way to do this, I'd appreciate it.
20 >
21 > From one terminal:
22 >
23 > tcpdump dst port 53
24 >
25 > From another terminal:
26 >
27 > ping -c 4 google.com
28 > ping -c 4 google.com
29 >
30 > If you see domain queries being sent when you do the second ping, then
31 > you are not caching.
32 >
33
34 Excellent, thanks! I'm emerging tcpdump as I type.
35
36 Well, the test is the ticket. The thing I needed was to change /etc/resolv.conf.
37
38 Now it begins to make sense to me.
39
40 > BTW, if you really want to use named for this, your /etc/resolv.conf
41 > should contain only "nameserver 127.0.0.1". If you are use nscd, then
42 > resolv.conf can be left as is.
43 >
44
45 Okay. Too bad I didn't ask the list first. It sure looked like BIND was overkill, but I didn't come across another option.
46
47 Thanks again,
48
49 --
50 |\ /| | | ~ ~
51 | \/ | |---| `|` ?
52 | |ichael | |iggins \^ /
53 michael_higgins[at]iinet[dot]com
54 --
55 gentoo-user@g.o mailing list