Can you add a class match with omshell?

Oleg Gawriloff barzog at
Fri Jan 9 00:32:50 UTC 2009

 >The problem with this workaround is that subclasses allocate a hash
 >table to hold the subclass lookups in, into which you're only going
 >to place one element per class.  It will use an extraordinary amount
 >of memory unless you alter the sources (look in includes, there are a
 >series of default hash sizing #defines).
 >Note that you're already chasing a performance spectre because you're
 >supposing a large number of class statements.  The classes are
 >searched linearly (linear search on subclasses, hash search on a
 >per-class-basis for subclass matches).  So you're looking at an O(n)
 >scaling CPU sponge at the very start of all DHCP packet processing.
After some brain-storming, keeping your words about linear search in 
mind, we come to the point that we don't need realy chaining Option82 
(Switch+Port) to some fixed address/class. All we need: that in any 
moment of time our BSS must know what ip address belongs to which client 
(switch+port). Of course one solution is generate huge amount of static 
classess as I ask earlier. But another solution to implement some kind 
of interaction beetween dhcpd and BSS during dhcp address request. After 
some reading I'll come to followind config (which for me eliminates need 
for static classess):

on commit or release or expiry
         set portid=pick-first-value(binary-to-ascii(10,8,".",option 
         set switchid=pick-first-value(binary-to-ascii(10,8,".", option 
         set clientip=binary-to-ascii (10, 8, ".", leased-address);
         set clientmac=binary-to-ascii(16,8,".",substring(hardware,1,100));
         set relayip="0";

After this I wrote small script that convert all params to standard 
RADIUS Accouting request which our BSS kindly accepts. Only two question 
1. in scripts params I want to include giaddr of relay agent, but I 
can't find isc-dhcpd option for this field (giaddr). Any ideas/suggestion?
2. man about 'execute' says that its blocking operation. My script run 
in about 1 second. Does at means that any dhcp packets that comes to 
server at this moment will be discarded or some kind buffering is in place?

More information about the dhcp-users mailing list