---
title: "Using on_commit, on_expiry, on_release statements for DHCPv6"
slug: "aa-01094"
description: "These statements function in DHCPv6 pretty much the same as they do in DHCPv4."
tags: ["isc dhcp"]
updated: 2018-09-26T19:09:00Z
published: 2018-09-26T19:09:00Z
canonical: "kb.isc.org/aa-01094"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.isc.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding support for "on commit", "on expire", and "on release" statements in DHCPv6

### Question:

How do I use the new on_commit, on_expiry, on_release statements for DHCPv6?

### Answer:

These statements function in DHCPv6 pretty much the same as they do in DHCPv4, allowing you to specify actions to be taken when the matching event happens to the lease. They can be placed in any valid scope, such as the global scope or subnet statements.

```
# Global instances, should be used if we don't have anything better
on commit { log(info, concat("global commit: ", option dhcp6.client-id)); }
on expiry { log(info, concat("global expiry: ", option dhcp6.client-id)); }
on release { log(info, concat("global release: ", option dhcp6.client-id)); }
```
