Learning Unix Socket
Socket Quick Guide
Socket Useful Resources
© 2013 TutorialsPoint.COM
Network Host Names
This is very difficult to remember many Host Names in terms of numbers. So these host names are generally known by "ordinary" names such as takshila or nalanda. We write software application's to find out the dotted IP address corresponding to a given name.
The process of finding out dotted IP address based on the given alphanumeric host name is known as hostname resolution.
A hostname resolution is done by special softwares residing on a high capacity systems. These system are called Domain Name Systems (DNS) which keeps mapping of IP addresses and corresponding ordinary names.
The /etc/hosts File:
The correspondence between host names and IP addresses is maintained in a file called hosts. On most of the systems this file is found in /etc directory.
Entries in this file look like the following:
# This represents a comments in /etc/hosts file.
184.108.40.206 nalanda metro
220.127.116.11 mainserver centeral
Note that more than one name may be associated with a given IP address. This file is used when converting from IP address to host name and vice versa.
You would not have access to edit this file, so if you want to put any host name alongwith IP address then you would need to have root permission.