1

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" etc...it'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.

1 Answer 1

3

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:

/etc/dhcp/dhclient.conf

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.

You must log in to answer this question.

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