CentOS7下启用网卡
[root@localhost network-scripts]# ls ifcfg-ens99 ifdown-ippp ifdown-sit ifup-bnep ifup-plip ifup-Team network-functions-ipv6 ifcfg-lo ifdown-ipv6 ifdown-Team ifup-eth ifup-plusb ifup-TeamPort ifdown ifdown-isdn ifdown-TeamPort ifup-ib ifup-post ifup-tunnel ifdown-bnep ifdown-post ifdown-tunnel ifup-ippp ifup-ppp ifup-wireless ifdown-eth ifdown-ppp ifup ifup-ipv6 ifup-routes init.ipv6-global ifdown-ib ifdown-routes ifup-aliases ifup-isdn ifup-sit network-functions
出现的问题
[root@localhost ~]# 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 三 2017-11-01 14:55:22 CST; 11s ago Docs: man:systemd-sysv-generator(8) Process: 5336 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS) Process: 7611 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE) 11月 01 14:55:22 localhost.localdomain network[7611]: RTNETLINK answers: Fil... 11月 01 14:55:22 localhost.localdomain network[7611]: RTNETLINK answers: Fil... 11月 01 14:55:22 localhost.localdomain network[7611]: RTNETLINK answers: Fil... 11月 01 14:55:22 localhost.localdomain network[7611]: RTNETLINK answers: Fil... 11月 01 14:55:22 localhost.localdomain network[7611]: RTNETLINK answers: Fil... 11月 01 14:55:22 localhost.localdomain network[7611]: RTNETLINK answers: Fil... 11月 01 14:55:22 localhost.localdomain systemd[1]: network.service: control ... 11月 01 14:55:22 localhost.localdomain systemd[1]: Failed to start LSB: Brin... 11月 01 14:55:22 localhost.localdomain systemd[1]: Unit network.service ente... 11月 01 14:55:22 localhost.localdomain systemd[1]: network.service failed. Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# systemctl stop NetworkManager [root@localhost ~]# 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.
禁止网络和启用网络命令:
[root@localhost network-scripts]# systemctl stop NetworkManager
[root@localhost network-scripts]# systemctl start NetworkManager
[root@localhost network-scripts]# service network restart
Restarting network (via systemctl): [ 确定 ]
posted on 2017-11-01 15:17 clearriver 阅读(16666) 评论(0) 编辑 收藏 举报