vmWare中centos7安裝docker后無法上網

現象:centos7中安裝docker后,重新啟動后,eno16777736沒有啟動,在centos7中使用ifconfig命令后 沒有展示eno16777736網口的信息。增加了docker0的信息。

ifconfig -a 可以看到eno16777736,但是沒有IP信息。

使用service network restart 啟動失敗

[root@localhost ~]# service network restart

Restarting network (via systemctl):? Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.


使用journalctl -xe命令

Nov 24 17:39:29 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1

Nov 24 17:39:29 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.

-- Subject: Unit network.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit network.service has failed.

--

-- The result is failed.

Nov 24 17:39:29 localhost.localdomain systemd[1]: Unit network.service entered failed state.

Nov 24 17:39:29 localhost.localdomain systemd[1]: network.service failed.

Nov 24 17:39:29 localhost.localdomain polkitd[910]: Unregistered Authentication Agent for unix-process:3908:129753 (system bus name :1.103, object path /org/freedesktop/PolicyKit1/Authenticat

使用ifup ?eno16777736 ?提示沒有該設備


處理方法:

臨時方案: 需要每次開機后設置,不能永久生效。估計是沒有讀取

eno16777736的配置文件,所以手工設置了一遍。

ww1.設置IP,發現網關內的可以相互訪問,但是不能ping通外網。

ifconfig eno16777736 192.168.0.141?

2.增加默認網關

route add default gw 192.168.106.2

3.添加nameserver

vi /etc/resolv.conf

# Generated by NetworkManager

nameserver 192.168.106.2

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容