Failed to configure eth1 IP address
Closed this issue · 9 comments
Unexpected behavior you saw
With a fresh build, I am unable to configure the IP address of eth1 (NCSI)
Expected behavior
It shall be able to configure the IP address of eth1
To Reproduce
Steps to reproduce the behavior:
- Build and flash a fresh build of Intel-BMC/openbmc on CRB
- Boot into OS
- Run inband ipmi command to configure the IP:
ipmitool lan set 1 ipsrc static ipmitool lan set 1 ipaddr <ip> ipmitool lan set 1 netmask 255.255.255.0 ipmitool lan set 1 defgw ipaddr <gw-ip>
- Wait for a few seconds, check the IP address, it's empty.
# ipmitool lan print 1 Set in Progress : Set Complete Auth Type Support : Auth Type Enable : Callback : : User : : Operator : : Admin : : OEM : IP Address Source : Static Address IP Address : 0.0.0.0 Subnet Mask : 255.255.255.255 MAC Address : <mac> Default Gateway IP : 0.0.0.0 Default Gateway MAC : 00:00:00:00:00:00 802.1q VLAN ID : Disabled RMCP+ Cipher Suites : 3,17 Cipher Suite Priv Max : Not Available Bad Password Threshold : Not Available
- Connect BMC debug UART, configure the IP with dbus:
root@intel-obmc:~# busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network/eth1 xyz.openbmc_project.Network.IP.Create IP ssys "xyz.openbmc_project.Network.IP.Protocol.IPv4" "<ip>" 24 "<gw-ip>"
o "/xyz/openbmc_project/network/eth1/ipv4/88e39147"
The DBus call itself succeds, but the IP is not correctly configured, and after a few seconds, the D-Bus object /xyz/openbmc_project/network/eth1/ipv4/88e39147
disappears.
OpenBMC Information:
The master of Intel-BMC/openbmc (55c31e5)
Please also provide the CRB BIOS version.
BIOS Revision: WLYDCRB1.SYS.0015.D62.2003060128
"MAC Address : " There is no MAC in your platform.
- currently, if there is no MAC in chip, it should be random.
https://github.com/openbmc/linux/blob/dev-5.3/drivers/net/ethernet/faraday/ftgmac100.c#L211 - you also could set static mac.
https://github.com/Intel-BMC/openbmc/blob/0f1b8401f7058fc88fbcf06c7e98c5ebadc23212/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check
I double checked in my side. Don't find such issue. System is working well.
_root@intel-obmc:# udhcpc -i eth1# ifconfig
udhcpc: started, v1.31.0
udhcpc: sending discover
udhcpc: sending select for REMOVED-IP-ADDR
udhcpc: lease of REMOVED-IP-ADDR obtained, lease time 21600
/etc/udhcpc.d/50default: Adding DNS xx.xx.2.5
/etc/udhcpc.d/50default: Adding DNS xx.xx.xx.228
/etc/udhcpc.d/50default: Adding DNS xx.xx.xx.xx
root@intel-obmc:
eth0 Link encap:Ethernet HWaddr AE:58:5B:45:A6:6F
inet addr:REMOVED-IP-ADDR Bcast:REMOVED-IP-ADDR Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1829 errors:0 dropped:123 overruns:0 frame:0
TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:195566 (190.9 KiB) TX bytes:33231 (32.4 KiB)
Interrupt:19
eth1 Link encap:Ethernet HWaddr 32:48:3A:53:99:52
inet addr:REMOVED-IP-ADDR Bcast:REMOVED-IP-ADDR Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2016 errors:0 dropped:119 overruns:0 frame:0
TX packets:516 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:204086 (199.3 KiB) TX bytes:53067 (51.8 KiB)
Interrupt:20_
NOTE: 1. Please remove asd, your met build issue.
https://github.com/Intel-BMC/openbmc/blob/intel/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass#L14
2. Please make sure using the correct config based your CRB platform, take wht for example.
export TEMPLATECONF=meta-openbmc-mods/meta-wht/conf/
Please remove the whole build folder if you changed the config.
3. Please make the drive working well.
root@intel-obmc:~# cat /sys/class/net/eth1/address
32:48:3a:53:99:52
OK, will try to clean the build dir and try a clean build.
From your log, both eth0 and eth1 are connected. Please be noted that this issue occurs when only eth1 (NCSI) is connected, while eth0 is disconnected.
Still working well, even disconnect the eth0.
BTW: Please make sure your system could get MAC address correctly.
What I observe is that the issue occurs on both eth0 and eth1.
Below is how I reproduce the issue:
- Do a factory reset, so that BMC's settings are default
- Connect to BMC's debug UART, check the default eth configs:
Be noted
# cat /etc/systemd/network/00-bmc-eth1.network [Match] Name=eth1 [Link] MACAddress=<xxx> Unmanaged=yes [Network] LinkLocalAddressing=yes IPv6AcceptRA=false DHCP=false [DHCP] ClientIdentifier=mac UseDNS=true UseNTP=true UseHostname=true SendHostname=true
Unmanaged=yes
is the root cause. - Assign an IP address, e.g.
The expected behavior is that the IP will be added to eth1. But no IP is added.
# busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network/eth1 xyz.openbmc_project.Network.IP.Create IP ssys "xyz.openbmc_project.Network.IP.Protocol.IPv4" "192.168.1.101" 24 "192.168.1.1"
Checking the config:We can see that the IP is correctly written into the config, but due to# cat /etc/systemd/network/00-bmc-eth1.network [Match] Name=eth1 [Link] MACAddress=<xxx> Unmanaged=yes [Network] LinkLocalAddressing=yes IPv6AcceptRA=false DHCP=false [Address] Address=192.168.1.101/24 [DHCP] ClientIdentifier=mac UseDNS=true UseNTP=true UseHostname=true SendHostname=true
Unmanaged=yes
, systemd-networkd will not use this config file.
Seems there is an issue on setting the static ip addr.
You could use DHCP get the ip address.
It should not block you.
This issue is gone in the update
branch, revision d2bd6ff
Close.