Skip to main content

netbox-windows-dhcp-plugin

A NetBox plugin that models Microsoft Windows DHCP servers in NetBox and keeps both in step, in both directions, over WinRM or SSH.

Documentation: https://thomaschristory.github.io/netbox-windows-dhcp-plugin/

Status: 0.6.1. The plugin no longer needs netbox-plugin-dhcp: it holds the whole Windows DHCP configuration in its own models. 0.2.0 is a fresh start from 0.1.x (see the upgrade notes). 0.4.0 reads faster, guards IPAM edits that change Windows, and holds deletes back while a push leaves something out; it changes a few defaults and API answers, so read the upgrade notes and the changelog first. Every v1 feature is built and tested against an in-memory fake server and PowerShell stubs. The Windows side (scripts, transports, sync rules) is that of 0.1.x, apart from option values now being lists; 0.1.0's lab tests ran in full against two Windows Server 2022 DHCP servers (import, push, leases and failover, over WinRM HTTP and HTTPS and over SSH). 0.2.0 passed the full lab tests (make test-lab, make lab-e2e) on two Windows Server 2025 servers over WinRM HTTP with CredSSP, and 0.4.x's lab tests (make test-lab, and make lab-e2e on 0.4.1) passed there too. In a domain lab (0.5.0), Kerberos, SSH key logons and -ComputerName (with CredSSP) passed, and so did a push with Kerberos for normal calls and CredSSP only for failover writes (and again with 0.6.0, over HTTPS and HTTP); failover writes need CredSSP or SSH with a password (see the limitations). Try it on a lab server first.

Features

  • Import from Windows, on demand or every import_interval minutes. With netbox-branching each import lands in a branch (plus a change request with netbox-change-control); without it, in an import proposal whose items you apply or dismiss.
  • Push to Windows: a reconcile per server when a branch is merged, or a few seconds after a save without branching, plus "Sync now" and "Dry run". A push only deletes Windows objects NetBox manages; objects made by hand on Windows are left alone until imported.
  • IPv4 scopes, superscopes, exclusion ranges, reservations, option definitions and values, user and vendor classes, vendor class options, policies, failover relationships (with replication to the partner) and MAC filters, each a plugin model. Scopes and reservations point at NetBox prefixes, IP ranges, IP addresses and MAC addresses, so the addresses show up in IPAM too. A Windows server can be linked to its device or virtual machine.
  • DHCPv6 scopes, reservations (DUID and IAID), user classes and option values.
  • A Leases tab on the scope page, read live from Windows in a background job.
  • WinRM (NTLM, Kerberos, Basic, CredSSP for failover; HTTPS by default) or SSH, as in terraform-provider-windowsddi. Credentials live in named profiles in the plugin configuration, limited to allowed_hosts, never in the database.
  • REST API and GraphQL for every model; all Windows I/O in background jobs.

Compatibility

Plugin NetBox netbox-plugin-dhcp netbox-branching Python
0.2.x to 0.4.x 4.7 not used 1.2.2+ (optional) 3.12 to 3.14
0.1.x 4.7 0.2.x (required) 1.2.2+ (optional) 3.12 to 3.14

main is the standalone line (0.2 and later). The 0.1.x line (latest 0.1.4, branch release/0.1) keeps getting bug fixes, but no new features, for installs that stay on netbox-plugin-dhcp: pin netbox-windows-dhcp-plugin<0.2 to stay on it.

Windows Server 2016 or later with the DHCP Server role.

Quick start

pip install netbox-windows-dhcp-plugin   # pin "<0.2" to stay on the 0.1.x line (netbox-plugin-dhcp)
# extras: [kerberos] for Kerberos (needs system GSSAPI libraries), [branching] for branching and change control
PLUGINS = ["netbox_windows_dhcp_plugin"]

PLUGINS_CONFIG = {
    "netbox_windows_dhcp_plugin": {
        "credentials": {
            "dhcp-admin": {
                "username": "CORP\\svc-netbox-dhcp",
                "password_env": "DHCP_ADMIN_PASSWORD",
                "allowed_hosts": ["dhcp*.corp.example"],
            },
        },
    },
}

Run python manage.py migrate, restart NetBox and its worker, then add a Windows server under Windows DHCP > Windows servers, click Test connection and Import now (Import with netbox-branching). The first sync walkthrough covers the rest.

Documentation

The same pages are in the docs/ folder of the repository.

Development

Requires uv and Docker.

make lint        # ruff check and format check
make test        # unit tests, no NetBox needed
make dev         # NetBox, branching and change control in docker
make test-netbox # NetBox integration tests inside the dev stack
make docs        # build the documentation site
make dist        # build and check the wheel and sdist

See Development for the lab tests against a real Windows server.

License

Apache-2.0, see LICENSE.

Metadata

Release files for netbox-windows-dhcp-plugin 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netbox-windows-dhcp-plugin 0.6.1
File Size Uploaded Provenance Actions
netbox_windows_dhcp_plugin-0.6.1.tar.gz 280.2 kB With provenance Details for netbox_windows_dhcp_plugin-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netbox-windows-dhcp-plugin 0.6.1
File Interpreter ABI Platform Actions
netbox_windows_dhcp_plugin-0.6.1-py3-none-any.whl Python 3 none any Details for netbox_windows_dhcp_plugin-0.6.1-py3-none-any.whl

Total release size: 579.6 kB

Release files / netbox_windows_dhcp_plugin-0.6.1.tar.gz

Download URL netbox_windows_dhcp_plugin-0.6.1.tar.gz
Size 280.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b0fbfd5af5fe20f0f83e7906d43a743567d5de40a6fd84464272239ea736c54c
BLAKE2b-256 checksum
How to use checksums
494c2979f5e9d3b55480fb1297b99301088ffe916382356a84ea84a773e788fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / netbox_windows_dhcp_plugin-0.6.1-py3-none-any.whl

Download URL netbox_windows_dhcp_plugin-0.6.1-py3-none-any.whl
Size 299.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0b717eb74e5bcd886132b358a0ea0e69f105fab45dc0933664200f4c4ea837c
BLAKE2b-256 checksum
How to use checksums
756af6100bd9ba2e52dfc8c12fdf13121eb25505f4aa110904f7cc29c0327bfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for netbox-windows-dhcp-plugin 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for netbox_windows_dhcp_plugin-0.6.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page