openbmc / phosphor-networkd

Apache License 2.0
18 stars 49 forks source link

Disabling DHCPv6 is disabling SLAAC also #76

Open swe12345 opened 1 month ago

swe12345 commented 1 month ago

Disabling DHCPv6 is disabling SLAAC also

Disabling DHCPv6 curl -k -H "Content-Type: application/json" -H "X-Auth-Token: ${bmc_token}" -X PATCH -d '{"DHCPv6": {"OperatingMode" : "Disabled"}}' https://$bmc/refish/v1/Managers/bmc/EthernetInterfaces/eth1

Seeing that IPv6AutoConfigEnabled in eth1 is being set to False

swe12345 commented 1 month ago

@ratagupt @williamspatrick

williamspatrick commented 4 weeks ago

Not sure why I am tagged here.

mdmillerii commented 4 weeks ago

Was it enabled before your patch? Was it in the network configuration file?

Search ipv6AcceptRa in https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/ethernet.hpp#L1143 to see how it's translated from redfish to dbus and this search in phosphor networkd https://github.com/search?q=repo%3Aopenbmc%2Fphosphor-networkd%20IPv6AcceptRA&type=code

prkatti1 commented 3 weeks ago

DHCPv6 has dependency on SLAAC as it does not provide default gateway. SLAAC has no dependency on DHCPv6. I think @swe12345 is trying following scenario: Pre-condition: When SLAAC is enabled & DHCPv6 is enabled, if user disables DHCPv6, it is disabling SLAAC also.

mdmillerii commented 3 weeks ago

The request was to actually verify it was reported and recognized to help isolate which components need to changed.

prkatti1 commented 3 weeks ago

Submitter is expecting, if DHCPv6 is disabled it should disable only DHCPv6 and not other functions. Fix is required in Redfish DHCPv6 disable function

chaul-ampere commented 2 weeks ago

Submitter is expecting, if DHCPv6 is disabled it should disable only DHCPv6 and not other functions. Fix is required in Redfish DHCPv6 disable function

bmcweb sets DHCPEnabled property on DBus as DHCPv6/OperatingMode is set (https://github.com/openbmc/bmcweb/blob/02ea923f13de196726ac2f022766a6f80bee1c0a/redfish-core/lib/ethernet.hpp#L1445). I guess in the scenario of the submitter, DHCPEnabled did not fall on any of these conditions (https://github.com/openbmc/phosphor-networkd/blob/dce7fe7732d9c839826ea0b0682eb94eaea6c486/src/ethernet_interface.cpp#L390), so ipv6AcceptRA was set to false as a result. Correct me if I'm wrong.

raviteja-b commented 2 weeks ago

Not sure why I am tagged here.

I think she wanted to tag @wak-google