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

Unable to add a new IP address with a different gateway than the existing gateway #78

Open
swe12345 opened this issue Jan 13, 2025 · 2 comments

Comments

@swe12345
Copy link

swe12345 commented Jan 13, 2025

Problem:
Unable to add a new IP address with a different gateway than the existing gateway

Steps to recreate:
Add a new IP on eth1 with a different gateway than the existing IP using the curl command
curl -k -H "X-Auth-Token: $bmc_token" -H "Content-Type: application/json" -X PATCH -d '{"IPv4StaticAddresses":[{},{"Address": "xx.xx.xx.xx","SubnetMask": "xxx.xxx.xxx.xxx","Gateway":"yy.yy.yy.yy"}]}' https://$bmc/redfish/v1/Managers/bmc/EthernetInterfaces/eth1

Seeing that it is throwing 400 error and giving the error 'IPv4StaticAddresses/1/Gateway' couldn't be written as it is conflicting the value 'IPv4StaticAddresses/0/Gateway'

Expected Results:
Expecting that we must be able to modify the gateway.

@mdmillerii
Copy link

@liudkevich-iurii
Copy link

liudkevich-iurii commented Jan 28, 2025

Have similar issue.

I have a bmcweb with 75859: Fix setting gateways

When I have one address added via webui bmcweb sets GW from this address config as GW for all addresses on this interface:

"IPv4Addresses": [
    {
        "Address": "172.16.1.100",
        "AddressOrigin": "Static",
        "Gateway": "172.16.1.1",
        "SubnetMask": "255.255.255.0"
    }
],
"IPv4StaticAddresses": [
    {
        "Address": "172.16.1.100",
        "AddressOrigin": "Static",
        "Gateway": "172.16.1.1",
        "SubnetMask": "255.255.255.0"
    }
],

And if I try to add another IP with it's own GW -- all I have got will be 400 error about conflicting GW settings between new IP config and last saved IP config. BUT. after this error bmcweb will set all GW to 0.0.0.0:

"IPv4Addresses": [
    {
        "Address": "172.16.1.100",
        "AddressOrigin": "Static",
        "Gateway": "0.0.0.0",
        "SubnetMask": "255.255.255.0"
    }
],
"IPv4StaticAddresses": [
    {
        "Address": "172.16.1.100",
        "AddressOrigin": "Static",
        "Gateway": "0.0.0.0",
        "SubnetMask": "255.255.255.0"
    }
],

And after that I can successfully add same address, but any next attempt to add new IP will fail.

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

3 participants