我的虚拟机中的center os 7 的联网情况一直都是量子状态,没有规律可循,不知道哪次关机回来就不能上网了,ifconfig看不到真正网卡的信息,启动网卡体提示:
Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn'
查阅了网上结果,有N多中情况,这里只记录下我解决了的方法,感谢https://blog.csdn.net/weixin_39663255/article/details/80892774
1. 停服务
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.
2. 重启回来起服务
systemctl start network.service
[root@123bin]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500inet 192.168.10.128 netmask 255.255.0.0 broadcast 172.17.255.255inet6 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.9MiB) RX errors 0 dropped 0 overruns 0 frame 0TX packets 2974 bytes 295864 (288.9KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536inet 127.0.0.1 netmask 255.0.0.0inet6 ::1 prefixlen 128 scopeid 0x10<host>loop txqueuelen 1(Local Loopback) RX packets 90 bytes 6748 (6.5KiB) RX errors 0 dropped 0 overruns 0 frame 0TX packets 90 bytes 6748 (6.5KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
3. 测试 ifconfig
真正的网卡信息出来了
详情转载自:https://blog.csdn.net/weixin_39663255/article/details/80892774