T6648: dhcpv6-server: align stateless DHCPv6 options with stateful #3970
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
As we've expanded the number of DHCPv6 options supported at the
subnet
level, we've left out the ability to set these new options at theshared-network
level under thecommon-options
config key.Under the old ISC implementation,
common-options
was originally added to support stateless clients (DHCPv6 INFORMATION-REQUEST message). However, with Kea (and seemingly the old ISC implementation), it seems to also be useful as a way to specify options once that should be shared among all (stateful) subnets in the network. Additionally, in Kea, it seems the daemon will try to "infer" a subnet for stateless requests (looking at theinterface
parameter), and return those options.As such, for all intents and purposes we should support the same set of options at both levels. In addition, I am proposing using the same config syntax and losing the separate
common-options
name.Types of changes
Related Task(s)
https://vyos.dev/T6648
Related PR(s)
Component(s) name
service dhcpv6-server
Proposed changes
This PR update the DHCPv6 server config to use the same include,
option-v6.xml.in
, at theshared-network
level that is currently used at thesubnet
level. A migration script is also included to rename existing instances ofcommon-options
in peoples' configs tooption
.Old config:
New config:
With the new config, you can now add additional options such as
sntp-server
at theshared-network
level.How to test
For a refresher on stateless DHCPv6 configuration:
New config:
Once configured, you should see supported clients obtain their search domains (and possibly an NTP configuration) by sending a DHCPv6
INFORMATION_REQUEST
packet when they join the network. Keep in mind that Android clients do not support DHCPv6.Smoketest result
Checklist: