How to verify your DNS setting and its TTL
If you were unable to access this site since last weekend, please be patience. I have just moved howforge.com to the new server located at other ISP which offers higher international bandwidth because most visitors are outside Thailand. In fact, I don't like to move around too often since it might take long time for DNS to completely propagate to all ISPs around the world. That's why I post this topic. I would like to verify that my settings are correct and how long it takes to update.
The first thing you should know is how DNS works. According your domain name, you will have 4 related components.
- Primary name server
- Secondary name server
- Parent name server
- DNS roots
Commonly, you will have right to modify everything regarding your domains at the primary and secondary name servers. In addition, you have to add the primary and secondary name servers to the parent name server at the DNS registrar service. All hosts will be assigned name servers by their ISPs. Whenever you want to resolve a domain name to numeric IP address, the ISP's name server will be queried given the domain name. There are 3 possible cases here.
- If the name server doesn't know about that domain name, it will forward the query to a DNS root. The DNS root then tries to find your primary name server by forwarding to lower level name server based on the generic top-level domain, e.g.,
.com
. Eventually, the ISP's name server will get the response including the IP address. The ISP's name server will save the pair of domain name and its IP address in its cache with a number called time to live aka TTL in seconds. The IP address will be responded to you as well. - If the name server finds the domain name in its cache and TTL is greater than zero, it will response the request by the cached IP address.
- If the name server finds the domain name in its cache but TTL is equal or less than zero, it will act like in the first case.
In particular, TTL is used for determining expiration time. DNS caching helps us to resolve domain names at fast speed; however, it might cause some problem when the IP address is changed. So the point is how to determine TTL of given domain name on such a domain name server. The tool I used is dig. For example, I would like to check howforge.com at 203.144.207.29.
$ dig @203.144.207.29 howforge.com ; <<>> DiG 9.3.4 <<>> @203.144.207.29 howforge.com ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36210 ;; flags: qr rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;howforge.com. IN A ;; ANSWER SECTION: howforge.com. 3550 IN CNAME howforge.com. howforge.com. 3550 IN A 202.151.177.135 ;; Query time: 16 msec ;; SERVER: 203.144.207.29#53(203.144.207.29) ;; WHEN: Wed Apr 25 21:48:32 2007 ;; MSG SIZE rcvd: 76
That means this name server still has the old IP address and it would be updated in about an hour (3550 seconds). For OpenDNS, it would be updated in about a day (86822 seconds).
$ dig @208.67.220.220 howforge.com ; <<>> DiG 9.3.4 <<>> @208.67.220.220 howforge.com ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14362 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;howforge.com. IN A ;; ANSWER SECTION: howforge.com. 83822 IN CNAME howforge.com. howforge.com. 83822 IN A 202.151.177.135 ;; Query time: 237 msec ;; SERVER: 208.67.220.220#53(208.67.220.220) ;; WHEN: Wed Apr 25 22:05:13 2007 ;; MSG SIZE rcvd: 64
- sugree's blog
- 1829 reads
You can clear OpenDNS's cache anytime
wonderful!
Post new comment