-
Notifications
You must be signed in to change notification settings - Fork 178
Open
Description
Is this the right place to submit this?
- This is not a security vulnerability or a crashing bug
- This is not a question about how to use OpenBMC
- This is not a bug in an OpenBMC fork or a bug in code still under code review.
- This is not a request for a new feature.
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 DHCP4
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.87/24 brd 10.39.122.255 scope global dynamic eth0
valid_lft 41691sec preferred_lft 41691sec
inet6 fe80::9ec2:c4ff:fe53:7d77/64 scope link
valid_lft forever preferred_lft forever
root@board:/# ip ro | grep "eth0"
default via 10.39.122.1 dev eth0 src 10.39.122.87 metric 1024
10.38.18.70 via 10.39.122.1 dev eth0 src 10.39.122.87 metric 1024
10.38.18.71 via 10.39.122.1 dev eth0 src 10.39.122.87 metric 1024
10.38.20.10 via 10.39.122.1 dev eth0 src 10.39.122.87 metric 1024
10.39.122.0/24 dev eth0 scope link src 10.39.122.87 metric 1024
10.39.122.1 dev eth0 scope link src 10.39.122.87 metric 1024root@board:~# busctl introspect xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Collection.DeleteAll interface - - -
.DeleteAll method - - -
xyz.openbmc_project.Network.EthernetInterface interface - - -
.AutoNeg property b true emits-change
.DHCP4 property b true emits-change writable
.DHCP6 property b true emits-change writable
.DHCPEnabled property s "xyz.openbmc_project.Network.Ethernet... emits-change writable
.DefaultGateway property s "10.39.122.1" emits-change writable
.DefaultGateway6 property s "" emits-change writable
.DomainName property as 0 emits-change writable
.EmitLLDP property b false emits-change writable
.IPv6AcceptRA property b true emits-change writable
.InterfaceName property s "eth0" const
.LinkLocalAutoConf property s "xyz.openbmc_project.Network.Ethernet... emits-change writable
.LinkUp property b true emits-change
.MTU property u 1500 emits-change writable
.NICEnabled property b true emits-change writable
.NTPServers property as 0 emits-change writable
.Nameservers property as 3 "10.38.20.10" "10.38.18.70" "10.38.... emits-change
.Speed property u 1000 emits-change
.StaticNTPServers property as 0 emits-change writable
.StaticNameServers property as 0 emits-change writable
xyz.openbmc_project.Network.IP.Create interface - - -
.IP method ssys o -
xyz.openbmc_project.Network.MACAddress interface - - -
.MACAddress property s "88:2b:1e:ed:ad:e0" emits-change writable
xyz.openbmc_project.Network.Neighbor.CreateStatic interface - - -
.Neighbor method ss o -root@board:~# networkctl status 2
* 2: eth0
Link File: /usr/lib/systemd/network/99-default.link
Network File: /etc/systemd/network/00-bmc-eth0.network
`-/run/systemd/network/00-bmc-eth0.network.d/updated.conf
State: routable (configured)
Online state: online
Type: ether
Path: platform-1e660000.ethernet
Driver: ftgmac100
Hardware Address: 88:2b:1e:ed:ad:e0
Permanent Hardware Address: be:d3:a6:0f:18:ed
MTU: 1500 (min: 68, max: 1500)
QDisc: pfifo_fast
IPv6 Address Generation Mode: eui64
Number of Queues (Tx/Rx): 1/1
Auto negotiation: yes
Speed: 1Gbps
Duplex: full
Port: tp
Address: 10.39.122.87 (DHCP4 via 10.39.200.10)
fe80::9ec2:c4ff:fe53:7d77
Gateway: 10.39.122.1
DNS: 10.38.20.10
10.38.18.70
10.38.18.71
Search Domains: domain-platform.com
Activation Policy: up
Required For Online: yes
DHCP4 Client ID: 88:2b:1e:ed:ad:e0
DHCP6 Client DUID: DUID-EN/Vendor:0000ab11d51e3bc286783f91
Connected To: SwitchF97DB2 on port gi14Step 2 : Set a static IP (10.39.122.90) when DCHP is Enabled and print eth0 interface
curl -X PATCH --user root:0penBmc -H "Content-Type: application/json" -H "If-match: *" --insecure https://10.39.122.87/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 -d '{"IPv4StaticAddresses": [{"Address": "10.39.122.90", "Gateway": "10.39.122.1", "SubnetMask": "255.255.255.0"}]}'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
inet 10.39.122.87/24 brd 10.39.122.255 scope global secondary dynamic eth0
valid_lft 43199sec preferred_lft 43199sec
inet6 fe80::9ec2:c4ff:fe53:7d77/64 scope link
valid_lft forever preferred_lft forever
root@board:/# ip ro | grep "eth0"
default via 10.39.122.1 dev eth0 src 10.39.122.87 metric 1024
10.38.18.70 via 10.39.122.1 dev eth0 src 10.39.122.87 metric 1024
10.38.18.71 via 10.39.122.1 dev eth0 src 10.39.122.87 metric 1024
10.38.20.10 via 10.39.122.1 dev eth0 src 10.39.122.87 metric 1024
10.39.122.0/24 dev eth0 scope link src 10.39.122.90
10.39.122.1 dev eth0 scope link src 10.39.122.87 metric 1024root@board:~# busctl introspect xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Collection.DeleteAll interface - - -
.DeleteAll method - - -
xyz.openbmc_project.Network.EthernetInterface interface - - -
.AutoNeg property b true emits-change
.DHCP4 property b true emits-change writable
.DHCP6 property b true emits-change writable
.DHCPEnabled property s "xyz.openbmc_project.Network.Ethernet... emits-change writable
.DefaultGateway property s "10.39.122.1" emits-change writable
.DefaultGateway6 property s "" emits-change writable
.DomainName property as 0 emits-change writable
.EmitLLDP property b false emits-change writable
.IPv6AcceptRA property b true emits-change writable
.InterfaceName property s "eth0" const
.LinkLocalAutoConf property s "xyz.openbmc_project.Network.Ethernet... emits-change writable
.LinkUp property b true emits-change
.MTU property u 1500 emits-change writable
.NICEnabled property b true emits-change writable
.NTPServers property as 0 emits-change writable
.Nameservers property as 3 "10.38.20.10" "10.38.18.70" "10.38.... emits-change
.Speed property u 1000 .StaticNameServers property as 0 emits-change writable
xyz.openbmc_project.Network.IP.Create interface - - -
.IP method ssys o -
xyz.openbmc_project.Network.MACAddress interface - - -
.MACAddress property s "88:2b:1e:ed:ad:e0" emits-change writable
xyz.openbmc_project.Network.Neighbor.CreateStatic interface - - -
.Neighbor method ss o -root@board:~# networkctl status 2
* 2: eth0
Link File: /usr/lib/systemd/network/99-default.link
Network File: /etc/systemd/network/00-bmc-eth0.network
`-/run/systemd/network/00-bmc-eth0.network.d/updated.conf
State: routable (configured)
Online state: online
Type: ether
Path: platform-1e660000.ethernet
Driver: ftgmac100
Hardware Address: 88:2b:1e:ed:ad:e0
Permanent Hardware Address: be:d3:a6:0f:18:ed
MTU: 1500 (min: 68, max: 1500)
QDisc: pfifo_fast
IPv6 Address Generation Mode: eui64
Number of Queues (Tx/Rx): 1/1
Auto negotiation: yes
Speed: 1Gbps
Duplex: full
Port: tp
Address: 10.39.122.87 (DHCP4 via 10.39.200.10)
10.39.122.90
fe80::9ec2:c4ff:fe53:7d77
Gateway: 10.39.122.1
DNS: 10.38.20.10
10.38.18.70
10.38.18.71
Search Domains: domain-platform.com
Activation Policy: up
Required For Online: yes
DHCP4 Client ID: 88:2b:1e:ed:ad:e0
DHCP6 Client DUID: DUID-EN/Vendor:0000ab11d51e3bc286783f91
Connected To: SwitchF97DB2 on port gi14Step 3 : Test the static IP (10.39.122.90) just allocated. Ping to static IP from other machine.
chanh@HCM ~ % ping 10.39.122.90
PING 10.39.122.90 (10.39.122.90): 56 data bytes
64 bytes from 10.39.122.90: icmp_seq=0 ttl=63 time=19.019 ms
64 bytes from 10.39.122.90: icmp_seq=1 ttl=63 time=16.297 ms
64 bytes from 10.39.122.90: icmp_seq=2 ttl=63 time=13.962 ms
64 bytes from 10.39.122.90: icmp_seq=3 ttl=63 time=16.509 ms
64 bytes from 10.39.122.90: icmp_seq=4 ttl=63 time=16.139 ms
^C
--- 10.39.122.90 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 13.962/16.385/19.019/1.606 msStep 4 : Disable the DHCP and print eth0 interface
curl -X PATCH --user root:0penBmc -H "Content-Type: application/json" -H "If-match: *" --insecure https://10.39.122.90/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 -d '{"DHCPv4": {"DHCPEnabled": false}}'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.116.73/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 ro | grep "eth0"
10.39.122.0/24 dev eth0 scope link src 10.39.122.90
169.254.0.0/16 dev eth0 scope link src 169.254.64.89 metric 2048~# busctl introspect xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Collection.DeleteAll interface - - -
.DeleteAll method - - -
xyz.openbmc_project.Network.EthernetInterface interface - - -
.AutoNeg property b true emits-change
.DHCP4 property b false emits-change writable
.DHCP6 property b true emits-change writable
.DHCPEnabled property s "xyz.openbmc_project.Network.Ethernet... emits-change writable
.DefaultGateway property s "" emits-change writable
.DefaultGateway6 property s "" emits-change writable
.DomainName property as 0 emits-change writable
.EmitLLDP property b false emits-change writable
.IPv6AcceptRA property b true emits-change writable
.InterfaceName property s "eth0" const
.LinkLocalAutoConf property s "xyz.openbmc_project.Network.Ethernet... emits-change writable
.LinkUp property b true emits-change
.MTU property u 1500 emits-change writable
.NICEnabled property b true emits-change writable
.NTPServers property as 0 emits-change writable
.Nameservers property as 0 emits-change
.Speed property u 1000 emits-change
.StaticNTPServers property as 0 emits-change writable
.StaticNameServers property as 0 emits-change writable
xyz.openbmc_project.Network.IP.Create interface - - -
.IP method ssys o -
xyz.openbmc_project.Network.MACAddress interface - - -
.MACAddress property s "88:2b:1e:ed:ad:e0" emits-change writable
xyz.openbmc_project.Network.Neighbor.CreateStatic interface - - -
.Neighbor method ss o -~# networkctl status 2
* 2: eth0
Link File: /usr/lib/systemd/network/99-default.link
Network File: /etc/systemd/network/00-bmc-eth0.network
`-/run/systemd/network/00-bmc-eth0.network.d/updated.conf
State: routable (configured)
Online state: online
Type: ether
Path: platform-1e660000.ethernet
Driver: ftgmac100
Hardware Address: 88:2b:1e:ed:ad:e0
Permanent Hardware Address: be:d3:a6:0f:18:ed
MTU: 1500 (min: 68, max: 1500)
QDisc: pfifo_fast
IPv6 Address Generation Mode: eui64
Number of Queues (Tx/Rx): 1/1
Auto negotiation: yes
Speed: 1Gbps
Duplex: full
Port: tp
Address: 10.39.122.90
169.254.116.73
fe80::9ec2:c4ff:fe53:7d77
Activation Policy: up
Required For Online: yes
DHCP6 Client DUID: DUID-EN/Vendor:0000ab11d51e3bc286783f91
Connected To: SwitchF97DB2 on port gi14Step 5 : Test the static IP (10.39.122.90). Ping to static IP from other machine
~ % ping 10.39.122.90
PING 10.39.122.90 (10.39.122.90): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
^C
--- 10.39.122.90 ping statistics ---
6 packets transmitted, 0 packets received, 100.0% packet lossExpectation: At step 5, I can ping to the static IP.
Actually: At step 5, I can't ping to the static IP.
Version
The bmcweb version:
SRCREV = "02ea923f13de196726ac2f022766a6f80bee1c0a"
Additional Information
Other observations:
- From step 4 logs, We can see the
DefaultGatewayis empty after we disable the DHCP by Redfish command. - After step 4, If I set again the
DefaultGatewayvalue by dbus command, then the static IP will work fine.
busctl set-property xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.EthernetInterface DefaultGateway s "10.39.122.1"- Follow the document https://github.com/openbmc/phosphor-networkd/blob/master/docs/Network-Configuration.md#configure-dhcp, I tried to disable DHCP by the dbus command; then the issue doesn't happen
- I tried to trace the bmcweb's history, I saw my issue happens after the 743eb1c#diff-275215f5290a693394a85916c653f04c7cb99163f4d93fc6b1bf39e348d55620R1408 commit merged.
Metadata
Metadata
Assignees
Labels
No labels