Skip to content

DHCPv6

Windows keeps DHCPv6 apart from IPv4: its own scopes, reservations, classes and option values, with their own cmdlets. The plugin syncs the core of it.

What is synced

Windows NetBox
DHCPv6 scope Scope on a /64 prefix (no IP range): name, description, state, preference, preferred and valid lifetimes, renew timer (T1) and rebind timer (T2)
DHCPv6 reservation Reservation: the reserved IPv6 address (an IPAM IP address), DUID and IAID
DHCPv6 user class Class with address family IPv6
DHCPv6 option values (server, scope, reservation) Option values with family IPv6, for standard DHCPv6 option codes, optionally for a user class

Keys of DHCPv6 objects start with v6/ (for example v6/2001:db8:1:: for a scope), so they never meet an IPv4 key. Addresses are compared in one spelling (lowercase, compressed), including inside option values.

What is read but left alone

These are noted in each import's sync run and never touched by a push. They count as children of their scope or reservation, so a scope holding any of them is never deleted by a push.

  • DHCPv6 vendor classes and vendor class option values: writing a vendor class needs an enterprise number the plugin does not keep.
  • Values of option codes that are not standard DHCPv6 options. DHCPv6 option definitions are not synced.
  • DHCPv6 exclusion ranges.

NetBox objects of the same kinds (DHCPv6 vendor classes, values of other codes) are left out of pushes the same way.

Rules

  • Scopes are /64. NetBox refuses to save a DHCPv6 scope on another prefix length; one whose prefix length was changed in IPAM afterwards is not pushed. DHCPv6 scopes have no IP range and no superscope.
  • Lifetimes. Left empty in NetBox, they keep the Windows values; a new scope gets Windows' defaults: preferred 8 days and valid 12 days. Renewal (T1) and rebinding (T2) times left empty follow the preferred lifetime: a new scope gets half and 80 % of it (4 days and 6.4 days, that is 6 days 9:36, for the default 8 days, which is what Windows gives a scope made without them), and an existing scope keeps its Windows timers unless they no longer fit below the preferred lifetime (after you shorten it in NetBox), in which case they are worked out the same way. When you set only one of T1 and T2, the empty one is placed on the right side of it: T1 at 5/8 of T2, or T2 halfway between T1 and the preferred lifetime, when the default would not fit. Windows expects T1 < T2 < preferred lifetime <= valid lifetime: NetBox refuses to save two of these values that are both set and out of order. A T1 or T2 of 0 counts as empty. A scope without a name is named after its prefix.
  • Reservations need a DUID and an IAID, and no MAC address or client ID. The DUID is hex bytes, stored as aa-bb-cc whatever separators were typed. Changing the address creates a new reservation and removes the old one, since the address is part of its key.
  • No policies. Windows has none for DHCPv6: a DHCPv6 option value cannot have a policy.
  • No failover. Windows has none for DHCPv6, so DHCPv6 changes are never replicated.
  • Deletes are never forced. A scope with leases fails with DHCP 20007 and is removed by a later push.

The Leases tab works for DHCPv6 scopes too, and shows the DUID and IAID of each lease.