Management: How DNS Works
This is a very brief description of how DNS works and why it is used. There are books written on this subject so if you need to know more, please check O'Reilly for the relevant materials.
So, you want to resolve the IP address of coolbox.orh.dyndns.org , some hypothetical server of ours on our non-existent Worcester, MA network. How does your computer talk to ours? Well, that name really doesn't mean anything in and of itself; traffic on the Internet is routed using IP Addresses, which are sets of four numbers, each between 1 and 255, something like 216.7.11.130. DNS simply provides a mapping from coolbox.orh.dyndns.org -style names to 216.7.11.130 -style IP addresses. Pretty simple so far, right?
Well, now it starts getting more complex, though. You're sitting at your computer, and you try to access coolbox.orh.dyndns.org. What happens first? Well, your computer probably asks your ISP's nameserver, which was configured when you dialed in or got your DHCP lease. It will be doing the rest of the work for you, because it operates recursively.
So, how does your ISP's nameserver find the answer for you? We'll assume that it doesn't have any information cached — that is, stored from things it's already looked up in the past. Caching can short-circuit some of this process, but we want to go through the whole process to understand it better. At each stage of this process, your ISP's nameserver will be asking for information about coolbox.orh.dyndns.org. Unlike your first query, though, none of these servers will be recursive, so they'll only give a more limited set of information based on what they already know. First, the server will send a query to the root-servers. These are a group of very high-powered servers that know about all the Top Level Domains, such as com, net, org, and all the country domains. So, your ISP's server will ask one of them, say, e.root-servers.net (they're named a-m) what it knows about coolbox.orh.dyndns.org. It'll respond that it only knows one bit of information — org is served by a bunch of other nameservers, the GTLD-servers.
This is a referral ; the root server your ISP's server queried will give you the names and IP addresses of the GTL servers, including, for example, g.gtld-servers.net. Your ISP's server will then follow the delegation and ask one of those servers what it knows about coolbox.orh.dyndns.org. The answer will come back that this server knows a little bit more — dyndns.org is served by ns.dyndns.org and ns2.dyndns.org.
Your ISP's nameserver will continue diligently following the delegation, and ask ns.dyndns.org what it knows about coolbox.orh.dyndns.org. It doesn't quite know the answer yet, though — it responds that orh.dyndns.org is delegated to our Custom DNS service's servers, ns1.mydyndns.org and ns2.mydyndns.org.
So, in it's last step before giving you an answer, your ISP's nameserver will ask ns1.mydyndns.org what it knows about coolbox.orh.dyndns.org. Lo and behold, it gives you an actual IP address (or an authoritative "that host doesn't exist" answer), which your ISP's nameserver will then return to you, the client. You can then use that IP address to talk to our hypothetical server!
At each step of this process, your ISP's nameserver will be caching the answers it gets — when you ask it for someotherbox.orh.dyndns.org, it will be smart enough to go back to ns1.mydyndns.org, the server that it knows is authoritative for orh.dyndns.org hostnames. That information is cached for a length of time specified by the TTL of the DNS records, which is part of the information it got in reply to every query it was making earlier in the process.