How to use "on commit" with isc-dhcp-server (IPV6)

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

How to use "on commit" with isc-dhcp-server (IPV6)

Fabien Michalon (fmichalo)
I try to use the "on commit/lease/expiry" trigger in isc-dhcp-server(IPV6 - 4.2.4). 

I made prefix delegation, and I have problem with updadting routing table, so i want to use the isc dhcp triggers to manually update routing tables when a commit or release happen.

First I make a simple test but it doesn't work, I have disabled ddns-update according to the documentation but nothing happens. I don't have any error when I start the server. 

my /etc/dhcp/dhclient6.conf is like this : 

    option dhcp6.domain-search "foo.net";
    option dhcp6.name-servers X:X:X::X, X:X:X::X;
    option dhcp6.preference 255;
    default-lease-time 7200;
    max-lease-time 14400;
    authoritative;
    option dhcp-renewal-time 3600;
    option dhcp-rebinding-time 7200;
    ddns-update-style none;
    log-facility local7;
    
    on commit {log("========COMMIT===========");}
    on expiry { log("=======EXPIRY==========="); }
    on release { log("=======RELEASE========="); }
    
    subnet6 2001:db8:0::/48 {
      #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
    }
    subnet6 2001:db8::/32 {
      #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
    }
    #One client example, I have 4000 others like this :
    host client1 {
     #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
     host-identifier option dhcp6.client-id X:X:X:X:X:X:X:X:X:X;
     fixed-address6 2001:0db8:3000::1;
     fixed-prefix6 2001:0db8:3000::/48;
    }

I've tried to put the triggers in the "host client1" scope and in the subnets scopes but it is the same: nothing happens. 
The DHCP server works properly because the client receive its prefix but the text is not added to the log. (And when I try to use execute function like `on commit { execute("/home/user/myscript");}` the script is not executed) 

So Have I make something wrong ? Or if someone have an idea to make it works? 

Thanks in advance for your responses :) 

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: How to use "on commit" with isc-dhcp-server (IPV6)

Shawn Routhier

On Mar 20, 2015, at 5:30 AM, Fabien Michalon (fmichalo) <[hidden email]> wrote:

I try to use the "on commit/lease/expiry" trigger in isc-dhcp-server(IPV6 - 4.2.4). 


The on [ commit expiry release ] was upgraded to included support for v6 in 4.3.0.
If you are using 4.2.4 you will need to update.

regards,
Shawn



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: How to use "on commit" with isc-dhcp-server (IPV6)

Fabien Michalon (fmichalo)
Hi ! 


Thanks for your response. 

I’ve upgraded my dhcp server to the 4.3.2 version and with the same config file, only the “on commit” is executed, nothing happens when the prefix is released or expired. 

Is there something wrong in my config ? If not, how can I execute an action when the prefix is released ? 

Thanks for your help 

Ps : this is my /ec/dhcp/dhcpd.conf : 

option dhcp6.domain-search "foo.net";
    option dhcp6.name-servers X:X:X::X, X:X:X::X;
    option dhcp6.preference 255;
    default-lease-time 7200;
    max-lease-time 14400;
    authoritative;
    option dhcp-renewal-time 3600;
    option dhcp-rebinding-time 7200;
    ddns-update-style none;
    log-facility local7;
    
    on commit {log("========COMMIT===========");}
    on expiry { log("=======EXPIRY==========="); }
    on release { log("=======RELEASE========="); }
    
    subnet6 2001:db8:0::/48 {
      #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
    }
    subnet6 2001:db8::/32 {
      #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
    }
    #One client example, I have 4000 others like this :
    host client1 {
     #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
     host-identifier option dhcp6.client-id X:X:X:X:X:X:X:X:X:X;
     fixed-address6 2001:0db8:3000::1;
     fixed-prefix6 2001:0db8:3000::/48;
    }


From: Shawn Routhier <[hidden email]>
Reply-To: Users of ISC DHCP <[hidden email]>
Date: Friday 20 March 2015 16:27
To: Users of ISC DHCP <[hidden email]>
Subject: Re: How to use "on commit" with isc-dhcp-server (IPV6)


