Host table on Linux server

In the beginning, the host table was the only tool to map the host name to IP address. All Linux systems still have a host table, which is located at “/etc/hosts” file. The host table contains the IP addresses and host names. Below is the sample example of the hosts file:

WHMCS Complete Billing and Support

$ cat /etc/hosts

# Table of IP addresses and host names

127.0.0.1 localhost
165.2.3.5 myserver

All the lines in the host table have same format. Lines begin with the IP address and it followed by a list of names that map to that IP address. Using above host table when a user specifies myserver; the system will return the IP address 165.2.3.5.

Uses of Host table:

The host table has limited role but it is important that your server should have a host table. The host table is used when the DNS is not available for your server. The basic role of the host table is to convert the IP address to host name and vice versa. Hence, it is also used for the reverse DNS (convert IP address to host name). Now a day, most of the systems that have access to the internet rely on DNS for name to address and address to name resolution. But if you have a small network and it does not connect to internet then the host table might be enough for all your needs.

Limitation of Host table:

The host table is a simple text file and you can edit it easily but it is not very easy to search. The file search sequentially for ever host to address and address to host mapping. If the host table size is small then there is no problem but if the size is big then it is not reliable to use host table.

Kailash Aghera

Posted in Web Hosting and tagged , , .

Leave a Reply

Your email address will not be published. Required fields are marked *