On Sat, Nov 21, 2009 at 1:02 AM, Suraj Kurapati <sunaku@gmail.com> wrote:
Hello,
For the longest time, the default ArchLinux networking setup had one deficiency: it would not send the machine hostname to the DHCP server / router when acquiring a DHCP lease. As a result, I was never able to ping/ssh my ArchLinux system by its hostname from other machines in my home network --- instead, I was always forced to type out my ArchLinux system's IP address in full.
I looked high and low across the 'net before I finally found the answer in the dhcpcd.conf man page: the solution is to add the following line to your /etc/dhcpcd.conf file:
hostname
One thing that confused me is this line in the default ArchLinux /etc/dhcpd.conf file:
# dhcpcd-run-hooks uses these options. option domain_name_servers, domain_name, domain_search, host_name
The "option host_name" part *seems* like it would send your machine's hostname to the DHCP server, but it really doesn't. Maybe that's a bug?
I request the developers in charge of the default ArchLinux networking setup to make the above change, so that ArchLinux systems send their hostnames to the DHCP server (and therefore can be pinged/ssh'ed/accessed by their hostname) out of the box!
Thanks for your consideration.
This is not directly related to your request, but still quite similar so I thought I would mention it. My openwrt router runs dnsmasq which reads these two files : /etc/hosts : association between ip and hostname /etc/ethers : association between mac and hostname When I add a box the my network, I just need to know its mac and add one line to these two files. Then I know which ip it will always uses, and I also know which hostname to use just by looking at the table. So in fact, I don't care much about the real hostname of the box (it's better if it matches but not necessary)