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

Re: Identify dhcp client to server using hostname

Robert Ian Smit wrote:
I am trying to allocate ip-addresses on my local network using
dhcp3-server. I want a couple of systems to have a fixed address,
while other system should get any ip that is still available.

I have created a range of dynamic ip-numbers and have tried to find
a way to identify those hosts that need a fixed address using host
When I add a "hardware ethernet HWADDR"-statement to a host
definition, everything works as expected. However I don't want to
use MAC-addresses, since sometimes I boot a live-cd or another
operating system in which case I'd like to use an ip from the
dynamic range.

I have tried changing the "send host-name" option in dhclient.conf,
but this seems to get happily ignored.
These are the relevant parts from dhcpd.conf on the server:
option domain-name "mydomain.net";
option domain-name-servers;
option routers;

subnet netmask {

host myhost {
#  hardware ethernet 00:10:A7:10:83:B8;

The only uncommented line in dhclient.conf on the client:
send host-name "myhost";
When I uncomment the hardware statement, I get,
otherwise I get something from the 11-19 range. Is it possible to
use a different identifier (ideally the host name) and if so what
statements are needed in the different config-files?


My experience has always been to use the MAC address.
Using a name is too easy to spoof.

I don't think you can do what you are looking for.

However, if you are trying to set an IP address to the same machine based upon a boot-CD then why not set the installed (hard drive) IP address to a fixed address and when you boot into the CD, it'll use DHCP to set up.

BOFH excuse #348:

We're on Token Ring, and it looks like the token got loose.

Reply to: