今天早上2017-08-04,我打開虛擬機,使用遠程工具xshell對虛擬機進行鏈接,我發現鏈接不上去,而後我ifconfig,發現找不到ens33了,就剩一個本地迴環,看來是個人網絡出現了問題,而後我查看個人網絡狀態,發現了以下狀況:shell
[root@CT71 ~]# systemctl status network.service ● 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 Fri 2017-08-04 08:20:31 CST; 1min 44s ago Docs: man:systemd-sysv-generator(8) Process: 62726 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS) Process: 63183 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE) Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists Aug 04 08:20:31 CT71 network[63183]: RTNETLINK answers: File exists Aug 04 08:20:31 CT71 systemd[1]: network.service: control process exited, code=exited status=1 Aug 04 08:20:31 CT71 systemd[1]: Failed to start LSB: Bring up/down networking. Aug 04 08:20:31 CT71 systemd[1]: Unit network.service entered failed state. Aug 04 08:20:31 CT71 systemd[1]: network.service failed.
我在某度上找了好幾個答案,都沒有找到我能解決問題的答案,而後我進行Google,在一個博客上找到了我須要的答案,不知道是否是會針對於你們均可以,方法是關閉網絡管理,以下:網絡
systemctl stop NetworkManager
我在執行上面一步後就已經解決了問題,那個博客給出的答案還有下面的步驟,我沒有用:工具
systemctl disable NetworkManager Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service. Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service. Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
而後重啓網絡:oop
systemctl start network.service
能夠使用了:spa
[root@CT71 bin]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.17.251.180 netmask 255.255.0.0 broadcast 172.17.255.255 inet6 fe80::20c:29ff:fe84:b4 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:84:00:b4 txqueuelen 1000 (Ethernet) RX packets 3629648 bytes 315562709 (300.9 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2974 bytes 295864 (288.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.111.110 netmask 255.255.255.0 broadcast 192.168.111.255 inet6 fe80::febf:b561:4150:f3b0 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:84:00:be txqueuelen 1000 (Ethernet) RX packets 121771 bytes 11870451 (11.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 94155 bytes 20071976 (19.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 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 1 (Local Loopback) RX packets 90 bytes 6748 (6.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 90 bytes 6748 (6.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:b6:46:31 txqueuelen 1000 (Ethernet) 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