heathicus wrote:How does DNS work?
As wannabewoodworker said, it is a hierarchical system. As he also said, there are DNS servers all over the world, each with different areas of responsibility. I'll try to supplement his explanation.
The best analogy for DNS resolution is looking for a phone number in a phone book. When you call someone, you don't dial their name, you dial their phone number. Likewise, when your computer "dials" Shopsmith.net, it really dial's the IP address that web site is on. But first, it has to find what that IP address is, and that is domain name resolution.
We'll use Shopsmith.net as our example. Your computer was given the IP address of your ISP's DNS server through another protocol called DHCP (Dynamic Host Configuration Protocol - when you connect to your ISP, this is how your computer receives certain network configuration information like a unique IP address, the gateway (path out to the internet), and DNS servers).
So, you type in "
www.shopsmith.net" in your web browser and hit enter. Your computer looks in your configuration for the address of the DNS server. This is most likely at your ISP. It then contacts that server and asks it "where is
www.shopsmith.net?" That server answers and says, "I don't know. You should ask one of the root DNS servers. There are several of them, but we'll pick 192.112.36.4. Ask it." These root servers keep track of which DNS servers are responsible for the various top level domains (.net, .com, .org, .edu, etc).
So your computer contacts that server and asks it, "Where is
www.shopsmith.net?" That root server answers, "I don't know, but one of the servers for the .net domain is at 192.35.51.30. Go ask it."
So, your computer asks that server, "Hey, do you know where
www.shopsmith.net" is? It answers, "Well, I don't know, but according to the registrar (the company that the domain name was purchased/registered through), the DNS servers for shopsmith.net is at dns1.wrightfield.com (70.60.40.182) and internet.shopsmith.com (24.123.75.51). Go ask one of those."
So your computer asks dns1.wrightfield.com, "Ok, so do you know where
www.shopsmith.net is or are you going to keep giving me the runaround?" That server answers, "Chill dude, you've come to the right place. That web site is at 24.123.75.51. Have fun there."
So then, finally, your computer talks to 24.123.75.51 and loads the web site.
Now, sometimes one of those servers may not answer, so there is redundancy built in at every level. If dns1.wrightfield.com doesn't answer quickly enough, then your computer asks internet.shopsmith.net. But if that server doesn't answer, you're out of luck and you have to wait until one of them starts answering. The higher levels are more reliable.
Also, as wannabewoodworker said, this information is cached on your computer and at your IP's DNS server. That cache is kept for a limited amount of time before the lookup is performed again.
If you want to trace the DNS resolution and find out where any problems might be, you can use this web site:
http://www.simpledns.com/lookup-dg.aspx
(It's taken me 30 minutes to write this, with tired, whiny, crying kids climbing on me and demanding various services, and I have not done any proofreading so I hope this all made sense!)