Google
 

Saturday, January 5, 2008

How Name Servers Work

How Name Servers Work
Because most people have trouble remembering the strings of numbers that make up IP addresses, and because IP addresses sometimes need to change, all servers on the Internet also have human-readable names, called domain names. For example, is a permanent, human-readable name. It is easier for most of us to remember than it is to remember 216.27.61.137.

The name stuff.dewsoftoverseas.com actually has 3 parts:

1. The host name ("www")
2. The domain name ("howstuffworks")
3. The top-level domain name ("com")

Domain names are managed by a company called Network Solutions. Network Solutions' primary job is to create the top-level domain names, and to guarantee that all names within a top-level domain are unique. Network Solutions also maintains contact information for each site and runs the "whois" database. The host name is created by the company hosting the domain. "www" is a very common host name, but many places now either omit it or replace it with a different host name that indicates a specific area of the site. For example, in encarta.msn.com, the domain name for Microsoft's Encarta encyclopedia, "encarta" is designated as the host name instead of "www."

The whois Command
On a UNIX machine, you can use the whois command to look up information about a domain name. You can do the same thing using the whois form at Network Solutions. If you type in a domain name, like "howstuffworks.com", it will return to you the registration information for that domain, including its IP address.
A set of servers called Domain Name Servers (DNS) maps the human-readable names to the IP addresses. These servers are simple databases that map names to IP addresses, and they are distributed all over the Internet. Most individual companies, ISPs and universities maintain small name servers to map host names to IP addresses. There are also central name servers that use data supplied by Network Solutions to map domain names to IP addresses.

If you type the URL http://stuff.dewsoftoverseas.com/web-server.htm into your browser, your browser extracts the name "stuff.dewsoftoverseas.com", passes it to a Domain Name Server, and the Domain Name Server returns the correct IP address for stuff.dewsoftoverseas.com. A number of name servers may be involved to get the right IP address. For example, in the case of stuff.dewsoftoverseas.com, the name server for the "com" top-level domain will know the IP address for the name server that knows host names, and a separate query to that name server, operated by HSW's ISP, may deliver the actual IP address for HSW's server machine.

On a UNIX machine you can access the same service using the nslookup command. Simply type a name like "stuff.dewsoftoverseas.com" into the command, and the command will query the name servers and deliver the corresponding IP address to you.

So here it is: The Internet is made up of millions of machines, each with a unique IP address. Many of these machines are server machines meaning that they provide services to other machines on the Internet. You have heard of many of these servers: e-mail servers, Web servers, FTP servers, Gopher servers and telnet servers, to name a few. All of these are provided by server machines.

No comments: