Page MenuHomeVyOS Platform

DHCP client custom dhcp-options
Closed, ResolvedPublicFEATURE REQUEST

Description

Rationale: I'm trying to replace my ISP's router completely. It's a pretty well documented process. One of the things I need to do is to send a DHCP client request with vendor-class-identifier, dhcp-client-identifier and user-class options. I also need to request subnet-mask, routers, rfc3442-classless-static-routes.
Current behavior: dhcp-options of an interface are a closed-off list. It makes it so I can modify the vendor-class, and dhcp-client IDs, but not users-class.
Feature requested: Either one of those:

  • Add user-class, and request as an option
  • Add a similliar feature to dhcp-server's raw parameters, which would pass options to dhclient as-is

Details

Difficulty level
Easy (less than an hour)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Improvement (missing useful functionality)

Event Timeline

c-po changed the task status from Open to In progress.Nov 19 2023, 7:45 PM
c-po triaged this task as Normal priority.
c-po added a project: VyOS 1.4 Sagitta.
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).

dhcp-server's raw parameters, which would pass options to dhclient as-is

Unfortunately this was one of the worst design decisions made. Problem is that "raw" data is passed "raw" to the daemon meaning you need to know what you are doing. You can also make the daemon crash.

What do you mean by , and request as an option?

PR for 1.5 https://github.com/vyos/vyos-1x/pull/2506

This PR LGTM as it addresses my main need, although I think it'd be better to add support for the rest of options from RFC 2132 (eventually).
When talking about request as an option I'm talking about adding a way to add a request (or also request) statement to dhclient.conf. I need to requst subnet-mask, routers, rfc3442-classless-static-routes from my ISP, and the current implementation doesn't allow me to do that.

There's a valid reason to override the current default request clause in dhclient's config.

I need to requst subnet-mask, routers, rfc3442-classless-static-routes

Those are requested by default

https://github.com/vyos/vyos-1x/blob/260645d0c6ff078cc89601f3a586195902f9c18e/data/templates/dhcp-client/ipv4.j2#L39-L40