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 ~]# 
相关推荐
h***01545 小时前
Docker启动安装nacos(详情讲解,全网最细)
运维·docker·容器
z***94845 小时前
Linux下安装Nginx服务及systemctl方式管理nginx详情
linux·运维·nginx
默恋~微凉5 小时前
Nginx(十一)——反向代理与负载均衡
运维·nginx·负载均衡
凉晓风5 小时前
Linux上TCP通信异常排查工具命令
linux·运维·tcp/ip
Xの哲學5 小时前
Linux 分区表深度技术剖析
linux·网络·算法·架构·边缘计算
码龄3年 审核中6 小时前
Linux record 03
java·linux·运维
星驰云6 小时前
记一次CentOS 硬盘损坏无法启动修复教程
linux·运维·centos
人工智能训练6 小时前
windows系统中的docker,xinference直接运行在容器目录和持载在宿主机目录中的区别
linux·服务器·人工智能·windows·ubuntu·docker·容器
q***47436 小时前
Windows 和 Linux 系统下,如何查看 Redis 的版本号?
linux·windows·redis
代码对我眨眼睛6 小时前
Ubuntu 系统 NVIDIA 显卡驱动自动化安装全流程
linux·ubuntu·自动化