Skip to content

The DHCPEnabled property within the EthernetInterfaces YAML is not a boolean #6

@Howitzer105mm

Description

@Howitzer105mm

While implementing the Redfish DHCP controls I found that the DHCPEnabled property is incapable of supporting the Redfish feature set.

The DHCPEnabled property is described as:

name: DHCPEnabled
type: boolean
Redfish allows, and systemd allows, greater control than just Statically assigned or Both Dynamically assigned.
Systemd tests for the following values:
"any boolean false (i.e. 0, false, f, no, n, none, or off)": static addressing only
"any boolean true (i.e. 1, true, t, yes, y, on)": enable DHCP for IPv4 and IPv6
"ipv4" or "v4": DHCP for IPv4 only, static IPv6
"ipv6" or "v6": DHCP for IPv6 only, static IPv4
"both": enable DHCP for IPv4 and IPv6

Systemd reads these values from the 00-bmc-ethx.network files [Network] section:
[Match]
Name=eth1
[Network]
LinkLocalAddressing=yes
IPv6AcceptRA=true
DHCP=false

To avoid having to make a change to both phosphor-network and systemd, it is preferred to modify the EthernetInterface property for DHCPEnabled to be an enum type, allowing it to accept a subset of the values currently accepted by systemd. The subset should be: false, true, ipv4, ipv6. I have manually updated the 00-bmc-ethx.network file with these four values and have determined that the ethernet interface does perform the correct DHCP behavior for each.

I plan to make this change and to submit it for review.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions