Not yet in stonking archive - netplan.io is currently 1.2.2-3 (Debian
sync), which still emits the legacy [DHCP] block.
Devel-first requirement - lesson learned.
I have prepared and attached the debdiff for stonking (1.2.2-3ubuntu1)
alongside resolute to satisfy the SRU policy. All generator test suites
pass with 0 regressions.
** Description changed:
[ Impact ]
- On Ubuntu 26.04 (Resolute) and any system running systemd >= 259, setting
'dhcp-identifier: mac' in netplan YAML configuration is ignored by
systemd-networkd.
+ On Ubuntu 26.04 (Resolute), Ubuntu 26.10 (Stonking), and any system running
systemd >= 259, setting 'dhcp-identifier: mac' in netplan YAML configuration is
ignored by systemd-networkd.
The Netplan networkd backend (src/networkd.c) writes DHCP client
configuration under the legacy '[DHCP]' section header dating back to
2017. While older systemd versions aliased '[DHCP]' to '[DHCPv4]', in
systemd-networkd >= 259 configuration parser precedence and modern drop-
ins strictly prioritize '[DHCPv4]'. Consequently, settings written under
'[DHCP]' (such as ClientIdentifier=mac, RouteMetric=, UseMTU=,
- UseRoutes=) are ignored or overridden by the default networkd
- configuration. The DHCPv4 client falls back to DUID, breaking MAC-based
- DHCP reservations and static lease assignments in enterprise networks.
+ UseRoutes=) are ignored or overridden by default networkd configuration.
+ The DHCPv4 client falls back to DUID, breaking MAC-based DHCP
+ reservations and static lease assignments in enterprise networks.
[ Fix ]
Update Netplan's networkd generator in src/networkd.c to emit canonical
'[DHCPv4]' section headers for IPv4 DHCP settings and '[DHCPv6]' section
headers for IPv6 DHCP settings instead of the obsolete combined '[DHCP]'
section.
[ Test Plan ]
1. Create a netplan configuration with dhcp4 and dhcp-identifier set to mac:
network:
version: 2
ethernets:
eth0:
dhcp4: true
dhcp-identifier: mac
2. Run `netplan generate`.
3. Inspect the generated systemd-networkd file in
`/run/systemd/network/10-netplan-eth0.network`.
- Verify that `[DHCPv4]` is emitted instead of `[DHCP]`.
- Verify that `ClientIdentifier=mac` is correctly placed under `[DHCPv4]`.
4. Apply network configuration (`netplan apply`) and verify via `networkctl
status eth0` that systemd-networkd initiates DHCPv4 negotiation using the
hardware MAC address instead of DUID.
5. Verify test suite passes:
`pytest-3 tests/generator/test_dhcp_overrides.py`
- All 185 networkd generator test cases pass with 0 regressions.
+ All networkd generator test cases pass with 0 regressions.
[ Where problems could occur ]
The change only modernizes section headers in generated systemd-networkd
`.network` files from `[DHCP]` to `[DHCPv4]` and `[DHCPv6]`. Both sections have
been supported in systemd since v244 (Ubuntu 20.04 LTS Focal). Therefore,
backwards compatibility across all supported Ubuntu releases is fully
preserved. Potential regression risk is minimal.
[ Other Info ]
- - Upstream Pull Request: https://github.com/canonical/netplan/pull/617
- - Target development release: Ubuntu 26.04 (Resolute)
- - debdiff attached: netplan.io_1.2-1ubuntu5.1_to_1.2-1ubuntu5.2.debdiff
- - Upstream CI status: all 17 checks green on PR #617
+ - Upstream Pull Request: https://github.com/canonical/netplan/pull/617 (all
17 CI checks pass)
+ - Development series (stonking): 1.2.2-3ubuntu1 debdiff attached to fulfill
SRU development release policy.
+ - Stable release (resolute): Target SRU debdiff package version is
1.2-1ubuntu5.2 (attached).
+ - Regression verification: 0 regressions across networkd generator test
suites on both series.
--- [ Original Report ]
Version:
--------
Ubuntu 26.04 Server using netplan and systemd v259'
Summary:
--------
'dhcp-identifier: mac' is stored in the netplan YAML and shows up in netplan
get, but it does not change the live DHCPv4 client ID on Ubuntu 26.04
Root Cause:
-----------
Netplan 1.2 writes 'ClientIdentifier=mac' under the old [DHCP] section
systemd 259 only reads that setting from [DHCPv4], so it keeps the default
(use DUID)
networkctl cat @IFACE shows an empty [DHCPv4] section and MAC-based DHCP
reservations fail after reboot
Local Workaround:
-----------------
I put 'ClientIdentifier=mac' in /etc/systemd/networkd.conf.d/ under [DHCPv4]
and everything worked again
** Tags added: stonking
** Patch added: "netplan.io 1.2.2-3ubuntu1 debdiff for stonking"
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2167907/+attachment/6006641/+files/netplan.io_1.2.2-3ubuntu1_stonking.debdiff
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2167907
Title:
'dhcp-identifier: mac' in netplan .yml config is ignored by systemd
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/2167907/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs