|
Home | Search |
| Forums | Links | About | Contact |
|
Free Utilities
BeSecure Yahoo! Chat Help Computer Tutorials Emote Share In Depth / Articles -Chat Clients - Safe? -Chat Help Newbies -Buffer Overflows -VeriSign SiteFinder -How DNS works -Formation of a URL -Transparent Proxies -Internet Anonymity? -HTTPS / SSL -SharpExt - C# YahELite |
The Domain Name SystemIntroduction
In a previous example, I have used telephone numbers as an example. Here, I shall use it again. Domain NamesIt would be inappropriate to remember this website as "217.204.37.10". It's hard to remember, and you would forget it within minutes. That's why we use Domain Names, to name websites, helpbytes.co.uk for this site. The domain name is in three parts helpbytes .co .uk. The .uk is the TLD(Top Level Domain). The domain name is not a logical mapping between the IP address and the domain, it's the address of the server I came to host on. I can keep the domain, and change hosts(along with IP) as many times as I wish. At this point, I would say it's still possible to enter this site just using the IP address. Unfortunately, that is not the case. Look at Virtual Hosting at the end of my file. The Domain Name SystemSuch a setup requires a system. The DNS(Domain Name System) is the system that controls all this, and is the huge phonebook for the internet. Without the DNS, we would either all remember 217.204.37.10 or we wouldn't have the internet at all. The distributed Domain Name System and Redundancy
It would not be possible to have one computer, in an office in London, doing the Domain Name lookups for the whole of the internet. The load on this server would be incredible, and it's just impossible. The Domain Name System is distributed over many many servers on the internet. Root Level DNS Servers
These are at the top of the System. They must be able to handle millions of requests per day. There are 13 of these servers, labelled from A to M. There is just one server above these, where these get their updated information, but that does not matter to us. These servers are distributed accross the world. If one of them goes offline, the other 12 will share the new requests. TLD Name ServersThis is the next level, these servers hold information about a specific set of domains. One server will hold details about .com domains, another .net. There are many of these servers. These will most likely still not actually contain the IP address of the domain name being looked for. They will however, contain the data on which name server does hold the details for a given domain name. Host Name ServersThese are the name servers that most times actually hold the details which map the domain name, to an IP address. They will be maintained by the webhost for the domain name, or by yourself if you run your own DNS server. It will contain the IP address for the domain name given. It is possible for these to further contain other nameserver addresses, and the chain going further however. How is a lookup performedYou don't have to do this lookup yourself. The Operating System will be able to handle the lookup request. First, a request is sent from your computer, to your ISP's(Internet Service Provider) DNS server. Your ISP's DNS server is what now has to do all the work. In turn, it goes to each level as described above, asks for info, updates its information then asks the next, until it gets returned the IP.
The details & Image
The image below should help you to understand this concept. Long processThe process is quite long, but takes very little to perform, there is not much involved at each process. These servers are fast, speed of light compared to our dial up machines. But there are 100000000s of these processes a day, all taking resources on these computers. Most times it is asking for the same information. For example, if someone next on your ISP asks for www.google.co.uk the first thing the ISP DNS server would do is ask the root servers how to handle .uk, but it just did that. This is where the caching process comes in. Saving Resources: Caching
When the ISP actually asks the root server for the server handling .uk domain names, the root server will return the address, and an amount of time the server can cache the address for. What this means, is that the server can make a note that any lookup for .uk domain should go to a certain nameserver, and not to bother the rootserver, until this time expires. This time is called TTL(Time To Live). Multiple ServersBecause of the chances of a server going offline, multiple servers, probably at least 2, would be provided at each stage to the server with the query. This allows numerous to be tried if one of them does not or cannot respond. Virtual HostingOne website per IP addres per Server would mean a lot of servers and a lot of IP addresses. But to get around this, and to offer cheaper hosting, such a thing as Virtual Hosting exists. This is where a server may have 100s of people hosting on it. Because they are all known by the same IP address, it's not possible to access this site simply by typing the IP. Your browser, or other software, sends a HOST: header, which contains the domain name, so that the server can map the domain to the website. |