Try dig.

I haven't used it much, admittedly (so someone correct me if I'm wrong) but
it will give you TTL (time-to-live) stats on DNS queries.

This showed my local cache (I think):

[EMAIL PROTECTED]:~$ dig google.com

; <<>> DiG 9.3.1 <<>> google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41396
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             65      IN      A       64.233.187.99
google.com.             65      IN      A       64.233.167.99
google.com.             65      IN      A       72.14.207.99

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Feb  1 15:05:29 2006
;; MSG SIZE  rcvd: 76


Then I tried this to see a name-server cache:

[EMAIL PROTECTED]:~$ dig @128.223.32.35 google.com

; <<>> DiG 9.3.1 <<>> @128.223.32.35 google.com
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23581
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             44      IN      A       72.14.207.99
google.com.             44      IN      A       64.233.167.99
google.com.             44      IN      A       64.233.187.99

;; AUTHORITY SECTION:
google.com.             345497  IN      NS      ns1.google.com.
google.com.             345497  IN      NS      ns2.google.com.
google.com.             345497  IN      NS      ns3.google.com.
google.com.             345497  IN      NS      ns4.google.com.

;; ADDITIONAL SECTION:
ns1.google.com.         338454  IN      A       216.239.32.10
ns2.google.com.         338454  IN      A       216.239.34.10
ns3.google.com.         338454  IN      A       216.239.36.10
ns4.google.com.         338454  IN      A       216.239.38.10

;; Query time: 21 msec
;; SERVER: 128.223.32.35#53(128.223.32.35)
;; WHEN: Wed Feb  1 15:05:51 2006
;; MSG SIZE  rcvd: 212


If it can't find it, the TTL section will be blank:

[EMAIL PROTECTED]:~$ dig @128.223.32.35 noexistano.google.com

; <<>> DiG 9.3.1 <<>> @128.223.32.35 noexistano.google.com
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39264
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;noexistano.google.com.         IN      A

;; AUTHORITY SECTION:
google.com.             60      IN      SOA     ns1.google.com.
dns-admin.google.com. 2006013005 7200 1800 1038800 60

;; Query time: 26 msec
;; SERVER: 128.223.32.35#53(128.223.32.35)
;; WHEN: Wed Feb  1 15:07:06 2006
;; MSG SIZE  rcvd: 89





Jason LaPier
Network Manager
TACS / WRRC
University of Oregon
# Captain's Log: http://jubunt.uoregon.edu  

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Darren Hayes
> Sent: Wednesday, February 01, 2006 2:42 PM
> To: Eugene Unix and Gnu/Linux User Group
> Subject: [Eug-lug] Is it DNS Caching?
> 
> I have a website running on a vhost account (Apache 1.3.24/PHP4.4.1)
> 
> I can get to http://www.domainname.com/index.html just fine I 
> can  get to http://domainname.com/index.html just fine.
> I can get to http://domainname.com/subdir/index.php just fine.
> 
> I can get to http://www.domainname.com/blah.php just fine.
> 
> But I observe the following 404 error when accessing 
> http://domainname.com/blah.php (note no "www" prefix)
> 
>   Not Found
>   The requested URL /blah.php was not found on this server.
>   Additionally, a 404 Not Found error was encountered while trying
>      to use an ErrorDocument to handle the request.
> 
> NOTE: blah.php is a brand new file copied to the webroot by 
> the system admin this morning.
> 
> I observe same issue on two different PC's. I've 
> reinitialized and rebooted everything in my neighborhood 
> (PC's, router, cable modem). I have flushed my DNS cache on 
> both PC and router. I have even flushed my toilet.
> 
> System admin states he can get to 
> http://domainname.com/blah.php and states my issue is 99.9% 
> likely a DNS caching error and I should contact my ISP 
> (Comcast). Usually the guy is spot on, but this time I don't know.
> 
> Any thoughts?
> 
> Darren
> 
> 
> 
> 
> 
> _______________________________________________
> EUGLUG mailing list
> [email protected]
> http://www.euglug.org/mailman/listinfo/euglug
> 

_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to