我们在“HP Proliant DL380p Gen8”上安装了 CentOS 的新副本,以太网接口出现了这种奇怪的、波动的连接问题,接口要么正常工作,要么完全死机。
以下是一些命令的输出:
Systemctl状态网络
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-04-15 03:38:16 EDT; 3min 18s ago
Docs: man:systemd-sysv-generator(8)
Process: 6557 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
Apr 15 03:38:14 localhost.localdomain systemd[1]: Starting LSB: Bring up/down networking...
Apr 15 03:38:15 localhost.localdomain network[6557]: Bringing up loopback interface: [ OK ]
Apr 15 03:38:15 localhost.localdomain network[6557]: Bringing up interface eno1: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eno1 does not seem to be present, delaying initialization.
Apr 15 03:38:15 localhost.localdomain network[6557]: [FAILED]
Apr 15 03:38:16 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
Apr 15 03:38:16 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
Apr 15 03:38:16 localhost.localdomain systemd[1]: Unit network.service entered failed state.
Apr 15 03:38:16 localhost.localdomain systemd[1]: network.service failed.
ifconfg-a
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ip 一个
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
lspci -nn|grep 网络
03:00.0 Ethernet controller [0200]: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe [14e4:1657] (rev 01)
03:00.1 Ethernet controller [0200]: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe [14e4:1657] (rev 01)
03:00.2 Ethernet controller [0200]: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe [14e4:1657] (rev 01)
03:00.3 Ethernet controller [0200]: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe [14e4:1657] (rev 01)
IP链接
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
纳米克
NAME UUID TYPE DEVICE
eno1 2c3315f0-9a56-4c6f-9cab-a55e3a0f7f2d ethernet --
eno2 657324ea-5e27-4d31-a6ce-314227330869 ethernet --
eno3 6c53e522-01ce-4807-bfe1-46266cb45e29 ethernet --
eno4 e7cebe37-3d20-4e34-b951-ea5901c36a1c ethernet --
/etc/sysconfig/network-scripts/ifcfg-eno1
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="eno1"
UUID="2c3315f0-9a56-4c6f-9cab-a55e3a0f7f2d"
DEVICE="eno1"
ONBOOT=yes
HWADDR=2c:76:8a:5d:ea:b8
nmcli 设备状态
DEVICE TYPE STATE CONNECTION
lo loopback unmanaged --
nmcli 设备状态
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY: --
IP6.ADDRESS[1]: ::1/128
IP6.GATEWAY: --
lspci-vv
日志ctl -b 0 | grep 设备
日志ctl -b 0 | grep 内核
日志ctl -b 0 | grep 模块
答案1
Centos 通常会禁用网络,除非您在安装时手动启用。如果您的物理网络链路连接正常,您可以使用ip link
命令检查链路。您可以在以下路径中找到的每个接口配置中ONBOOT=no
设置线路。ONBOOT=yes
/etc/sysconfig/network-scripts/ifcfg-xxxx
nmcli c
如果这是较新的 centos 7.x,您可以通过键入命令来获取更多信息
答案2
重命名接口文件名。
mv ifcfg-en01 ifcfg-eno1