Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to ping my linux machines by host name and the pings are failing (can ping by ip just fine).

I then logged into the router which is the DNS server and see that the router sees the linux machines as "new-host1" "new-host2"'s not getting their host names properly.

I can instead ping new-host1 successfully.

cat /etc/hostname

says the pc name is pc1

so why is the router seeing a diff name and how do i fix it? I rather not add the ip to the hosts file.

share|improve this question
up vote 3 down vote accepted

If you don't have a DNS server that is aware of the hostnames of the linux machines, then there is no way for the DNS server to resolve the hostname to IP address.

It looks like your DNS server on the router will accept hostname registrations, so you can do the following.

On each of the debian linux boxes, edit:


and add the line:

send host-name "hostname";

This will tell the DNS server the host name, and so it should add it to the local dns zone.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .