jump to navigation

DNS August 10, 2005

Posted by Coolguy in Networks.
trackback
  • Domain name servers, or DNS, are an incredibly important but completely hidden part of the Internet
  • Domain name servers translate domain names to IP addresses

Complications:

  • There are billions of IP addresses currently in use, and most machines have a human-readable name as well.
  • There are many billions of DNS requests made every day. A single person can easily make a hundred or more DNS requests a day, and there are hundreds of millions of people and machines using the Internet daily
  • Domain names and IP addresses change daily
  • New domain names get created daily.
  • Millions of people do the work to change and add domain names and IP addresses every day

Distributed System

  • DNS system is a distributed database
  • Every domain has a domain name server somewhere that handles its requests, and there is a person maintaining the records in that DNS.
  • Name servers do two things all day long:
  • They accept requests from programs to convert domain names into IP addresses
  • They accept requests from other name servers to convert domain names into IP addresses
  • When a request comes in, the name server can do one of four things with it:

    • It can answer the request with an IP address because it already knows the IP address for the domain.
    • It can contact another name server and try to find the IP address for the name requested. It may have to do this multiple times.
    • It can say, “I don’t know the IP address for the domain you requested, but here’s the IP address for a name server that knows more than I do.”
    • It can return an error message because the requested domain name is invalid or does not exist.
  • When you type a URL into your browser, the browser’s first step is to convert the domain name and host name into an IP address so that the browser can go request a Web page from the machine at that IP address
  • To do this conversion, the browser has a conversation with a name server.
  • When you set up your machine on the Internet, you tell your machine what name server it should use for converting domain names to IP addresses
  • WINIPCFG.EXE, IPCONFIG, nslookup are used to view current name server
  • The name server may already know the IP address
  • That would be the case if another request to resolve the same name came in recently
  • In that case, the name server can return the IP address immediately
  • If not, a name server would start its search for an IP address by contacting one of the root name servers.
  • The root servers know the IP address for all of the name servers that handle the top-level domains
  • Your name server would ask the root for www.xyz.com, and the root would say (assuming no caching), “I don’t know the IP address for www.xyz.com, but here’s the IP address for the COM name server.”
  • These root servers are vital to this whole process, so:
    There are many of them scattered all over the planet.
    Every name server has a list of all of the known root servers. It contacts the first root server in the list, and if that doesn’t work it contacts the next one in the list, and so on
  • The root server knows the IP addresses of the name servers handling the several hundred top-level domains
  • It returns to your name server the IP address for a name server for the COM domain
  • Your name server then sends a query to the COM name server asking it if it knows the IP address for www.xyz.com
  • The name server for the COM domain knows the IP addresses for the name servers handling the domain, so it returns those.
  • Your name server then contacts the name server for http://www.xyz.com/ and asks if it knows the IP address for www.xyz.com.
  • It does, so it returns the IP address to your name server, which returns it to the browser, which can then contact the server for http://www.xyz.com/ to get a Web page
  • There are multiple name servers at every level, so if one fails, there are others to handle the requests
  • Once a name server resolves a request, it caches all of the IP addresses it receives. Once it has made a request to a root server for any COM domain, it knows the IP address for a name server handling the COM domain, so it doesn’t have to bug the root servers again for that information. Name servers can do this for every request, and this caching helps to keep things from bogging down.
  • Name servers do not cache forever, though. The caching has a component, called the Time To Live (TTL), that controls how long a server will cache a piece of information. When the server receives an IP address, it receives the TTL with it. The name server will cache the IP address for that period of time (ranging from minutes to days) and then discard it. The TTL allows changes in name servers to propagate.
  • Not all name servers respect the TTL they receive, however. When HowStuffWorks moved its machines over to new servers, it took three weeks for the transition to propagate throughout the Web.
  • All name servers run software called BIND

BIND

  • BIND (Berkeley Internet Name Domain) is an implementation of the Domain Name System (DNS)
  • It provides components for
  • Domain Name System server (named)
  • Domain Name System resolver library
  • tools for verifying the proper operation of the DNS server
  • The BIND DNS Server is used on the vast majority of name serving machines on the Internet
Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: