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

http://supportlobby.com/blog/category/technical/qmail-technical/

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

 /var/qmail/bin/qmail-qstat
========================

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

/var/qmail/bin/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/remote/22/524514

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

/var/qmail/queue/info/22/524514

4) From the mail header you get the IP address

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


Or

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 ----------------------------------------------------------

Open VZ cheat Sheet

VZCTL COMMANDS
---------------------

vzctl set 101 --diskspace 1000000:1100000 --save  To set diskspace for container with ID 101

vzctl set 101 --diskinodes 90000:91000 --save     To set inodes for container with ID 101

vzctl set 101 --quotatime 600 --save              To set quotatime for container with ID 101 (The time limit by

                                                       which container is allowed to temporarily exceed  its quota soft limits)

vzctl exec 101 df                                  To execute command df at the server with the CTID 101

vzctl set 101 --quotaugidlimit 100 --save          Set number of user/group id's allowed for internal disk
                                                                     quota,if 0 UID/GUID quota will not be allowed\

 vzctl set 0 --dcachesize 5G --save        Set dcachesize of the hardware node

sysctl fs.fsync-enable=0     or  echo 0 > /proc/sys/fs/fsync-enable        disable fsync calls inside containers .

Add the  …