Linux(Centos 7.6)网卡信息没有了问题处理

1.问题现象

虚拟机打开后,使用ifconfig查看IP信息,虚拟机默认的网卡名称是ens33,ifconfig没有看到相关问题,远程连接工具Xshell也不能正常访问该虚拟机。

复制代码
[root@node1 ~]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:47:f9:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

2.解决方法

重启网络相关服务。

复制代码
[root@node1 ~]# systemctl restart NetworkManager
[root@node1 ~]# systemctl restart network.service

重启网络相关服务后ifconfig查看网络信息如下,可以正常连接。

复制代码
[root@node1 ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.118.128  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fe80::20c:29ff:feda:ad2d  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:da:ad:2d  txqueuelen 1000  (Ethernet)
        RX packets 10  bytes 1112 (1.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 19  bytes 3529 (3.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:47:f9:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@node1 ~]# 
相关推荐
Fᴏʀ ʏ꯭ᴏ꯭ᴜ꯭.8 小时前
Keepalived 双主(Active‑Active)模式
运维·服务器
HalvmånEver8 小时前
Linux:进程 vs 线程:资源共享与独占全解析(线程四)
java·linux·运维
yuanjj888 小时前
域格移芯平台模块Linux下RNDIS、ECM拨号及网口名称修改
linux·rndis·ecm·ttyacm
zzzsde8 小时前
【Linux】进程(2):进程概念与操作理解
linux·运维·服务器
郝学胜-神的一滴8 小时前
Linux Socket模型创建流程详解
linux·服务器·开发语言·网络·c++·程序人生
天才奇男子8 小时前
《深度解析HAProxy七层代理:原理、配置与最佳实践》
linux·运维·微服务·云原生
交换机路由器测试之路8 小时前
交换机专题:什么是ALS(激光器自动关断)
运维·网络·以太网·交换机·节能
学嵌入式的小杨同学8 小时前
【Linux 封神之路】文件操作 + 时间编程实战:从缓冲区到时间格式化全解析
linux·c语言·开发语言·前端·数据库·算法·ux
wifi chicken8 小时前
Linux wlan 之sniffer log 解密详解
linux·wlan·sniffer log·空口包·空口解密
济6178 小时前
ARM Linux 驱动开发篇----字符设备驱动开发(1)--字符设备驱动简介---- Ubuntu20.04
linux·嵌入式硬件