三種方法解決 Failed to start LSB: Bring up/down networking 問題
感謝朋友支持本博客。歡迎共同探討交流。因為能力和時間有限,錯誤之處在所難免。歡迎指正!
假設轉載。請保留作者信息。
博客地址:http://blog.csdn.net/qq_21398167
《—》
1、運行 service network restart 出現下面錯誤
Restarting network (via systemctl): Job for network.service failed. See ‘systemctl status network.service‘ and ‘journalctl -xn‘ for details.
2、依據上面的提示,運行“systemctl status network.service”輸出下面的類似信息:
[[email protected] ~]# systemctl status network.service
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since三 2014-11-05 15:30:10 CST; 1min 5s
ago
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11月 05 15:30:10 localhost.localdomain network[2920]: RTNETLINK answers: File exists
11月 05 15:30:10 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
11月 05 15:30:10 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
11月 05 15:30:10 localhost.localdomain systemd[1]: Unit network.service entered failed state.
3、解決的辦法(因為centos7中沒有70-persistent-net.rules這個文件,復制出來的虛擬機(vmware)須要改動mac地址),就是改動mac地址。
4、怎樣查看centos7復制出來的虛擬機的mac地址,須要運行 “ip addr”,輸出例如以下的類似信息:
[[email protected] ~]# ip addr
1: lo:
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
2: eno16777736:
link/ether00:0f:19:10:12:f1 brd ff:ff:ff:ff:ff:ff
inet 192.168.38.135/24 brd 192.168.38.255 scope global dynamic eno16777736
valid_lft 1681sec preferred_lft 1681sec
inet6 fe80::20c:11aa:ae11:4fe4/64 scope link
valid_lft forever preferred_lft forever
註意上面加粗加紅的字,這就是新的mac地址。
接下來就剩下改動ifcfg-XXX文件了。僅僅改動HWADDR就能夠了。接下來運行service network restart就正常了。
《二》
假設還是啟動失敗 查看是否有例如以下錯誤信息
Nov 23 22:09:07 hdcoe02 network[597]: Bringing up loopback interface: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo‘
Nov 23 22:09:07 hdcoe02 network[597]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo‘
Nov 23 22:09:08 hdcoe02 network[597]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo‘
Nov 23 22:09:08 hdcoe02 network[597]: Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo‘ Nov 23 22:09:08 hdcoe02 network[597]: [ OK ]
Nov 23 22:09:08 hdcoe02 network[597]: Bringing up interface enp0s25: Error: Connection activation failed: Connection ‘enp0s25‘ is not available on the device enp0s25 at this time.
設定開機啟動一個名為NetworkManager-wait-online服務,命令為:
systemctl enable NetworkManager-wait-online.service
《三》
我也是上面方法都測試完了 一直不成功,最後發現時由於在VMware 虛擬機裏面的系統 右上角顯示的連接都沒有連接上,盡管報錯都一樣,最後我在虛擬機設置裏面將原來的網絡適配器刪掉。又一次建了一個新的網絡適配器,這次進去,顯示連接成功。再用上面的方法,問題解決。
三種方法解決 Failed to start LSB: Bring up/down networking 問題