Network Integration  «Prev  Next»
Lesson 5IP addresses in the Host Table
ObjectiveUse the Host Table to look up network IP addresses and hostnames.

IP addresses in the Host Table using Linux Network Integration

Hostnames are very convenient when you need to identify networked computers. They convey more meaning for most people than IP addresses because they are easier to remember.
The opposite is true from Linux's point of view: IP addresses are orderly and regular, while hostnames are seemingly random.
Linux overcomes this "randomness" by converting hostnames you supply into IP addresses. The first source checked is the /etc/hosts file, which holds number and name pairs. For this reason, /etc/hosts is referred to as the Host Table[1].

/etc/hosts file

The MouseOver below shows a typical /etc/hosts file. The left column shows an IP address and the right column the corresponding hostname. Roll your mouse over each line of the Host Table to see an explanation of each number and name pair.
etc hosts example

Example etc-hosts
It is impractical to list every computer you will ever want to contact in one file. For example, imagine an office with 100 Linux computers. If the /etc/hosts file was the only name to number mapping, then when a new host was added, all 100 computers would need to be updated.
This would become an unwieldy task, so you need a way to more easily distribute name to number mappings. This is where the Domain Name System (DNS )[1] steps in.
In the next lesson, you will learn how to configure your network interface to use DNS.
[1]Host Table: A database of remote, network connected hosts maintained by each host on the network
[2]DNS: The Domain Name Server protocol. It replaces the Host Table as the primary means of resolving hostnames into IP addresses on large networks.