omapi and agent.remote-id

Jeff Waller jeffw at cnxntech.com
Thu Feb 16 23:08:15 UTC 2012


On Feb 16, 2012, at 5:49 PM, Matej Mailing wrote:

> For a smaller to middle-sized ISP there is a number of 10k static IP
> allocations and we are using option 82 agent.remote-id to define them
> currently as subclasses via the configuration file. As restarting of
> the DHCP server for every addition / change of the systems behind
> seems to take quite some time and can (in some cases where the every
> time-generated configuration file has some errors in it) also stop the
> server, using omapi with the previously described use case seems to be
> a good solution. Please correct me if I'm wrong.

We do a similar thing with OMAPI (9.4K MACS) but using subclasses.  No restart 
necessary.

> 
> Jeff, I cant find the patches you mention, could you please help me
> with some directions on how to find them?

Here you go:

https://lists.isc.org/pipermail/dhcp-users/2012-January/006837.html

Tell me how it works out.

> 
> Also if anyone is using a setup I am planning to achieve, please let
> me know about the performance and known issues.

Performance:  Takes < 1 second to add/delete.  Not sure about restart
time to parse the lease file (30 seconds maybe?).

You should  be prepared to invalidate previous leases as create and delete
subclasses.


> 
> TIA,
> Matej
> 
> 2012/2/16 Jeff Waller <jeffw at cnxntech.com>:
>> You say subnets, but do you mean subclasses?
>> 
>> subclasses are better because it's far more efficient in terms of lookup
>> complexity.  Subclass lookup is hashed O(1) while host lookup is linear O(n).  Are
>> you saying new to 4.2 host lookup is also hashed?
>> 
>> 
>> On Feb 16, 2012, at 8:21 AM, Matej Mailing wrote:
>> 
>>> Hi,
>>> 
>>> I have looked at some posts about the issue but was not successful on
>>> getting it to work via omapi. My idea is to set a host with its' fixed
>>> address entirely via omshell. Since 4.2 it is possible to use only
>>> host declatation for declarding a static IP address to a host (no more
>>> need to create subnets) and an option of using omapi for such a
>>> declaration would be very useful for users with large amounts of
>>> static IP allocations:
>> 
>> Can you define large?
>> 
>>> 
>>> host hostname {
>>> host-identifier option agent.remote-id XX:XX:XX:XX:XX:XX;
>>> fixed-address aaa.aaa.aaa.aaa;
>>> }
>> 
>> 
>> 
>>> 
>>> There is no complete information if it is supported or not on the
>>> current version or no and I am looking for more information about it.
>> 
>> Take a look at the source code for dhcp in server/omapi.c starting
>> around line 2640
>> 
>> in particular the functions
>> 
>> dhcp_host_set_value
>> dhcp_host_get_value
>> dhcp_host_destroy
>> dhcp_host_stuff_values
>> dhcp_host_lookup
>> dhcp_host_create
>> 
>> to get an idea of the values that are supported
>> 
>> in addition, there are other supported objects, although (see my post
>> in January)  some of them are buggy, but you can apply my patches.
>> 
>> -Jeff
>> 
>>> 
>>> TIA,
>>> Matej
>>> _______________________________________________
>>> dhcp-hackers mailing list
>>> dhcp-hackers at lists.isc.org
>>> https://lists.isc.org/mailman/listinfo/dhcp-hackers
>> 




More information about the dhcp-hackers mailing list