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 ~]# 
相关推荐
YC运维1 小时前
Dockerfile实战案例详解
运维·docker·容器
一个响当当的名号1 小时前
一些主要应用和NAT
运维·服务器·网络
@小博的博客1 小时前
【Linux探索学习】第二篇Linux的基本指令(2)——开启Linux学习第二篇
linux·运维·学习
Java 码农3 小时前
Centos7 maven 安装
java·python·centos·maven
openHiTLS密码开源社区3 小时前
【密码学实战】openHiTLS passwd命令行:专业密码哈希生成工具
linux·密码学·哈希算法·ldap·密码策略·随机盐值
WTCLLB3 小时前
netgear r6220 路由器,刷openwrt后,系统备份还原
linux·网络·智能路由器·openwrt
迎風吹頭髮4 小时前
UNIX下C语言编程与实践38-UNIX 信号操作:signal 函数与信号捕获函数的编写
linux·c语言·unix
做运维的阿瑞5 小时前
Linux系统性能监控与故障定位实战:CPU/内存/I/O/网络
linux·运维·网络
驱动探索者5 小时前
车库到双子星:惠普的百年科技传奇
linux
wanhengidc5 小时前
云手机能够做些什么?
运维·服务器·人工智能·智能手机·云计算