Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up an internal network with a server running Ubuntu 8.04 as a Clonezilla host and DHCP server. It will be the only server on the network.

I am interested it having it assign IP addresses sequentially within a range. Currently, I believe it randomly picks an IP address from the range. For example, if you have a range of 10.0.20.100 to 10.0.20.150, I want the first client that connects to get 10.0.20.100 and the second to get 10.0.20.101. Currently it will assign it randomly (first client gets 10.0.20.136).

I realize that it won't be exactly sequential (clients that don't release, multiple requests at the same time).

Any ideas?

It is not required, but would make my life quite a bit easier.

Here is the relevant part of my /etc/dhcp3/dhcpd.conf file:

subnet 10.0.20.0 netmask 255.255.255.0 {
    option subnet-mask  255.255.255.0;
    option routers 10.0.20.1;
    next-server 10.0.20.1;

    pool {
        range 10.0.20.100 10.0.20.150;
    }
}
share|improve this question
2  
Out of curiosity, how would this make your life easier? –  Zoredache Oct 11 '09 at 8:13
    
It may be negligible (and not quite sure it would help all that much), but I am deploying hard drive images to many clients (and on a rotating basis). I was actually just more curious that I couldn't find a configuration item for it. The reason I was looking for it was to divide the clients into little groups and set Clonezilla to start after at least one client connects and there is a timeout. If the clients connect randomly, there is more of a chance that they will join separate groups and trigger multiple groups starting with only one client each. –  HalfBrian Oct 11 '09 at 17:05

1 Answer 1

up vote 4 down vote accepted

By default, when ISC DHCPD first starts out, it hands out leases from the top of the range, working sequentially down. I believe it tries to give out the highest address it can. There is no way to change this.

However, if you're relying on it handing out a particular IP address, you're doing it wrong. Either implement static leases for each host in your dhcpd.conf, or set up dynamic DNS. The whole point of DHCP is so that it does not matter what address you get, so long as you get a working address.

share|improve this answer
    
Yes, I absolutely do want it to be dynamic, and I realize that they won't get a specific address and that's fine. Thanks for you answer. –  HalfBrian Oct 11 '09 at 16:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.