Hey, we started the Linuxdoc.org blog. You want to write a guest post about your favorite Linux related topic? Just send us a mail.The Linux community would appreciate it.

linuxdoc.org is proudly hosted on a VPS by hosting.co.uk at no charge. Thanks for the support guys!

You need instant help?

Just look at our collection of HOWTOs

You want to visit our Linuxdoc.org blog?

Click here to get the latest Linux news and read some interesting articles about our favorite OS.

How can I get Debian to find hostname/IP address from MAC address?

0 votes

On my home network (behind NAT), I have several small Debian machines with which I want to use identical boot drives - ie. I build an image, copy it and use on multiple machines. The machines are unique except of course for the MAC address (Raspberry Pi if it matters). I would like the machines to boot and determine their own unique IP address and hostname from the MAC address. I know how to edit startup files but I would like to not touch the files that ship from the Debian build. I currently have each of them set up to use DHCP and am building a massive /etc/hosts file. I have my DHCP server set up to issue fixed IP addresses for these machines based on the MAC address. The DHCP server only handles a small number of these requests, and I am about to exceed the table size. With this technique, each of the machines knows the name of all other systems on my net but they don't know their own name, and I am eating up slots in the 'known' DHCP assignment table.

Is there a way that (with identical boot drive) I can get each of these machines to boot to their own fixed unique IP address and name and have them understand their own name (besides localhost)? Since the addresses are fixed, I'd like to dispense with the DHCP mechanism if possible. I don't currently have a local dns server but I can set one up if that is required.

The build is currently Debian Wheezy.

asked Feb 12, 2014 by admin (520 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.