{# SPDX-FileCopyrightText: 2026 Marcin Zieba #} {# SPDX-License-Identifier: Apache-2.0 #} {% extends "netbox_kea/server_workspace.html" %} {% load form_helpers %} {% block content %}
Import DHCPv{{ dhcp_version }} Reservations

Select YAML or JSON. Then paste a document or upload one UTF-8 file. NetBox Kea validates the complete document before it contacts Kea.

Scope and identity rules
  • Use a subnet CIDR. The import resolves its current Kea subnet ID from the live Subnet Catalogue.
  • Each record needs exactly one native Kea identity.
  • Global scope is valid in exports, but import currently supports only in-subnet.
  • Any validation error stops the complete import. NetBox then sends nothing.
  • NetBox creates the Reservations one at a time. An entry that Kea does not apply or does not confirm stops the import.
Show a minimal YAML example
version: 1
reservations:
  - family: {{ dhcp_version }}
    scope:
      type: in-subnet
      subnet:
        cidr: {% if dhcp_version == 4 %}198.18.0.0/24{% else %}2001:db8::/64{% endif %}
    identity:
      type: {% if dhcp_version == 4 %}hw-address
      value: "aa:bb:cc:dd:ee:ff"{% else %}duid
      value: "00:01:02:03:04:05"{% endif %}
    addresses: [{% if dhcp_version == 4 %}198.18.0.20{% else %}2001:db8::20{% endif %}]
    delegated_prefixes: []
    hostname: host.example.invalid
    options: []
{% csrf_token %} {% render_form form %}
Cancel
{% if result is not None %}
Import result
{% if result.diagnostics %} {% for diagnostic in result.diagnostics %} {% endfor %}
PositionCodeProblem
{{ diagnostic.source_position }} {{ diagnostic.code }} {{ diagnostic.message }}
{% else %} {% include "netbox_kea/inc/import_report.html" %} {% endif %}
{% endif %}
{% endblock %}