Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] NAS and DHCP?

Darren Cook writes:

 > It is getting an IP address from the router, using DHCP. It seems this
 > is a Potential Problem,

You mean because of lease expiry and migration to a new IP?  Here's
what I do in /etc/dhcp/dhcpd.conf (this is Gentoo, YLMV):

subnet netmask {

host HVL4-947739 {
  hardware ethernet 0:a0:b0:94:77:39;

Indeed I assigned a name based on the MAC, but that was because at the
time I was thinking about investing in another one and that's as good
a way as any to distinguish them uniquely in the config file.  I don't
actually use that name, or any name.  There's only one client, with
the /etc/fstab entry referring to the IP address:

// /mnt/HVL4 cifs uid=steve,gid=wheel,pass='' 

But if I were going to use a name, I'd probably call it by the
contents, say an /etc/hosts line like	musicbox

 > and I should assign it a static IP address (same subnet, but
 > outside the DHCP address range).

s/DHCP/dynamic/.  It is better to do this in DHCP rather than
configuring the hardware with a static address, because then all your
config is in one file (or at worst, one app's files).

 > Is there any good reason not to do that?

Not that I can think of.

 > (The router is a Buffalo AirStation, and it also acts as the DNS server
 > for my network. So I'm thinking maybe there is a clever option to assign
 > a DNS name based on the mac address, and all clients would use the name
 > not the IP address.

There probably is a way to do it, but that's not very human-friendly,
or even software-friendly, IMHO YMMV.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links