dhcp must be specified even if irrelevant / no way to use "default" dhcp status

Bug #1796954 reported by zach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

There is no way in netplan (that I can see) to defer to the "default" DHCP configuration for a given renderer.

This means that a simple configuration that intends to only modify a particular property (such as MTU) will fail. See e.g. the following:

network:
  version: 2
  ethernets:
    enp101s0:
      mtu: 9000

The above configuration generates the following:
cat /run/NetworkManager/system-connections/netplan-enp101s0
[connection]
id=netplan-enp101s0
type=ethernet
interface-name=enp101s0

[ethernet]
wake-on-lan=0

[802-3-ethernet]
mtu=9000

[ipv4]
method=link-local

[ipv6]
method=ignore

This surprising (to me at least) because my expectation was that not-specified keys would defer to the renderer's default (which for NetworkManager is to use DHCP).

Instead, though it doesn't seem to be well documented, it is required to set the dhcp4 and/or dhcp6 keys even if that isn't the configuration setting one wants to alter. That is, not setting dhcp keys appears to be equivalent to setting them to be 'false'.

There seems to be no way to specify that dchp (or possibly other configuration settings that one might not want to set) should be left as the default.

Maybe NetworkManager just doesn't expose a way to leave things as "default". And given that defaulting dhcp to 'false' is the current behavior, changing it is a bad idea and would break people's configurations.

But this should probably be more clearly documented. Also, ideally there would be a way to specify "just use the default dhcp settings". As-is it's too easy for newbies (such as me :) to totally bork their network settings when just trying to change an unrelated parameter like the MTU.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.