static IP from LDAP with Option 82
Jason Brandt
jbrandt at fsmail.bradley.edu
Wed May 29 14:07:10 UTC 2013
I'm no expert, so someone may correct me here, but looks like you may need
a client class setup, with a match statement for your option 82. I found
this information regarding static IP with option 82:
class "static-option-82" { match option agent.remote-id; }
subclass "static-option-82" "VP123456";
If you're using circuit-id, may have to replace agent.remote-id with that.
Translated to LDAP would be:
Client Class Syntax:
dn: cn=static-option-82,dc=<your dc info>
cn: static-option-82
objectClass: top
objectClass: dhcpClass
dhcpStatements: match option agent.circuit-id
Then you would need a subclass entry for each host. Also, because of the
way subclass entries need to be named, I would name the host entry
something like: host-AVC999990012672
dn: cn=AVC999990012672, dc=<your dc info>
cn: AVC999990012672
objectClass: top
objectClass: dhcpSubClass
dhcpClassData: "static-option-82"
Obviously the DN's can be changed for whatever OU structure you're using.
Give that a shot and see if it helps.
On Tue, May 28, 2013 at 11:03 PM, matt <matt at onthenet.com.au> wrote:
>
> Doh, only digest. anyway..
>
> Yes Jason in non ldap mode I am able to allocate an IP using option 82.
>
> This config does the trick.
>
> host user1 {
> host-identifier option agent.circuit-id "AVC999990012672";
> fixed-address 10.0.30.123;
> }
>
> When running with LDAP however the search filter is using only the
> dhcpHWAddress as below.
>
> (&(objectClass=dhcpHost)(**dhcpHWAddress=ethernet c8:4c:75:a2:b7:19))
>
> If I add in the MAC so the above filter has a match, then the IP is
> allocated fine.
>
> My LDAP entry for the host is as follows.
>
> dn: cn=AVC999990012672, cn=customers,cn=dhcp,dc=test,**dc=com
> objectClass: top
> objectClass: dhcpHost
> cn: AVC999990012672
> dhcpStatements: host-identifier option agent.circuit-id "AVC999990012672"
> dhcpStatements: fixed-address 10.0.30.66
>
> So it appears I need to modify the filter somehow ?
>
> thanks.
>
> Matt
>
>
>
>
>
>
>
>
>
>
> Have you tried running in ldap debug mode to see the ldap query its
>> using? Do your options work properly if you test in non ldap mode?
>>
>> Jason K. Brandt
>> 309-208-6687
>>
>> Sent from my iPad
>>
>> On May 28, 2013, at 7:29 PM, matt <matt at onthenet.com.au> wrote:
>>
>> Hi,
>>
>> I have dhcpd (4.2.5) using Openldap for its config with success.
>> I'm trying to assign Static IP's using Option 82 instead of the MAC
>> address but running into problems.
>> I can see some discussion regarding Option 82 and LDAP from years ago but
>> nothing recently.
>> Has anyone had any experience with Option 82 IP assignment and LDAP ?
>>
>> thanks.
>>
>> Matt.
>> ______________________________**_________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/**listinfo/dhcp-users<https://lists.isc.org/mailman/listinfo/dhcp-users>
>>
>
> ______________________________**_________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/**listinfo/dhcp-users<https://lists.isc.org/mailman/listinfo/dhcp-users>
>
--
Jason K. Brandt
Systems Administrator
Bradley University
(309) 677-2958
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20130529/7dbfd198/attachment.html>
More information about the dhcp-users
mailing list