6.6 Domain Name System (DNS)
In this part you will see how devices on a home network look up the IP address for domain names using the Domain Name System (DNS) servers.
Now watch the video below, which is about 3 minutes long.
The Domain Name System exists to convert between human-readable domain names, such as www.google.com or www.open.ac.uk, and the numeric IP addresses used in IP networking such as 188.8.131.52 or 184.108.40.206.
There are DNS servers in the internet to carry out these translations, and each device on a home network should be configured with the address of a DNS server. The gateway will relay the IP address of a DNS server from the ISP to devices on the network as part of DHCP configuration.
If a DNS server doesn’t know how to translate a particular domain name, then it will forward it to other DNS servers until an answer is returned; it will then save the answer in a cache in case it receives the same request again. A home gateway can act as a simple caching DNS server, passing new requests to the ISP’s more capable DNS server and caching the result.
Activity 5 Try it out
Open a command-line prompt on your computer.
Check using ipconfig /all that a DNS server is set up (use ifconfig -a on Mac or Linux).
Enter the following command to run a sample DNS look up:
What is the IP address returned?
Use this address to perform a reverse lookup, for example enter:
Does this always work?
Repeat the above with some other domain names and websites.
Are there any surprises?
Can you confirm which server is responding to your queries?
Your computer should be set up with the address of at least one DNS server; it may have a list of several alternatives. ipconfig /all should show these and each nslookup will state which server responded. Most replies will be flagged as ‘non-authoritative’ meaning that the server has replied with a cached value.
You might expect that if nslookup converts a server name into an IP address and you then ask for the reverse lookup, you would get back the original name. There are two possible surprises. First, you may get a message ‘Non-existent domain’. This is because the reverse lookups rely on network administrators creating special reverse records and these may not exist. Second, some DNS records involve aliases; for example www.megacorp.com may be an alias for the-real-server.megacorp.com.