-
Notifications
You must be signed in to change notification settings - Fork 320
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
dhcp: T3316: Support hostname, DUID and MAC address in reservation #2650
Conversation
@@ -316,6 +316,19 @@ | |||
</constraint> | |||
</properties> | |||
</leafNode> | |||
<leafNode name="identifier"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have this:
<leafNode name="duid">
<properties>
<help>DHCP unique identifier (DUID) to be sent by dhcpv6 client</help>
<valueHelp>
<format>duid</format>
<description>DHCP unique identifier (DUID)</description>
</valueHelp>
<constraint>
<validator name="ipv6-duid"/>
</constraint>
</properties>
</leafNode>
in interface/dhcpv6-options.xml.i
- maybe rename this node here and make it a common XML include block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a follow-up PR lined up for refactoring the XML blocks that include this one.
Couple of reasons I held back is because:
- the regex pattern for
ipv6-duid
validator is slightly different. It won't matchaa:bb:c:d
, but currentidentifier
node honors that. I need to have migration take care of that. ipv6-duid
is a full Python script. I think we can convert that into a simple shell script having${vyos_libexec_dir}/validate-value --regex ...
.
I plan to tackle them together (including migration).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm adding migration from identifier
to duid
in this PR instead of a followup PR. Converting this to draft till migration scripts are ready.
71ca7bf
to
012fe97
Compare
012fe97
to
70070c6
Compare
This needs to be applied after #2664. |
Reinstate support for hostname in DHCP reservation. Having `hostname` in allows for server-side assignment of hostname. This is useful for static lookup of hostname. Ensure that hostname is a valid FQDN (doesn't have underscore, etc.) Additionally, support using either of DUID or MAC address for reservation. While MAC address is typically used for IPv4, and DUID is typically used for IPv6, either of them can be used in IPv4 and IPv6 reservations in Kea.
Also, have the smoketest start with a clean CLI instance.
70070c6
to
8ed44ec
Compare
Change Summary
Reinstate support for hostname in DHCP reservation. Having
hostname
in allows for server-side assignment of hostname. This is useful for static lookup of hostname.Additionally, support using either of DUID or MAC address for reservation. While MAC address is typically used for IPv4, and DUID is typically used for IPv6, both can be used for both cases in Kea.
For details, see:
Types of changes
Related Task(s)
Related PR(s)
Component(s) name
dhcp-server, dhcpv6-server
Proposed changes
How to test
Smoketest result
Checklist: