Assigning leases based on option 82
Jeremy Falling
jfalling at g4.net
Wed Nov 24 14:47:06 UTC 2010
On 11/23/2010 10:36 AM, Adam Moffett wrote:
>
>>> This causes us to desire DHCP to issue and track leases by the
>>> remote-id instead of the MAC address.
>> My first reaction is that DHCP uses the MAC address to 'track'
>> leases. But you can play around with classes to make it work.
>>
>> Miquel van Smoorenburg has a writeup on his site that refers to
>> several patches. Ref: <http://www.miquels.cistron.nl/isc-dhcpd/>
>>
>
> If he's using option 82 he's probably already using classes.
Yes, we are using classes. Here is a sample of our configuration:
# dhcpd.conf
#Version 3.1.3
#
option domain-name "g4.net";
option domain-name-servers 66.211.154.2, 216.177.0.33, 216.177.0.34;
default-lease-time 100000;
max-lease-time 200000;
authoritative;
ddns-update-style none;
log-facility local7;
subnet 1.2.2.0 netmask 255.255.255.224 {
}
class "adsl-customer1-lease1" {
match if option agent.remote-id = "05/agent.remote-id/customer1/6035550001";
lease limit 1;
}
class "adsl-customer2-lease1" {
match if option agent.remote-id = "23/agent.remote-id/customer2/6035550002";
lease limit 1;
}
class "adsl-customer3-lease1" {
match if option agent.remote-id = "47/agent.remote-id/customer3/6035550003";
lease limit 1;
}
class "adsl-customer4-lease1" {
match if option agent.remote-id = "06/agent.remote-id/customer4/6035550004";
lease limit 1;
}
##################################### Manchester ADSL Pool
subnet 1.2.3.0 netmask 255.255.255.0 {
option domain-name-servers 66.211.154.2, 216.177.0.33, 216.177.0.34;
option domain-name "g4.net";
option routers 1.2.3.1;
option broadcast-address 1.2.3.255;
default-lease-time 100000;
max-lease-time 200000;
pool {
range 1.2.3.9 1.2.3.25;
allow members of "adsl-customer1-lease1";
allow members of "adsl-customer2-lease1";
}
pool {
range 1.2.5.33 1.2.5.33;
allow members of "adsl-customer3-lease1";
}
pool {
range 1.2.5.35 1.2.5.35;
allow members of "adsl-customer4-lease1";
}
}
####################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20101124/23680285/attachment.html>
More information about the dhcp-users
mailing list