On Mar 20, 2015, at 5:30 AM, Fabien Michalon (fmichalo) <[hidden email]> wrote:

I try to use the "on commit/lease/expiry" trigger in isc-dhcp-server(IPV6 - 4.2.4). 


The on [ commit expiry release ] was upgraded to included support for v6 in 4.3.0.
If you are using 4.2.4 you will need to update.

regards,
Shawn



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: How to use "on commit" with isc-dhcp-server (IPV6)

Espen Tallaksen
Hi Fabien
I think you have to specify priority,
log (info, ("Something"));


BR
Espen Tallaksen

2015-03-24 11:58 GMT+01:00 Fabien Michalon (fmichalo) <[hidden email]>:
Hi ! 


Thanks for your response. 

I’ve upgraded my dhcp server to the 4.3.2 version and with the same config file, only the “on commit” is executed, nothing happens when the prefix is released or expired. 

Is there something wrong in my config ? If not, how can I execute an action when the prefix is released ? 

Thanks for your help 

Ps : this is my /ec/dhcp/dhcpd.conf : 

option dhcp6.domain-search "foo.net";
    option dhcp6.name-servers X:X:X::X, X:X:X::X;
    option dhcp6.preference 255;
    default-lease-time 7200;
    max-lease-time 14400;
    authoritative;
    option dhcp-renewal-time 3600;
    option dhcp-rebinding-time 7200;
    ddns-update-style none;
    log-facility local7;
    
    on commit {log("========COMMIT===========");}
    on expiry { log("=======EXPIRY==========="); }
    on release { log("=======RELEASE========="); }
    
    subnet6 2001:db8:0::/48 {
      #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
    }
    subnet6 2001:db8::/32 {
      #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
    }
    #One client example, I have 4000 others like this :
    host client1 {
     #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
     host-identifier option dhcp6.client-id X:X:X:X:X:X:X:X:X:X;
     fixed-address6 2001:0db8:3000::1;
     fixed-prefix6 2001:0db8:3000::/48;
    }


From: Shawn Routhier <[hidden email]>
Reply-To: Users of ISC DHCP <[hidden email]>
Date: Friday 20 March 2015 16:27
To: Users of ISC DHCP <[hidden email]>
Subject: Re: How to use "on commit" with isc-dhcp-server (IPV6)


On Mar 20, 2015, at 5:30 AM, Fabien Michalon (fmichalo) <[hidden email]> wrote:

I try to use the "on commit/lease/expiry" trigger in isc-dhcp-server(IPV6 - 4.2.4). 


The on [ commit expiry release ] was upgraded to included support for v6 in 4.3.0.
If you are using 4.2.4 you will need to update.

regards,
Shawn



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to use "on commit" with isc-dhcp-server (IPV6)

Fabien Michalon (fmichalo)
Hi !

There is no change with this syntax, only on commit event is caught. 
When I lease and release a prefix, logs are like : 

Mar 24 04:01:30 DHCP-online dhcpd: Relay-forward message from 2001:db8:0:1::ee port 547, link address 2001:db8:0:1::e6, peer address fe80::f6cf:e2ff:fe11:xxxx

Mar 24 04:01:30 DHCP-online dhcpd: Advertise PD: address 2001:db8:3000::/48 to client with duid 00:03:00:01:42:xx:xx:xx:xx:xx iaid = -502169863 static

Mar 24 04:01:30 DHCP-online dhcpd: Sending Relay-reply to 2001:db8:0:1::ee port 547

Mar 24 04:01:30 DHCP-online dhcpd: Relay-forward message from 2001:db8:0:1::ee port 547, link address 2001:db8:0:1::e6, peer address fe80::f6cf:e2ff:fe11:xxxx

Mar 24 04:01:30 DHCP-online dhcpd: Reply PD: address 2001:db8:3000::/48 to client with duid 00:03:00:01:42:xx:xx:xx:xx:xx iaid = -502169863 static

