ping: cannot resolve HOSTNAME: Unknown host
Here is my setup:
- HOSTNAME is a machine running Debian 6.0.5 Squeeze with HOSTNAME as its hostname.
- WINDOWS is the hostname of the Debian machine when Windows 7 is running
- Windows 7 was installed & used prior to Debian
- MAC is the machine that I am trying to ping HOSTNAME from
- Both computers are connected to a Buffalo AirStation WHR-HP-G300N running its default firmware, DD-WRT. All computers use DHCP to get an IP address.
The Quick Fix
The Slightly Less Quick, But Preferred Fix
By default, Debian does not send its hostname when getting an IP address with DHCP. Edit '/etc/dhcp/dhclient.conf' and replace this line:
#send host-name "andare.fugure.com";
With this line:
send host-name "HOSTNAME";
I restarted MAC and HOSTNAME and was successfully able to
ping HOSTNAME
.