Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Lectures_SSD2_Yermakova / Lectures_SSD2 Yermakova.doc
Скачиваний:
226
Добавлен:
25.02.2016
Размер:
3.16 Mб
Скачать

5.5.2 Domain Name Service

  • Naming

  • Domain Name Service

Naming

Local area networking software such as Novell Netware or Microsoft Network allows every machine on a LAN to be assigned a symbolic name, typically a single word. This is for the convenience of human users; it is much easier to remember a word like GANDALF or BLUEBERRY than a 48-bit Ethernet address. Printers are also assigned names in this fashion. Since the names are valid only within the LAN, there is no need to worry about naming conflicts. The administrator of the LAN sees to it that names remain unique.

Because the Internet operates on a global scale (and there are even plans to accommodate off-planet hosts!), naming is a more complicated business. Internet names follow a hierarchical scheme, with the components separated by dots, for example, www.icarnegie.com. The first component is the host name; by convention, many organizations use the host name www for their "front door" Web servers. The remaining components constitute a domain. People also sometimes refer to the entire name as a domain name.

Domain names may include additional levels of structure. For example, cmu.edu is the top-level domain for Carnegie Mellon University, cs.cmu.edu is the domain for the Computer Science Department, and fac.cs.cmu.edu is the domain for the facilities maintenance group within the department. Notice that domain name components are ordered with the most specific level first and the most general (or "highest") level last.

The top level of the domain hierarchy contains two kinds of symbols: 1) two-letter codes for countries, such as uk for the United Kingdom or jp for Japan, and 2) "generic" codes for various types of organizations, such as com for companies, edu for colleges and universities, and gov for US government agencies.

The special status given to the US in the naming scheme is an artifact of the history of the Internet, which was created by the US government. The list of top-level domains and country codes is now maintained by GNSO, the Generic Names Supporting Organization (http://gnso.icann.org/), a division of the international body known as ICANN (www.icann.org), the Internet Corporation for Assigned Names and Numbers.

Domain Name Service

There are several million hosts on the Internet. Keeping all of their names and IP addresses in one big file is obviously impractical. Not only would the file be a nightmare to maintain, but also some service providers assign IP addresses to dialup networking clients dynamically, so the associations between names and IP addresses can change from one minute to the next! The solution is to use the network itself to look up names, via a mechanism called DNS, for Domain Name System (or Service).

In order for a computer to look up domain names, it must know the IP address of at least one DNS server. This information is entered into a configuration file when Internet service is first set up on the machine.

Here is how DNS service works. Suppose a Web browser tries to look up the host www.cs.cmu.edu. It asks its local DNS server for the IP address. If the DNS server knows the address, it sends it back immediately. If not, then it asks another DNS server to help it find the address. There are DNS servers for every level of the domain hierarchy, and every DNS server knows the IP addresses of servers for the top-level domains. So, to look up www.cs.cmu.edu, the first step is to ask the DNS server for the edu domain for the IP address of the DNS server for the cmu.edu domain, if we do not already know it. Then we ask that DNS server for the IP address of the DNS server for the cs.cmu.edu domain. Finally, we ask that DNS server for the IP address of the host we are trying to contact. Although this sounds like a complicated process, DNS lookups are usually very fast because servers cache the results of previous queries, so they rarely have to ask other servers for help. If you pick an obscure host name half way around the world, though, you may encounter a short delay during the initial lookup of that host.