Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control ISC DHCP server with Netbox #2084

Closed
jdemilledt opened this issue May 9, 2018 · 3 comments
Closed

Control ISC DHCP server with Netbox #2084

jdemilledt opened this issue May 9, 2018 · 3 comments

Comments

@jdemilledt
Copy link

jdemilledt commented May 9, 2018

Issue type

[x] Feature request
[ ] Bug report
[ ] Documentation

Description

Functionality to add leases to DHCP based on IPAM addresses (and vice versa if possible)
This would be used to manage dynamic (or static leased) IP addresses from Netbox.
I'm unsure about needed changes for the schema or libraries.

@mdlayher
Copy link
Contributor

mdlayher commented May 9, 2018

Hello, I'm not the maintainer of netbox, but I can assure you that such an integration would be outside the scope of netbox itself. There isn't a feasible way to integrate netbox directly with the large variety of systems that exist in the wild.

Your best bet is going to be to create an external component using the API, and integrate that with ISC dhcpd.

@jeremystretch
Copy link
Member

Just echoing what @mdlayher said: You'll need some layer of logic between NetBox and your DHCP server to automatically populate leases. It might be possible to accomplish what you want by writing a custom export template for IP addresses in NetBox, but I'm not sure what your end goal is.

@fusmu
Copy link

fusmu commented Dec 3, 2019

I know it's a old thread but it's maybe the only one related to this.
Few months ago I've faced same scenario we have legacy isc-dhcpd box running on freebsd and something like 3000 hosts(servers, IoT devices, pxe, users) so we need something to manage it. What I did is what jeremystretch says, I write middle-layer logic that read Netbox DB and parse it as dhcpd config. What I modify in netobx was only IPAM app and forms related to it:

  • Added MAC address field for each IP
  • Implement some logic if the address is in use/free/dhcp or pxe
  • writing small python script that fetch records that are related to DHCP and parse them as isc-dhcpd config
  • modify IPAM save form to trigger that script on saving/editing new IP

Currently we're using it for several months without an issue.
Once again I'm sorry that i'm rising this thread from dust but maybe someone could find this useful, if you have any questions do not hesitate to contact me.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants