On Apr 30, 2006, at 10:33 PM, Bill Rising wrote:

> Ok --- I read through the hint, and read the rather heated  
> discussion (since now everything is working quite well, suddenly).  
> One of the discussants said that most routers will cache DNS info  
> for later use --- if this were the case, then there would be no  
> need to have the local caching DNS server (according to the  
> poster). I ran his test to see where my laptop gets its info about  
> apple.com from inside terminal:
>
> host -v www.apple.com
>
> and found that the DNS info actually did come from my router. This  
> now confuses me, since I was having trouble getting to apple.com  
> when the apparent DNS problems were happening.

I should have read the hint more carefully. It isn't setting up a DNS  
as the hint says, but merely a DNS cache. My local cached DNS  
actually goes to the root servers to get the addresses just like the  
big boys do. It bypasses the InsightBB (actually AT&T) DNS entirely.

The way most routers work is that they get the address of the ISP's  
preferred DNS when they do their DHCP negotiation with the ISP. Then,  
when you use DHCP to connect locally, they advertise themselves to  
you as the DNS, but all they really do is pass the request off to the  
ISP's DNS. The advantage of this method is that the router can cache  
requests for a short to return them very quickly, if they are asked  
for again.

My setup on the Linux machine doesn't use the ISP's DNS at all. It  
goes directly to the root servers to get the addresses and then  
caches like the router. You can see the advantage to this in what  
follows, when I ask my machine to look up W's address twice. It's 200  
times faster on the second round. (Look at the query times. My Linux  
machine is 192.168.0.5.)

Here's the first run.

[Lee-G4-2:/etc] leelarso% dig www.whitehouse.gov

; <<>> DiG 9.2.2 <<>> www.whitehouse.gov
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26264
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 0

;; QUESTION SECTION:
;www.whitehouse.gov.            IN      A

;; ANSWER SECTION:
www.whitehouse.gov.     7200    IN      CNAME    
www.whitehouse.gov.edgesuite.net.
www.whitehouse.gov.edgesuite.net. 300 IN CNAME  a1289.g.akamai.net.
a1289.g.akamai.net.     20      IN      A       63.211.236.232
a1289.g.akamai.net.     20      IN      A       63.211.236.238

;; AUTHORITY SECTION:
g.akamai.net.           823     IN      NS      n4g.akamai.net.
g.akamai.net.           823     IN      NS      n5g.akamai.net.
g.akamai.net.           823     IN      NS      n6g.akamai.net.
g.akamai.net.           823     IN      NS      n7g.akamai.net.
g.akamai.net.           823     IN      NS      n8g.akamai.net.
g.akamai.net.           823     IN      NS      n0g.akamai.net.
g.akamai.net.           823     IN      NS      n1g.akamai.net.
g.akamai.net.           823     IN      NS      n2g.akamai.net.
g.akamai.net.           823     IN      NS      n3g.akamai.net.

;; Query time: 859 msec
;; SERVER: 192.168.0.5#53(192.168.0.5)
;; WHEN: Sun Apr 30 22:57:17 2006
;; MSG SIZE  rcvd: 305

Here's the second run.

[Lee-G4-2:/etc] leelarso% dig www.whitehouse.gov

; <<>> DiG 9.2.2 <<>> www.whitehouse.gov
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24469
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 0

;; QUESTION SECTION:
;www.whitehouse.gov.            IN      A

;; ANSWER SECTION:
www.whitehouse.gov.     7195    IN      CNAME    
www.whitehouse.gov.edgesuite.net.
www.whitehouse.gov.edgesuite.net. 296 IN CNAME  a1289.g.akamai.net.
a1289.g.akamai.net.     16      IN      A       63.211.236.238
a1289.g.akamai.net.     16      IN      A       63.211.236.232

;; AUTHORITY SECTION:
g.akamai.net.           819     IN      NS      n3g.akamai.net.
g.akamai.net.           819     IN      NS      n4g.akamai.net.
g.akamai.net.           819     IN      NS      n5g.akamai.net.
g.akamai.net.           819     IN      NS      n6g.akamai.net.
g.akamai.net.           819     IN      NS      n7g.akamai.net.
g.akamai.net.           819     IN      NS      n8g.akamai.net.
g.akamai.net.           819     IN      NS      n0g.akamai.net.
g.akamai.net.           819     IN      NS      n1g.akamai.net.
g.akamai.net.           819     IN      NS      n2g.akamai.net.

;; Query time: 4 msec
;; SERVER: 192.168.0.5#53(192.168.0.5)
;; WHEN: Sun Apr 30 22:57:21 2006
;; MSG SIZE  rcvd: 305


> I wonder what the utility of having a caching server on my laptop  
> would be if things are kept on the router to start with. Of course,  
> if I set up a caching server on my laptop, this has the advantage  
> that it can find addresses that I found while working at school, I  
> suppose. Still --- why would the caching be an advantage over  
> defaulting to the router, except in this situation?

I don't think there's much advantage, unless you run a full DNS as I  
set up. Under Fedora Linux 5 it takes two lines to set it up. I'll  
Google the thing tomorrow morning to see if there's an easy way to do  
it on the Mac. It shouldn't be too much harder.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.math.louisville.edu/pipermail/macgroup/attachments/20060430/9e2f6a12/attachment.html
 

Reply via email to