dhcp-eval known/static

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

dhcp-eval known/static

Craig Huckabee

  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
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: dhcp-eval known/static

Bill Shirley-2
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
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users