Closed leiyu-bytedance closed 3 years ago
The route table when the issue occurs:
# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.0.2.3 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
Submitted a patch to ipmid: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/45806
And together with https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-networkd/+/45634, the issue could be fixed.
Fixed by the above commits.
This issue could be reproduced in QEMU.
When the image is started in QEMU, it gets DHCP IP/gateway correctly, e.g.
Now let's set the static IP and a different gateway with below commands
After the network is reloaded, check lan print again:
We could see that the default gateway is not updated.
The network config looks like below:
We could see that there are two IPv4 gateways and it could be the root cause of the issue. So this issue is very similar to https://github.com/openbmc/phosphor-networkd/issues/40