Mar 24 04:01:30 DHCP-online dhcpd: ========COMMIT===========

Mar 24 04:01:30 DHCP-online dhcpd: Sending Relay-reply to 2001:db8:0:1::ee port 547

Mar 24 04:01:34 DHCP-online dhcpd: Relay-forward message from 2001:db8:0:1::ee port 547, link address 2001:db8:0:1::e6, peer address fe80::f6cf:e2ff:fe11:xxxx

Mar 24 04:01:34 DHCP-online dhcpd: Client 00:03:00:01:42:xx:xx:xx:xx:xx releases prefix 2001:db8:3000::/48

Mar 24 04:01:34 DHCP-online dhcpd: Sending Relay-reply to 2001:db8:0:1::ee port 547


From: Espen Tallaksen <[hidden email]>
Reply-To: Users of ISC DHCP <[hidden email]>
Date: Tuesday 24 March 2015 12:08
To: Users of ISC DHCP <[hidden email]>
Subject: Re: How to use "on commit" with isc-dhcp-server (IPV6)

Hi Fabien
I think you have to specify priority,
log (info, ("Something"));


BR
Espen Tallaksen

2015-03-24 11:58 GMT+01:00 Fabien Michalon (fmichalo) <[hidden email]>:
Hi ! 


Thanks for your response. 

I’ve upgraded my dhcp server to the 4.3.2 version and with the same config file, only the “on commit” is executed, nothing happens when the prefix is released or expired. 

Is there something wrong in my config ? If not, how can I execute an action when the prefix is released ? 

Thanks for your help 

Ps : this is my /ec/dhcp/dhcpd.conf : 

option dhcp6.domain-search "foo.net";
    option dhcp6.name-servers X:X:X::X, X:X:X::X;
    option dhcp6.preference 255;
    default-lease-time 7200;
    max-lease-time 14400;
    authoritative;
    option dhcp-renewal-time 3600;
    option dhcp-rebinding-time 7200;
    ddns-update-style none;
    log-facility local7;
    
    on commit {log("========COMMIT===========");}
    on expiry { log("=======EXPIRY==========="); }
    on release { log("=======RELEASE========="); }
    
    subnet6 2001:db8:0::/48 {
      #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
    }
    subnet6 2001:db8::/32 {
      #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
    }
    #One client example, I have 4000 others like this :
    host client1 {
     #I have also tried to put the on commit/expiry/release here (but it stil doesn’t work)
     host-identifier option dhcp6.client-id X:X:X:X:X:X:X:X:X:X;
     fixed-address6 2001:0db8:3000::1;
     fixed-prefix6 2001:0db8:3000::/48;
    }


From: Shawn Routhier <[hidden email]>
Reply-To: Users of ISC DHCP <[hidden email]>
Date: Friday 20 March 2015 16:27
To: Users of ISC DHCP <[hidden email]>
Subject: Re: How to use "on commit" with isc-dhcp-server (IPV6)


On Mar 20, 2015, at 5:30 AM, Fabien Michalon (fmichalo) <[hidden email]> wrote:

I try to use the "on commit/lease/expiry" trigger in isc-dhcp-server(IPV6 - 4.2.4). 


The on [ commit expiry release ] was upgraded to included support for v6 in 4.3.0.
If you are using 4.2.4 you will need to update.

regards,
Shawn



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to use "on commit" with isc-dhcp-server (IPV6)

Алексей Прокопчук
Good time of the day!

24.03.2015 14:13, Fabien Michalon (fmichalo) пишет:
Hi !

There is no change with this syntax, only on commit event is caught.
My English is not very good, excuse me if I said something wrong.

I confirm that I have all the same way. I wrote here exactly the same at 14 Jan 2015 with subject "dhcpd v6 4.3.1 and events". At the moment, no solution found. I think that in the implementation of event processing in version 4.3.1 was something unfinished

With best regards, Alexey Prokopchuk (AP8686-RIPE)


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