Skip to content
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

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

Open
Howitzer105mm opened this issue Jun 25, 2019 · 0 comments
Assignees

Comments

@Howitzer105mm
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant