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

Vendor Option plugin #85

Open
fitzy101 opened this issue Feb 3, 2020 · 4 comments
Open

Vendor Option plugin #85

fitzy101 opened this issue Feb 3, 2020 · 4 comments

Comments

@fitzy101
Copy link

fitzy101 commented Feb 3, 2020

Hi there,

I'm interested in adding support for vendor specific options, as specified in RFCs 2132, 3925 et al. and wanted to gauge the interest for this as an 'official' plugin, and also to confirm that work on this is not already happening. I've only briefly started thinking about how this might work, so I don't have any code or design notes to show yet.

Thanks

@pmazzini
Copy link
Contributor

pmazzini commented Feb 3, 2020

Hi @fitzy101, thanks for your interest in the project.

The library that CoreDHCP is using (https://github.com/insomniacslk/dhcp/) already supports the vendor specific options from the RFCs that you mentioned.

However, if I remember correctly, those options are not being used in CoreDHCP. There is no problem in adding an official plugin that makes use of those options. No work is currently happening in that direction.

What will be the behavior of such plugin be? What are you trying to accomplish?

Regards

@fitzy101
Copy link
Author

fitzy101 commented Feb 4, 2020

Hey @pmazzini, thanks for the quick response. I've been looking for an extensible and approachable DHCP server and CoreDHCP is exactly that; and I'd like to contribute to the project if possible.

The idea for the plugin is below, based on having done a bit of isc-dhcp-server configuration with vendor options as a part of my job, mainly for configuring servers for zero touch provisioning of network devices.

From what I can tell, there is no way to configure CoreDHCP with vendor-specific options (that is option 43) to be provided alongside the appropriate DHCPOFFER packet in response to a DHCPDISCOVER coming from the client side with a matching vendor identifier.

The behaviour that I'm thinking is something :

  • a user configures the vendor option plugin for CoreDHCP for vendor specific options for the identifier 'ACME_ROUTER_COMPANY', for example to provide some configuration file in the event of a matching DHCPOFFER (this is used for zero touch provisioning by many network hardware vendors)
  • the server receives a DHCPDISCOVER from a client with the vendor identifier 'ACME_ROUTER_COMPANY', maybe when the router is first booted
  • in the DHCPOFFER, the server has specified the vendor-specific options for that vendor identifier, in this case some option which specifies a URL.

The equivalent configuration in isc-dhcp-server looks somewhat like:

option space acme code width 1 length width 1;
option acme.config-url code 1 = text;

class 'acme router' {
    match if option vendor-class-identifier ~~ "^ACME_ROUTER_COMPANY$";
    vendor-option-space acme;
    option acme.config-url "https://blah/config_file";
}

These are just some initial thoughts, let me know if you'd like some extra information.

@pmazzini
Copy link
Contributor

pmazzini commented Feb 4, 2020

You are more than welcome to contribute to the project and it would be nice to have a ZTP plugin.

The library also provides functions to parse the options provided by some vendors:
https://github.com/insomniacslk/dhcp/tree/master/dhcpv4/ztpv4

And docs of where it is being used:
https://github.com/insomniacslk/dhcp/tree/master/dhcpv6/ztpv6

If you have any question please let me know. I am glad to help with it if needed.

@fitzy101
Copy link
Author

fitzy101 commented Feb 5, 2020

Thanks for the information, I'll start doing some work on this over the next few weeks and let you know if I have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants