On Sun, Oct 02, 2011 at 06:31:59PM +0200, Ireneusz Szcześniak wrote: > Hi, > > I'm planning to install an image of Debian to a number of computers. > Each of these computers will have the same configuration except the > hostname and the IP address. The IP configuration has to be static. > I can't use a DHCP server. > > QUESTION; Is there a way to assign a hostname and a static IP > address at boot time depending on the MAC address of the computer's > network interface card?
I'm not sure about hostname but there IS a way to assign a static IP address to an interface based on it's MAC address. It's called StateLess Address Autoconfiguration (SLAAC). Basically, you take the 48-bit mac address, modify it a little (mainly adding FF:FE in the middle) and you now have a 64-bit interface identifier. This becomes the second half of your IP address. For the first half of the address, you will either use the standard link-local prefix, or if you can use a route-advertising daemon (package: radvd), you can advertise a site-wide prefix to allow the machines to be addressed from anywhere. I suspect, though, that the link-local prefix should be fine for your purposes, though. -- Darac Marjal
signature.asc
Description: Digital signature