Open chnguyen-ampere opened 3 weeks ago
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
Try deleting the IP address '169.254.116.73', then test the ping command.
Hi @wangmin239 ; After step 4, I tried to delete the IP address 169.254.124.108
but The operation is not allowed
error.
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
Is your ping from the same subnet as the device?
Yes, In step 5, I'm pinging from another subnet as the device.
Did you assign a static default gateway or were you using one from DHCP while it was configured?
As you saw at step 2, I assigned a static default gateway 10.39.122.1
I see the interface address has net mask/24
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
- I tried to trace the bmcweb's history, I saw my issue happens after the 743eb1c#diff-275215f5290a693394a85916c653f04c7cb99163f4d93fc6b1bf39e348d55620R1408 commit merged. Talks about removing the static route when deleting the static IPv4 but you
@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'.
I don't see where you report the IPv4 route table.
Thank @mdmillerii for your suggestion! I updated ip ro
command report in Bug Description
, please help me review that!
@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'.
Yes @wangmin239 , I tried to use the ip
command to delete the IP address as you mentioned, and still can't ping to the static IP address 10.39.122.90
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 In step 3 the route was deleted
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.
In step 2 the routes are src .87 In step 3 the route was deleted
Hi @mdmillerii , Confirm that In step 4 the route was deleted, not step 3
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.
Yes @mdmillerii , Both the DHCP address and static address use the DefaultGateway
from /xyz/openbmc_project/network/eth0
object. When the DHCP is disabled, this DefaultGateway
property is also removed. That causes the static IP to not work.
When DHCP disable
Redfish command is called, the DefaultGateway
property will be removed at line https://github.com/openbmc/bmcweb/commit/743eb1c0cb44c955078daa2912767cd6d6bb6432#diff-275215f5290a693394a85916c653f04c7cb99163f4d93fc6b1bf39e348d55620R1408
You can see at Additional Information
, If I add again the DefaultGateway
property by dbus command, then the static IP will work fine.
Hi all, 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 https://github.com/openbmc/bmcweb/commit/743eb1c0cb44c955078daa2912767cd6d6bb6432#diff-275215f5290a693394a85916c653f04c7cb99163f4d93fc6b1bf39e348d55620R1408
Hi @chnguyen-ampere, Does the patch solve your issue?
then remove the
DefaultGateway
. 743eb1c#diff-275215f5290a693394a85916c653f04c7cb99163f4d93fc6b1bf39e348d55620R1408
Hi @chnguyen-ampere, Does the patch solve your issue?
then remove the
DefaultGateway
. 743eb1c#diff-275215f5290a693394a85916c653f04c7cb99163f4d93fc6b1bf39e348d55620R1408
Sorry @wangmin239 , May you confuse my comments. You can refer to the Additional Information
section for more detailed information. I tried to trace the bmcweb's history, I saw my issue happens after the https://github.com/openbmc/bmcweb/commit/743eb1c0cb44c955078daa2912767cd6d6bb6432#diff-275215f5290a693394a85916c653f04c7cb99163f4d93fc6b1bf39e348d55620R1408 commit merged.
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 https://github.com/openbmc/bmcweb/commit/743eb1c0cb44c955078daa2912767cd6d6bb6432#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.
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.