当执行以下操作时,会报如下错误
[root@web1 ~]# nmcli connection up ens33
错误:激活连接失败:No suitable device found for this connection.
解决方法:
使用以下四条命令:
chkconfig NetworkManager off #禁止开机启动
chkconfig network on
service NetworkManager stop
service network start
然后使用
[root@web1 ~]# ifup ens33
RTNETLINK answers: File exists
[root@web1 ~]#
[root@web1 ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.4.100 netmask 255.255.255.0 broadcast 192.168.4.255
inet6 fe80::20c:29ff:fe5b:dde4 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:5b:dd:e4 txqueuelen 1000 (Ethernet)
RX packets 15 bytes 3085 (3.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 33 bytes 4333 (4.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
从以上图可以看错,网卡已经开启,但是nmcli命令使用不了,使用时会报网络管理器未开启的错误,如果想使用nmcli命令,需要配置如下:
[root@client ~]# service NetworkManager status
[root@client ~]# service NetworkManager start
以上都是网上找的总结,如有更好的方法,欢迎大家讨论
来源:CSDN
作者:f5500
链接:https://blog.csdn.net/f5500/article/details/104129239