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 ~]# 
相关推荐
-VE-1 小时前
myshell
linux·c++
喝醉酒的小白1 小时前
几种K8s运维管理平台对比说明
运维·容器·kubernetes
身在江湖的郭大侠3 小时前
Linux内核
linux·服务器
破-风5 小时前
linux的用法
linux·运维·服务器
涛ing8 小时前
32. C 语言 安全函数( _s 尾缀)
linux·c语言·c++·vscode·算法·安全·vim
__雨夜星辰__8 小时前
Linux 学习笔记__Day2
linux·服务器·笔记·学习·centos 7
大耳朵土土垚8 小时前
【Linux】日志设计模式与实现
linux·运维·设计模式
学问小小谢8 小时前
第26节课:内容安全策略(CSP)—构建安全网页的防御盾
运维·服务器·前端·网络·学习·安全
yaoxin5211239 小时前
第十二章 I 开头的术语
运维·服务器
ProgramHan9 小时前
1992-2025年中国计算机发展状况:服务器、电脑端与移动端的演进
运维·服务器·电脑