dhcp-eval known/static

Bill Shirley bill at c3po.polymerindustries.biz
Thu Feb 23 23:51:55 UTC 2017


I use 'static' (Last digit of TTL indicates which server issued the lease):
on commit {
         if static {
                 set is-static = " --> STATIC";

                 option dhcp-renewal-time        = encode-int(43200 / 2, 32);    # 43200 = 12 hours
                 option dhcp-rebinding-time      = encode-int(43200 * 7 / 8, 32);
                 ddns-ttl                        = encode-int((43200 / 2) + 1, 32);              # server1
                 #ddns-ttl                       = encode-int((43200 / 2) + 2, 32);       # server2
         } else {
                 set is-static = "";

                 option dhcp-renewal-time        = encode-int(lease-time / 2, 32);
                 option dhcp-rebinding-time      = encode-int(lease-time * 7 / 8, 32);
                 ddns-ttl                        = encode-int((lease-time / 2) + 1, 32);         # server1
                 #ddns-ttl                       = encode-int((lease-time / 2) + 2, 32);         # server2
         }

         log (
                 info,
                         "Host:", pick-first-value(option fqdn.hostname, option host-name, "(none)")
.
.
                         , is-static

         )
}
host bigbird            { hardware ethernet 1c:87:2c:5c:68:72; fixed-address 192.168.4.2; }

bigbird is static.

Bill


On 2/23/2017 4:45 PM, Craig Huckabee wrote:
>    The dhcp-eval man page mentions two boolean expressions - ‘known’ and ‘static’.  Does anyone have an example of either from a working configuration ?
>
>    I’m running version 4.3.5 and I’ve tried to setup some logging in an ‘if known’ block and ‘if static’ block with no results, so I’m obviously missing something.
>
> Thanks,
> Craig
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20170223/2703f75f/attachment.html>


More information about the dhcp-users mailing list