Question about logging Option 82

Anton warm at stack.ru
Fri Mar 5 15:53:13 UTC 2010


Is any possibility to use some kind of macro or variable in the dhcpd.conf ? In my case of match statements I
use switch mac-address several times but should be better to define mac-address once and then use variable
containing this mac.

Thanks for simplifying example -- it works.


On Fri, 5 Mar 2010 18:03:46 +0600
Glenn Satchell <glenn.satchell at uniq.com.au> wrote:

> This is not related to your logging question, but you can simplify the 
> match statements you are using. No need to convert to ascii first. A 
> binary string can be represented as a series of colon separated hex 
> digits. See dhcp-eval man page. eg:
> 
> # c2950
> class "192.168.70.18"{ match if binary-to-ascii (10, 8, "", suffix( 
> option agent.circuit-id, 1)) = "0"
>    and binary-to-ascii(16, 8, ".", suffix ( option agent.remote-id,6)) = 
> "0.c.ce.47.7c.0";}
> 
> becomes:
> 
> class "192.168.70.18" {
>     match if suffix(option agent.circuit-id, 1) = 0
>           and suffix(option agent.remote-id,6) = 0:c:ce:47:7c:0;
> }
> 
> HTH.
> 
> regards,
> -glenn

-- 
Anton [WARM-RIPE]
Stack ltd division head
tel. 8 (3822) 555-797



More information about the dhcp-users mailing list