openbmc / phosphor-networkd

Apache License 2.0
18 stars 49 forks source link

BMC allows us to configure reserved IP addresses like Loopback, Broadcast, Network ID & multicast IP addreses #45

Open swe12345 opened 2 years ago

swe12345 commented 2 years ago

BMC allows us to configure reserved IP addresses like Loopback, Broadcast, Network ID & multicast IP addreses. Expectation: Should throw an error while configuring these Reserved & non-routable IP addresses.

Tried configuration with 127.0.0.1, 10.5.5.255

swe12345 commented 2 years ago

@ratagupt

swe12345 commented 2 years ago

@sunharis

raviteja-b commented 2 years ago

As per discord discussion, Networkd validate the IP addresses as per the inet_pton criteria

seems its discussed in the past and the decision was to just make sure that the configured IP address is inet_pton compatible. seems this is working as expected @ratagupt @wak-google

prkatti1 commented 2 years ago

These IP addresses loopback, network-ID etc are valid IP addresses, but reserved IP addresses and have specific purpose. These are valid IPs, but is it valid to configure reserved IP addresses on interfaces?? I see after configuring reserved IPs, system wont be reachable via those IPs, if not routable why we are allowing these IPs to get configured?? Can you Pls share your opinion/suggestion is it expected behavior or we should not allow to configure reserved IPs on BMC n/w interfaces @ratagupt @wak-google

ratagupt commented 2 years ago

There will be too much of such validation checks, it is good to have those checks, I would assume the network admin should know that it should not configure such addresses on the interface.

akenliu commented 2 years ago

I find openbmc-test-automation has these test cases. https://github.com/openbmc/openbmc-test-automation/blob/master/redfish/managers/test_bmc_network_conf.robot -Configure Broadcast IP -Configure Multicast IP -Configure Loopback IP -Configure Network ID

rajesh-lega commented 2 years ago

@swe12345 is there any conclusion, whether Dev team plan for any fix for this issue? BMC doesnt know the multicast , broadcast and look-back addressed, its up to the user to properly configure the IP addresses to BMC, to me its expected one. if the boundary value is validated its fine

wak-google commented 1 year ago

Yes, we should be able to block these configurations as there is no reason for any of them to be assigned to an active adapter.

hemanthkumarm-ami commented 1 year ago

@wak-google any update on this.is there any timeline when this enhancement will be added?

hemanthkumarm-ami commented 1 year ago

@wak-google any update on this.is there any timeline when this enhancement will be added?

any update on this?

williamspatrick commented 1 year ago

I doubt this is being actively worked. You are more than welcome to contribute a solution on Gerrit.

sunharis commented 1 year ago

I see @wak-google has made these changes already. Set of changes like https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/60772 and https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/60771. These should get merged to fix this issue.

mdmillerii commented 1 year ago

The above (and possibly other) commits have been merged.