Hostname Resolution
Hosts are generally known by "ordinary" names such as gauss or strange.
It is the application's duty to find the IP-address corresponding to this name. This process is called host name resolution.
DNS
DNS organizes host names in a hierarchy of domains.
Domain:
Domain is a collection of sites that are related in some sense:
Because they form a proper network (e.g. all machines on a campus).
Because they all belong to a certain organization (like the U.S. government).
FQDN:
A fully qualified domain name, or FQDN, uniquely identifies a host world-wide:
Top-level domains:
These are a couple of top-level domains you may see frequently:
edu (Mostly US) educational institutions like universities, etc.
com Commercial organizations, companies.
org Non-commercial organizations.
net Gateways and other administrative host on a network.
mil US military institutions.
gov US government institutions.
Outside the US, each country generally uses a top-level domain of its own named after the two-letter country code defined in ISO-3166.
Note:
National domains do not imply that a host below that domain is actually located in that country; it only signals that the host has been registered with that country's NIC.
Advantages:
It solves the problem of name uniqueness; with DNS, a host name has to be unique only within its domain to give it a name different from all other hosts world-wide.
Name Lookups with DNS
An DNS query:
When an application wants to look up information on erdos.maths.groucho.edu, it contacts a local DNS.
Types of DNSs:
Authoritative Servers:
Name servers that hold all information on hosts within a zone are called authoritative for this zone. There are at least two:
One primary server, that loads its zone information from data files.
Secondary servers, that transfer the zone data from the primary server at regular intervals.
Caching-only Servers:
A name server that is not authoritative for any domain. This type of server conducts DNS queries for applications and caches the information.
The DNS Database
Resource Record:
A single piece of information from the DNS database is called a resource record, or RR.
Each record has:
A class specifying the type of network it applies to:
Database file:
...
; Name servers
IN NS neils
IN NS gauss.groucho.edu.
gauss.groucho.edu. IN A 149.76.4.23
;
; Theoretical Physics (subnet 12)
niels IN A 149.76.12.1
IN A 149.76.1.12
nameserver IN CNAME niels
otto IN A 149.76.12.2
quark IN A 149.76.12.4
strange IN A 149.76.12.6
...
; Collider Lab. (subnet 14)
boson IN A 149.76.14.1
muon IN A 149.76.14.7
bogon IN A 149.76.14.12
...