[Techtalk] Host names on a LAN

Maria Mckinley maria at shadlen.org
Wed Feb 2 19:43:28 UTC 2011


On 2/2/11 9:30 AM, John Sturdy wrote:
> I'm looking at doing something similar, but with a slight twist (and
> I've not got much experience of network setup, so this may be a fairly
> basic question, in which case telling me a word to google for may be
> enough):
>
> I have a home router with wireless (BT HomeHub) which looks reasonably
> configurable (http://www.filesaveas.com/hubhelp.html).  On it I'm
> using a desktop machine and a netbook (both Debian) and an N900
> (Maemo, which is Debian-based).  I want to be able to refer to the
> machines by name (for convenient rsync, mostly, and maybe nfs mounts,
> and to ssh into the N900 when I want to hack on it).  However, the
> netbook might appear on other wifi networks when I use it away from
> home, and the N900 will both do that and also use GPRS/GSM modem, so I
> want to be able to switch quickly (and preferably automatically)
> between having static IP addresses and using /etc/hosts at home, and
> DHCP when outside.
>
> There's probably just one thing I should look up to find how to do
> this, I suspect (I've tried "zone" and "location" but that doesn't
> help) -- any pointers?
>
> __John

If dhcp is truly configurable on your home router, you can just set up 
entries based on MAC addresses:

host buddy {
   hardware ethernet 00:14:51:03:2c:1e;
   fixed-address 10.123.456.78;
   }

Then the laptop will always get the same address at home, but will still 
be using dhcp, so it will work normally outside the house.

~maria


More information about the Techtalk mailing list