ifcf-ethx 问题

ifcf-ethx 问题

每次我跑步

service networkd restart

这就是我得到的

Shutting down interface eth0:  Device state: 3 (disconnected)
                                                           [  OK  ]
Shutting down interface eth1:                              [  OK  ]
Shutting down loopback interface:  Error org.freedesktop.NetworkManagerSettings.InvalidConnection: ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown
Error org.freedesktop.NetworkManagerSettings.InvalidConnection: ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown
Error org.freedesktop.NetworkManagerSettings.InvalidConnection: ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown
Error org.freedesktop.NetworkManagerSettings.InvalidConnection: ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown
                                                           [  OK  ]
Bringing up loopback interface:  Error org.freedesktop.NetworkManagerSettings.InvalidConnection: ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown
Error org.freedesktop.NetworkManagerSettings.InvalidConnection: ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown
Error org.freedesktop.NetworkManagerSettings.InvalidConnection: ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown
Error org.freedesktop.NetworkManagerSettings.InvalidConnection: ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown
                                                           [  OK  ]
Bringing up interface eth0:
** (process:12951): WARNING **: fetch_connections_done: error fetching user connections: (2) The name org.freedesktop.NetworkManagerUserSettings was not provided by any .service files.
Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1
state: activated
Connection activated
                                                           [  OK  ]

这是我的 ifcfg-eth0

# Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
DEVICE=eth0
BOOTPROTO=dhcp
DEFROUTE=yes
DHCPCLASS=
HWADDR=xxx
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
ONBOOT=yes
OPTIONS=layer2=1
PEERDNS=yes
PEERROUTES=yes
TYPE=Ethernet
UUID=xxx

还有我的 ifcfg-eth1

# Intel Corporation 82541PI Gigabit Ethernet Controller
DEVICE=eth1
HWADDR=xxx
ONBOOT=no

还有我的 ifcfg-lo

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

有任何想法吗?

答案1

我所能看到的最好的情况是,这是网络管理器与 ifdown/up 脚本交互的问题。我建议使用以下命令禁用网络管理器

service NetworkManager stop

看看是否能解决问题。如果您不使用无线连接,则无论如何都不需要使用网络管理器。如果有效,您可以使用以下命令永久禁用网络管理器

/sbin/chkconfig NetworkManager off

答案2

成立通过谷歌搜索对于错误:

# /etc/init.d/NetworkManager stop

Add a BOOTPROTO=dhcp if you use dhcp to

/etc/sysconfig/network-scripts/ifcfg- 或使用静态分配所需的值填充文件

# /etc/init.d/network start

If the above works for you, you can make it the changes survive a

重启:

# chkconfig NetworkManager off
# chkconfig network on

相关内容