However, while you'll be able to type things like ping
192.168.1.1, you won't be able to refer to your boxes by name. For
example, you won't be able to type ping mybox. To do this, you need to set up a file called /etc/hosts on
each of your Linux boxes. In this file, you specify an IP address, along
with the name (or names) that are associated with each IP address. So if
I had a network with three nodes, my /etc/hosts file might look something
like this:
127.0.0.1 localhost
192.168.1.1 mybox mybox.gentoo.org
192.168.1.2 testbox testbox.gentoo.org
192.168.1.3 mailbox mailbox.gentoo.org
Note that /etc/hosts contains an obligatory mapping of "localhost" to
the 127.0.0.1 IP address. I've also specified the hostnames of all the
systems on my LAN, including both their short name ("mybox") and their
fully-qualified name ("mybox.gentoo.org"). After copying this /etc/hosts
file to each of my systems, I'll now be able to refer to my systems by
name, rather than simply by IP address: ping mybox will now
work!