Skip to main content

DNS - A simple explanation.

Hi All,

Let me try to throw some pebbles regarding the DNS, one of the simplest concepts on the internet, but if explained properly, it can go into a high level of complexity.

DNS is something which is used to identify the devices which are connected to the internet.Before jumping into the concept of DNS, I hope everyone who is reading this chapter is aware of IP Adress.

If not, IP Address or in short IP is a set of numbers and symbols used to identify machines connected on the internet.

So we already have IP so you might be thinking what is the need of DNS in the world??

Well, that is the problem with the humans, we are good with names but not so good with the numbers. To overcome this problem, we are using DNS.

Domain Name System in the point of view of a System Administrator is something unavoidable when it comes to hosting the websites on the server. The simple concept of how it works is explained in my propensity as shown below.

When a website is accessed on a web browser, the "hosts" entry of the machine from which he accesses the website is checked at first by the user.

Whatever the OS that the users use, whether it is Mac, Windows, Linux, Android, IOS all of them have the hosts file which is a plain text file which contains both the hostname and their corresponding IP address.

After entering the website name on the web browser, it checks for the local workstation hosts file. If there an entry for the website in the hosts file, then the browser will go to the IP specified in that hosts file.

If there is no entry, then the web browser will go forward to the DNS server of the ISP . It will store the domains that are frequently requested by the users under that ISP.

If the domain requested by the browser is not on the DNS server, then the query will go forward to the TLD server.

The TLD simply refers to the last part of the domain name, ie. “.com”, “.net”, “.org”, “.ie”. This is managed by the IANA or ICANN. Whenever a new domain is registered, the details are stored in each of the corresponding TLD.

So if a domain is not specified in the local machine hosts file and in the ISP DNS servers, then the browser will go to the corresponding TLD servers, based on whether it is “.com”, “.net”, “.us“ and will check if the domain name is available on their servers.

All the domains that are registered on the internet are available in TLD servers and from them, the browser will be able to get the NameServers that are registered for the website.

Once a browser got hold of the Nameserver in which a domain is hosted, the browser will go to that server, and at there it will contain the information indicating the server IP in which the domain sits.

When the browser reaches that server and request to show the contents of the domain, the web server
in that remote server will process that request and will show the contents of the domain which you will see on your local end device.


Popular posts from this blog

Qmail cheat sheet

1) To check the mail queue in plesk from command line, you can use the command :


2) You can examine the queue with qmail-qread.


3) From the qread command you get the message id . In the above example , let us assume one of the id is 524514 . Now you can find the file holding the email in/var/qmail/queue with find command.

# find /var/qmail/queue -iname 524514


/var/qmail/queue/mess/22/524514 (mail headers)


4) From the mail header you get the IP address

vi /var/qmail/queue/mess/22/524514


Shortcut for the cool guys

find /var/qmail/queue -iname queu_id | grep mess | xargs less


4) If you wish …

Logical volume vmxxxx_img is used by another device - Error on LVM removal

Hi Folks,

I've faced error while trying to remove an LVM from the server.

The exact LVM error will be "Logical volume vmxxxx_img is used by another device" on executing the lvremove command.

Feel free to remove the following steps to remove the LVM from the server.

Note: Please remember to replace <id> with your VMID in the below section.

dmsetup ls dmsetup info -c xen-vm<id>_img dmsetup remove xen-vm<id>_img lvremove -f /dev/xen/vm<id>_img ----------------------------------------------------------

Cheat sheet for Hardware RAID health check - Megaraid, Adaptec, 3wareraid and HPraid.

Hi Folks,

In another post "raid type" I've mentioned how to find if the server is running with Software or Hardware RAID.

Here, we can go ahead and check the health of the Hardware RAID array in the server.

The first thing we need to detect is the controller in which the raid is configured and you can easily get it from the another post that I mentioned earlier. However, I'm providing it here again for your convenience.

1. Login to the server as the root user.
2. Execute the following command.

/sbin/lspci -vv | grep -i raid

3. This will show the raid controller running on the server. The different types of controller I've worked with includes

a. Megaraid which uses megacli
b. Adaptec which uses arcconf.
c. 3ware raid which uses tw_cli
d. HPraid which uses hpacucli.

How to check the Megaraid array health status?

The Megaraid is usually installed in the /opt/MegaRAID and you can execute the following command to verify the health of the array.