From the dhcpd.conf (5) man page:
<quote>
The DHCP server generates the list of available IP addresses from a hash table. This means that the addresses are not sorted in any particular order, and so it is not possible to predict the order in which the DHCP server will allocate IP addresses. Users of previous versions of the ISC DHCP server may have become accustomed to the DHCP server allocating IP addresses in ascending order, but this is no longer possible, and there is no way to configure this behavior with version 3 of the ISC DHCP server.
</quote>

So it looks like it is actually non-deterministic what IP you may receive. If you have a fresh dhcpd.leases file, you will initially get leases in descending order, but after a few are assigned and some are expired, it will become somewhat random(ish). This is how the ISC dhcpd daemon works (which happens to be the most popular (by far) linux dhcp daemon) and isnt specific to vyatta. If you install dhcpd on a redhat system, you'll see the exact same behavior.

As for *why* this was done starting with v3 of dhcpd, I dunno. I'm curious as to why it leasing in descending order is a show-stopper for you? This seems like a (very) trivial thing to nitpick over. What difference does it make as long as your clients get addresses?

------------------
Aubrey Wells
Senior Engineer
Shelton | Johns Technology Group
A Vyatta Ready Partner
www.sheltonjohns.com





On Jan 13, 2008, at 10:41 PM, Marat Nepomnyashy wrote:

Hi Mike,

As far as to why the DHCP server leases out IPs from the end of the block rather than from the beginning, I'm not sure myself. I just signed up for the ISC DHCP server mailing lists at http://www.isc.org/index.pl?/sw/dhcp/dhcp-lists.php and plan to ask the people on there this question as well.

If you added a second dhcp pool for eth2, but it did not appear in '/ opt/vyatta/config/dhcpd.conf', and you stil have the config and the 'dhcpd.conf' after that commit, then please include these files with your message.

Thanks,
Marat
----- Original Message -----
From: silvertip257
To: Marat Nepomnyashy ; vyatta-users@mailman.vyatta.com
Sent: Sunday, January 13, 2008 6:54 PM
Subject: Re: [Vyatta-users] DHCP pool questions

Why cannot I take addresses out of the beginning of the block like I'd rather it do? How can I (without rewriting/modifying source code)? That would really stink to have to statically assign everything to make it the way (that it makes sense). It's great and all that it actually does assign an address and ' works ', but why not start at the beginning?

From what Marat wrote, I understand that you've seen that behavior before - confirmed. Now, can it be changed? I won't try to start any wars here, but that would unfortunately be one reason I would not want to use Vyatta. Well that and the WAN dhclient that's in progress.

I could have sworn (oh and I did commit it) that I added a config for a second dhcp pool (separate) for eth2, but voila it's gone when I check dhcpd.conf...

Thanks,
Mike

On Jan 13, 2008 8:37 PM, Marat Nepomnyashy <[EMAIL PROTECTED]> wrote:
Hi Mike,

As far as I know, it is normal for the ISC DHCP server that the Vyatta router is using to lease out addresses starting from the last address of the DHCP lease block, I've seen this before. Not quite sure myself why ISC does it this way, maybe there is an assumption that the IPs at the end of the block are less likely to be already taken...

When you write "I have discovered that various parts have been separated from the main config", what do you mean?

The DHCP server configuration file is '/opt/vyatta/etc/dhcpd.conf', not '/opt/vyatta/etc/dhcp.conf'. The configuration for eth2 should not show up there if you did not configure any DHCP leases for any of the subnets to which your the interface is connected.

If you have additional questions, please send us snippets of your router configuration under hierarchies 'interfaces ethernet' and 'service dhcp-server'. Please also send the contents of '/opt/ vyatta/etc/dhcpd.conf'.

Thanks,
Marat
----- Original Message -----
From: silvertip257
To: vyatta-users@mailman.vyatta.com
Sent: Saturday, January 12, 2008 4:36 PM
Subject: [Vyatta-users] DHCP pool questions

I've set up a complete vyatta system a few times, even with two versions (2.2 and 3.0). I'm currently working with 3.0 and I'm getting the same behavior as the last time.

I setup a DHCP server on eth1, but when it hands out addresses, it always gives out the last address in the block (in this case192.168.0.60 consistently). When finding the configuration, I have discovered that various parts have been separated from the main config - I don't know if it was that way in previous versions, but thought I'd mention it. Also, my DHCP server for eth2 does not show up in /opt/vyatta/etc/ dhcp.conf ;; that's another issue that I'll have to solve after this one.

My config for the DHCP server:
shared-network Subnet1 {
    subnet 192.168.0.32 netmask 255.255.255.224 {
        not authoritative;
        default-lease-time 86400;
        max-lease-time 86400;
        range 192.168.0.34 192.168.0.60;
    }

Thanks,
Mike

--
//  SilverTip257  //
==========================
  ~
 · ·
 /V\
// \\
/(   )\
^`~´^

_______________________________________________
Vyatta-users mailing list
Vyatta-users@mailman.vyatta.com
http://mailman.vyatta.com/mailman/listinfo/vyatta-users



--
//  SilverTip257  //
==========================
  ~
 · ·
 /V\
// \\
/(   )\
^`~´^







--
//  SilverTip257  //
==========================
  ~
 · ·
 /V\
// \\
/(   )\
^`~´^
_______________________________________________
Vyatta-users mailing list
Vyatta-users@mailman.vyatta.com
http://mailman.vyatta.com/mailman/listinfo/vyatta-users

_______________________________________________
Vyatta-users mailing list
Vyatta-users@mailman.vyatta.com
http://mailman.vyatta.com/mailman/listinfo/vyatta-users

Reply via email to