Open Journey-x opened 10 months ago
cat /etc/systemd/network/00-bmc-eth0.network [DHCPv4] SendHostname=false UseHostname=false UseNTP=false UseDomains=false UseDNS=false [DHCP] IAID=0x81086007 ClientIdentifier=mac [IPv6AcceptRA] DHCPv6Client=true [DHCPv6] UseHostname=false UseNTP=false UseDomains=false UseDNS=false [Network] Gateway=70.176.0.1 Address=70.176.77.28/16 Domains=it.bmctest.com NTP=70.176.77.28 NTP=70.176.77.193 DHCP=ipv6 IPv6AcceptRA=true IPVersion=IPv4AndIPv6 DNS=70.176.77.28 DNS= DNS= LinkLocalAddressing=ipv6 [Link] MACAddress=fc:73:fb:d1:4f:90 [Match] Name=eth0
cat /etc/systemd/network/00-bmc-eth0.network [DHCPv4] SendHostname=false UseHostname=false UseNTP=false UseDomains=false UseDNS=false [DHCP] IAID=0x6973d8c ClientIdentifier=mac [IPv6AcceptRA] DHCPv6Client=true [DHCPv6] UseHostname=false UseNTP=false UseDomains=false UseDNS=false [Network] Gateway=70.176.0.1 Address=70.176.77.28/16 Domains=it.bmctest.com NTP=70.176.77.28 NTP=70.176.77.193 DHCP=ipv6 IPv6AcceptRA=true IPVersion=IPv4AndIPv6 DNS=70.176.77.28 DNS= DNS= LinkLocalAddressing=ipv6 [Link] MACAddress=fc:73:fb:d1:4f:90 Unmanaged=yes [Match] Name=eth0
使用该配置ip a 只能看到一个inet6
dbus 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 false emits-change writable .DHCPEnabled property s "xyz.openbmc_project.Network.Ethernet... emits-change writable .DefaultGateway property s "70.176.0.1" emits-change writable .DefaultGateway6 property s "70:176::da:1" emits-change writable .DomainName property as 0 emits-change writable .IPVersion property s "xyz.openbmc_project.Network.Ethernet... emits-change writable .IPv6AcceptRA property b false 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 "36:73:79:14:f4:3d" emits-change writable xyz.openbmc_project.Network.Neighbor.CreateStatic interface - - - .Neighbor method ss o -
错误日志: Jan 09 01:15:34 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:15:34 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:15:34 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:15:34 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:15:35 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:15:36 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:15:36 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:15:39 systemd-networkd[3111]: /etc/systemd/network/00-bmc-eth0.network:24: Unknown key name 'IPVersion' in section 'Network', ignoring. Jan 09 01:15:39 systemd-networkd[3111]: /etc/systemd/network/00-bmc-eth2.network:20: Unknown key name 'IPVersion' in section 'Network', ignoring. Jan 09 01:15:39 phosphor-network-manager[425]: Reloaded systemd-networkd Jan 09 01:15:39 systemd-networkd[3111]: eth2: found matching network '/etc/systemd/network/00-bmc-eth2.network', based on potentially unpredictable interface name. Jan 09 01:15:39 systemd-networkd[3111]: eth0: found matching network '/etc/systemd/network/00-bmc-eth0.network', based on potentially unpredictable interface name. Jan 09 01:15:39 systemd-networkd[3111]: eth0: Reconfiguring with /etc/systemd/network/00-bmc-eth0.network. Jan 09 01:15:39 systemd-networkd[3111]: eth0: DHCPv6 lease lost Jan 09 01:15:39 systemd-networkd[3111]: eth3: found matching network '/etc/systemd/network/00-bmc-eth3.network', based on potentially unpredictable interface name. Jan 09 01:15:39 systemd-networkd[3111]: eth1: found matching network '/etc/systemd/network/00-bmc-eth1.network', based on potentially unpredictable interface name. Jan 09 01:15:39 systemd-networkd[3111]: eth0: Could not set route: No route to host Jan 09 02:15:54 systemd-networkd[3449]: eth0: The error nu is -113 Jan 09 01:15:39 systemd-networkd[3111]: eth0: Failed Jan 09 01:15:39 systemd-timesyncd[217]: Network configuration changed, trying to establish connection. Jan 09 01:15:39 systemd-timesyncd[217]: Network configuration changed, trying to establish connection. Jan 09 01:15:39 systemd-timesyncd[217]: Network configuration changed, trying to establish connection. 问题定位到: systemd/src/network/networkd-route.c route_configure_handler_internal
如果设置如下ipv6,没有该问题(刚刚发现): 配置文件: cat /etc/systemd/network/00-bmc-eth0.network [DHCPv4] SendHostname=false UseHostname=false UseNTP=false UseDomains=false UseDNS=false [DHCP] IAID=0x1c054632 ClientIdentifier=mac [IPv6AcceptRA] DHCPv6Client=false [DHCPv6] UseHostname=false UseNTP=false UseDomains=false UseDNS=false [Network] Gateway=70.176.0.1 Gateway=fc80::1e3d:2fff:fe24:1 Address=70.176.77.193/16 Address=fc80::1e3d:2fff:fe24:55/64 DHCP=false IPv6AcceptRA=false IPVersion=IPv4AndIPv6 LinkLocalAddressing=ipv6 [Link] MACAddress=36:73:79:14:f4:3d [Match] Name=eth0
dbus: 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 false emits-change writable .DHCPEnabled property s "xyz.openbmc_project.Network.Ethernet... emits-change writable .DefaultGateway property s "70.176.0.1" emits-change writable .DefaultGateway6 property s "fc80::1e3d:2fff:fe24:1" emits-change writable .DomainName property as 0 emits-change writable .IPVersion property s "xyz.openbmc_project.Network.Ethernet... emits-change writable .IPv6AcceptRA property b false 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 "36:73:79:14:f4:3d" emits-change writable xyz.openbmc_project.Network.Neighbor.CreateStatic interface - - - .Neighbor method ss o -
日志:
Jan 09 01:20:46 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:20:46 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:20:46 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:20:46 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:20:47 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:20:48 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:20:48 phosphor-network-manager[425]: Wrote networkd file: /etc/systemd/network/00-bmc-eth0.network Jan 09 01:20:50 systemd-networkd[3128]: /etc/systemd/network/00-bmc-eth0.network:24: Unknown key name 'IPVersion' in section 'Network', ignoring. Jan 09 01:20:50 systemd-networkd[3128]: /etc/systemd/network/00-bmc-eth2.network:20: Unknown key name 'IPVersion' in section 'Network', ignoring. Jan 09 01:20:51 phosphor-network-manager[425]: Reloaded systemd-networkd Jan 09 01:20:51 systemd-networkd[3128]: eth2: found matching network '/etc/systemd/network/00-bmc-eth2.network', based on potentially unpredictable interface name. Jan 09 01:20:51 systemd-networkd[3128]: eth0: found matching network '/etc/systemd/network/00-bmc-eth0.network', based on potentially unpredictable interface name. Jan 09 01:20:51 systemd-networkd[3128]: eth0: Reconfiguring with /etc/systemd/network/00-bmc-eth0.network. Jan 09 01:20:51 systemd-networkd[3128]: eth0: DHCPv6 lease lost Jan 09 01:20:51 systemd-timesyncd[217]: Network configuration changed, trying to establish connection. Jan 09 01:20:51 systemd-networkd[3128]: eth1: found matching network '/etc/systemd/network/00-bmc-eth1.network', based on potentially unpredictable interface name. Jan 09 01:20:51 systemd-networkd[3128]: eth3: found matching network '/etc/systemd/network/00-bmc-eth3.network', based on potentially unpredictable interface name. Jan 09 01:20:51 systemd-timesyncd[217]: Network configuration changed, trying to establish connection. Jan 09 01:20:53 systemd-timesyncd[217]: Network configuration changed, trying to establish connection