-
Notifications
You must be signed in to change notification settings - Fork 137
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
Can't ping to the static IP after disabling DHCP via Redfish #294
Comments
Hi all, I'm looking forward to receiving any comments from everyone on my issue. I wonder if I missed anything in the Bug Description. |
Try deleting the IP address '169.254.116.73', then test the ping command. |
Is your ping from the same subnet as the device? Did you assign a static default gateway or were you using one from DHCP while it was configured? I see the interface address has net mask/24 |
Hi @wangmin239 ; After step 4, I tried to delete the IP address root@board:~# ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 88:2b:1e:ed:ad:e0 brd ff:ff:ff:ff:ff:ff
inet 169.254.124.108/16 brd 169.254.255.255 scope link eth0
valid_lft forever preferred_lft forever
inet 10.39.122.90/24 brd 10.39.122.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::9ec2:c4ff:fe53:7d77/64 scope link
valid_lft forever preferred_lft forever
root@board:~# busctl tree xyz.openbmc_project.Network | grep "eth0"
|- /xyz/openbmc_project/network/eth0
| |- /xyz/openbmc_project/network/eth0/_310_2e39_2e122_2e90_2f24
| |- /xyz/openbmc_project/network/eth0/_3169_2e254_2e124_2e108_2f16
| |- /xyz/openbmc_project/network/eth0/_66e80_3a_3a9ec2_3ac4ff_3afe53_3a7d77_2f64
| |- /xyz/openbmc_project/network/eth0/dhcp4
| `- /xyz/openbmc_project/network/eth0/dhcp6
root@board:~# busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0/_3169_2e254_2e124_2e108_2f16 xyz.openbmc_project.Object.Delete Delete
Call failed: The operation is not allowed |
Yes, In step 5, I'm pinging from another subnet as the device.
As you saw at step 2, I assigned a static default gateway
Yes, at step 2, I assigned a "SubnetMask" is "255.255.255.0" |
I don't see where you report the IPv4 route table. The commit you mentioned
|
@chnguyen-ampere The command 'busctl call' maybe haven't enough privilege to delete ip address. Instead of using 'ifconfig' command to reconfigure the network interface 'eth0'. |
Thank @mdmillerii for your suggestion! I updated |
Yes @wangmin239 , I tried to use the root@board:~# ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 88:2b:1e:ed:ad:e0 brd ff:ff:ff:ff:ff:ff
inet 169.254.222.221/16 brd 169.254.255.255 scope link eth0
valid_lft forever preferred_lft forever
inet 10.39.122.90/24 brd 10.39.122.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::9ec2:c4ff:fe53:7d77/64 scope link
valid_lft forever preferred_lft forever
root@board:~# ip addr del 169.254.222.221/16 dev eth0
root@board:~# ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 88:2b:1e:ed:ad:e0 brd ff:ff:ff:ff:ff:ff
inet 10.39.122.90/24 brd 10.39.122.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::9ec2:c4ff:fe53:7d77/64 scope link
valid_lft forever preferred_lft forever |
@chnguyen-ampere It seems like the eth0's SubNetMask should be set '255.255.255.0',while the eth0's inet is '10.39.122.90/16 ' as the log shown. |
169.254 is for link local addressing and not interfering. In step 2 the routes are src .87 The gateway add chose the DHCP assigned address and was deleted when that address was. Not sure if assigning a source would have avoided this. |
Hi @mdmillerii , Confirm that In step 4 the route was deleted, not step 3
Yes @mdmillerii , Both the DHCP address and static address use the When You can see at |
Hi all, I would like to propose a solution to improve this situation. |
Hi @chnguyen-ampere, Does the patch solve your issue?
|
Sorry @wangmin239 , May you confuse my comments. You can refer to the I would like to propose a solution to improve this situation, When handling the DHCP patch, we should check if any other IPv4 address existed. If there is no IP address, then remove the DefaultGateway. The code will be implemented at line 743eb1c#diff-275215f5290a693394a85916c653f04c7cb99163f4d93fc6b1bf39e348d55620R1408 |
Hi @Howitzer105mm, Do you have any comments on this issue? I wonder if my behavior is correct or not? |
@chnguyen-ampere Thanks,I got it. |
After adding a static IPv4 address, if patch the DHCP disabling, then DefaultGateway is deleted. That makes the static IPv4 address fail. This commit is a temporary fix. The issue was opened a ticket to github [1]. I will update the better solution after discussing it with community maintainers. [1] openbmc/bmcweb#294 Signed-off-by: Chanh Nguyen <[email protected]>
Is this the right place to submit this?
Bug Description
I tried to use Redfish command to set a Static IPv4, After that I tried to disable the DHCP then the Static IPv4 is died (can't ping to the Static IPv4)
Step 1 : Check the
eth0
interface, It is 10.39.122.87 DHCP4Step 2 : Set a static IP (
10.39.122.90
) when DCHP is Enabled and printeth0
interfaceStep 3 : Test the static IP (
10.39.122.90
) just allocated. Ping to static IP from other machine.Step 4 : Disable the DHCP and print
eth0
interfaceStep 5 : Test the static IP (10.39.122.90). Ping to static IP from other machine
Expectation: At step 5, I can ping to the static IP.
Actually: At step 5, I can't ping to the static IP.
Version
Additional Information
Other observations:
DefaultGateway
is empty after we disable the DHCP by Redfish command.DefaultGateway
value by dbus command, then the static IP will work fine.The text was updated successfully, but these errors were encountered: