I know we've been here before but now I actually have everything working pretty well I'd like to decide how I *should* be doing this, i.e. the most elegant way of doing it.
Our home network has a number of machines and devices on it:-
My desktop machine - xubuntu 8.10 The TV/Lounge machine - xubuntu 8.10 The garage backup machine - Ubuntu server (8.10 too I think) An HP7310 printer A Siemens DECT VOIP box My wife's Windows XP machine plus occasional 'visiting' machines and devices
These are all on the same 192.168.1.xxx subnet and a Draytek Vigor 2820n router connects them to the internet. There is a second backup ADSL connection provided by a BT "Business Hub" (2Wire) router on a different subnet. The Draytek Vigor shares its own ADSL and that of the BT router between users.
I want to be able to refer to machines on the network by name, e.g. they are called isbd, lounge, garage, hp7310 etc. The methods I know about are:-
Static IPs plus dnsmasq: Currently I do this by giving them fixed IP addresses which I put in the /etc/hosts file on my desktop machine (which runs all the time) and run dnsmasq in that machine to provide the other local machines with access to the names.
Static IPs I used to set up /etc/hosts in all machines (well, all the Linux machines) separately before I used dnsmasq but although very simple it gets annoying to do this when a something is added or removed. It also means that one has to set up DNS host addresses everywhere.
Dynamic IP This is where I get a bit lost. If I let everything go the the default then all IPs are assigned by DHCP. I.e. an ubuntu machine 'as installed' will ask for DHCP on the LAN, similarly the printer and the VOIP box will do so. The Draytek Vigor 2820n provides (as do nearly all routers) a DHCP service. If left like this though nothing wil have a name (as far as I know) and I will have no easy way to ssh to the garage machine for example. People keep telling me that this should be easy to resolve using (if I understand it correctly) the router but at the moment I don't really see how.
If I *could* get names for everything using dynamic IP (i.e. DHCP provided by the router) then it would make for a simpler life as, at present, I have to change the Ubuntu default networking to give machines static IP and I also have to do slightly more configuration on the printer etc.
There's a section in the router set-up called "Bind IP to MAC" which will allow the router to always give the same IP to each device/system but I don't see how I can get names in there.
Am I missing something obvious somewhere? I don't think I've seen the ability to attach names to MAC addresses in any of the routers I've used over the past few years (Zyxel, Speedtouch). The BT 2Wire router allows you to manually give names to the MAC addresses but I'm not sure that it will let you use them to refer to them.