What would we imagine the world with DNS to be like? Let’s imagine a situation where you want to order food from Dominos Pizza or McDonald’s or KFC. And you’re in a situation where you can only make a food order through an online company website. Like during a pandemic, the only option to shop is online. So to order food from dominos we have to go to their website. And every website has its own unique IP address and we can only that way to open a website we don’t have any name for them.
There are millions of websites on the internet and for humans, it is not technically possible to remember all website IP address numbers, it will be challenging for us to remember these long numbers. So here DNS plays a very important role. And in this article, we will understand the A-Z Of Domain Name System and all you need to know about DNS.
What Is IP Address?
IP Address or Internet Protocol Address is available in every machine or system which is connected to a network. Every system has there own unique identifying IP Address. An IP Address is basically a group of 4 bytes or 32 bits in which each number can be from a range of 0 to 255. So, the IP addressing range goes from 0.0.0.0 to 255.255.255.255. For example, a typical IP Address looks like: 173.194.216.106.
To identify a system or machine on the internet or a local network we use the IP Address of a system, not the MAC Address.
What Is MAC Address?
MAC address or Media Access Control address is a 12-digit hexadecimal number (6 byte or 48 bit). MAC addresses are usually written in one of the following formats: MM:MM:MM:SS:SS:SS or MM-MM-MM-SS-SS-SS.
The first half (MM:MM:MM or MM-MM-MM) of a MAC Address is the ID number of the adapter manufacturer. And the second halt or the last 6 (SS:SS:SS or SS-SS-SS) is the serial number assigned to the adapter (NIC) by its manufacturer.
For example, in the following MAC address, 00:B0:J7 : 32:D7:24. The prefix 00:B0:J7 indicates that the manufacturer is Intel Corporation. And the last three numbers 32:D7:24 are given by the manufacturer (Intel in this example) to this NIC.
What Is A Domain Name System (DNS)?
So whenever we have to communicate with a website over the internet, we can do so by using its IP Address. But as we know practically it is impossible for a person to remember the IP address of all the websites over the internet. So to overcome this problem a system was developed with the name Domain Name System in short DNS.
So this Domain Name System assigns names to web servers and maintains a database of these names and their corresponding IP Addresses. These names are called Domain Names.
Let’s understand it with an example. The IP Address of Google is 173.194.216.106. So to remember this number for all websites is not an easy task for that we have a domain name for this IP Address google.com. Domain names are used in URLs to identify particular web servers. For example, https://www.google.com/. The domain is google.com.
The Elements Of An URL
A URL usually has more than one part. So let us discuss that.
For Example:
URL: https://actualsimple.com/category/technology/
So the elements of an URL are:
Protocol: usually HTTP or HTTPS
Subdomain: usually www
Domain name: actualsimple.com
Path + internal page: category/technology/
GET parameters
So the format of an URL is always: protocol + subdomain + domain + path + filename.
The Elements Of A Domain Name
A Domain name has also more than one part in it. So now let us understand that.
A domain name consists of:
- Top Level Domain Name or Primary Domain Name.
- Sub-Domain Name(s).
Let’s understand it with an example: “informatics.nic.in” is a domain name. And here “.nic” is the primary domain name and “.in” is the sub-domain name of “.nic”.
There are only limited numbers of top-level domain names available to use. And they are also divided into two categories.
Top Level Domain
Generic Domain Names:
- ·com – commercial business
- ·edu – Educational institutions
- ·gov – Government agencies
- ·mil – Military
- ·net – Network organizations
- ·org – Organizations (nonprofit)
Country Specific Domain Names:
- .in – India
- .us – United States of America
- ·au – Australia
- ·ca – Canada
- .ch – China
- .nz – New Zealand
- .jp – Japan
- And so on for other countries.
ARPANET
Before DNS we have ARPANET. ARPANET is a flat database text file called “HOSTS”. At that time TXT was the solution for the name services. That file is hosted on a single machine and when we need a copy we need to use File Transfer Protocol (FTP). Or a similar protocol to receive it from a main central server.
- /etc/hosts
The host file is a descendent of the HOSTS.TXT file. The file can be found in /etc/hosts on Linux. It has a straightforward
Syntax: notepad c:\windows\system32\drivers\etc\hosts
Query/Record Types
The database records store different types of data. Using ALL query type will return all record types.
- A (Address Mapping Records): Return an IPv4 address in 32 bits.
- AAAA (IP Version 6 Address Records): Return an IPv6 address with a 128-bit length
- CNAME (Canonical Name Records): Return the alias to its original name.
- MX (Mail Exchanger Records): Return the message transfer agents (mail servers) for a domain.
- NS (Nameserver Records): Delegate a nameserver for the authoritative DNS zone.
- PTR (Reverse-Lookup Pointer Records): A canonical name is indicated by a pointer (IP address to name).
- SOA (Start of Authority Records)
Forward And Reverse DNS Queries
Forward DNS Queries
Forward DNS queries are the most commonly used to convert DNS names to IP Addresses and use the A or AAAA record types.
Reverse DNS Queries
Reverse DNS queries are used to convert an IP Address into a DNS name. It uses the PTR record or query type and arpa. domain in DNS Database.
- in-addr.arpa. domain for IPv4
- ip6.arpa. domain for IPv6.
You can support us on Stripe, BuyMeACofee, or Paypal.