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

你可能感兴趣的:(vmWare中centos7安装docker后无法上网)