Domain Names

IP addresses are difficult for humans to remember, they're great for PCs! Domain names were invented to make it easier to navigate the Internet. A domain name is a vaguely descriptive name separated by dots. For example: www.linuxhq.org

Every machine that runs TCP/IP has a text file called hosts. It is a simple lookup table that the network stack (IP) checks to see if it has a match between a domain name and an IP address. It is easily modified with a text editor and the contents look like the following:

	127.0.0.1		localhost
	142.110.237.1	e237-firewall.tech.el.sait.ab.ca
	142.110.237.2	e237-bridge.tech.el.sait.ab.ca
	142.110.237.3	ashley.tech.el.sait.ab.ca
	142.110.237.4	mariah mariah.tech.el.sait.ab.ca

The IP address is listed on the left and the domain name is listed on the right. The actual registered domain name is sait.ab.ca (Southern Alberta Institute of Technology). The domain name el.sait.ab.ca (electronics dept.) is a subnet of sait.ab.ca. The domain name tech.el.sait.ab.ca (technical) is a subnet of el.sait.ab.ca.

The machine names are e237-firewall, e237-bridge, ashley and mariah. Mariah's entry is unique in that both the domain name mariah and mariah.tech.el.sait.ab.ca would be recognized by the IP stack as 142.110.237.4.

The problem with the hosts file is that each machine must have a current up to date copy of the network. For a small network (25 or less) not connected to the Internet this is not a problem to manage. If the network is larger, than problems can occur trying to keep everyone updated.

Another solution is Unix's Network Information Service (NIS) (formerly called Yellow Pages until there was a copyright conflict with the Telcos). A central NIS server shares a master hosts file to all the clients. In this way, only one file exists and is updated. This works well for a network not connected to the Internet.

If you are connected to the Internet then a Domain Name Server (DNS) is used. A DNS is a special server that communicates with other servers and keeps an up-to-date look-up table that matches IP addresses to domain names for the complete Internet. It is a hierarchical system where each DNS is authorative for the domain underneath it. This means that each server knows the domain name to IP address mapping of the network underneath it.

Domain Name Structure

Domain names tend to follow a loose structure that gives a description of the network. For example, sait.ab.ca uses the Canada extension .ca, preceded by the province of Alberta extension ab and then the abbreviation SAIT for the Southern Alberta Institute of Technology. This is a geographical designed domain name that follows the ISO-3166 country code structure as listed in ISO 3166 Country Codes. Example of country codes are:

	br	Brazil			ca	Canada
	fi	Finland			gb	United Kingdom
	na 	Nambia			nz	New Zealand
	tw	Taiwan			us	United States

There are top level domain (TLD) names extensions that attempt to describe the purpose of the domain. It is broken down into seven basic categories:

	com	- Commercial domains that are a business.
	edu	- Educational institutes
	net	- This is for computers of network providers such as Internet Service Providers
	org	- Standard organizations or non profit organizations
	int	- Organizations that have been established by international treaties.
	gov	- Municipal, federal, provincial, state governments.
	mil	- United States military

All in all, it is often quite difficult to establish where a domain is physically located or what it actually does from the domain name. But it makes remembering locations easier than attempting to remembering an IP address.

Domain Name Look-up Procedure

When a domain name is used, the IP stack doesn't understand domain names. It says "what is this? Is not an IP address!". The only thing the IP stack understands is IP addresses. The look-up order is as follows:

  1. The IP stack checks the hosts file to see if there is a domain name match to IP address. If there is, the IP address is used.
  2. If there is no match, the IP stack will look for a NIS server with its host file shared. If this service is not installed, the IP stack will jump to the next step.
  3. If there is still no match, the IP stack will send out a request to the domain name server configured during the network configuration to see if it knows whose IP address belongs to the domain name.
  4. If the domain name server doesn't know, it may make an enquiry to the next level up domain name server to see if it knows whose IP address belongs to the domain name and so on.

On the Internet, there are 13 top level root domain name servers. The current addresses and domain names are found at ftp://internic.net/domain/named.cache (also called named.ca and named.root)

	Domain Name		IP Address	Description
	A.ROOT-SERVERS.NET	198.41.0.4	formerly NS.INTERNIC.NET
	B.ROOT-SERVERS.NET	128.9.0.107	formerly NS1.ISI.EDU
	C.ROOT-SERVERS.NET	192.33.4.12	formerly C.PSI.NET
	D.ROOT-SERVERS.NET	128.8.10.90	formerly TERP.UMD.EDU
	E.ROOT-SERVERS.NET	192.203.230.10	formerly NS.NASA.GOV
	F.ROOT-SERVERS.NET	192.5.5.241	formerly NS.ISC.ORG
	G.ROOT-SERVERS.NET	192.112.36.4	formerly NS.NIC.DDN.MIL
	H.ROOT-SERVERS.NET	128.63.2.53	formerly AOS.ARL.ARMY.MIL
	I.ROOT-SERVERS.NET	192.36.148.17	formerly NIC.NORDU.NET
	J.ROOT-SERVERS.NET	198.41.0.10	temporarily housed at NSI (InterNIC)
	K.ROOT-SERVERS.NET	193.0.14.129	housed in LINX, operated by RIPE NCC
	L.ROOT-SERVERS.NET	198.32.64.12	temporarily housed at ISI (IANA)
	M.ROOT-SERVERS.NET	202.12.27.33	housed in Japan, operated by WIDE

These are controlled by InterNIC which is the primary agency responsible for registering domain names. At the time of this writing, there are several new agencies that are taking over the domain registration process for different parts of the world.

If this page has helped you, please consider donating $1.00 to support the cost of hosting this site, thanks.

Return to

TelecomWorld 101

Copyright July 2013 Eugene Blanchard