I populated /etc/hosts
with device names and IP addresses. For example:
chassisOne 10.0.0.1
chassisTwo 10.0.0.2
.
.
.
etcetera.
I am able to ping the IP address of both chassisOne
and chassisTwo
. Pinging the hostname returns:
ping: unknown host chassisOne
My nsswitch.conf file is:
host: files mdns4_minimal [NOTFOUND=return] dns
What am I missing?
From
man hosts
:Thus,
is wrong.
It should be
You're writing it in the wrong order, the
ip
is supposed to go before thedomain
.Try using this instead:
Then when you navigate to
facebook.com
orgoogle.com
on your browser, it'll display the following error:Good luck.