开启ens33网卡,解决虚拟机上不了网的问题,无法使用ping问题。。。

 

现象:网卡未启动,ping不了baidu.com

 

解决方案:

1.确定已使用NAT模式

选择vmware的NAT模式:导航栏“编辑”->“虚拟网络编辑器” ->NAT模式->NAT设置

2.进入配置文件更改配置保存并退出

cd /etc/sysconfig/network-scripts 
vi ifcfg-ens33 
i

ONBOOT=no改成yes (开机启动网卡)

按ESC退出编辑模式,:wq (保存并退出)

:wq

最后回车确定。

 

3.开启网卡

ifup ens33

 

4.检查确认

   tips:这里可以看到已经开启了ens33的网卡,并且ipv4的地址为192.168.47.131

  当然如果还是不行的话:

  4.1重启网络

systemctl  restart  network

  4.2关闭防火墙

systemctl stop firewalld
systemctl disable firewalld

 

 

鸣谢:

https://blog.csdn.net/qq_59222791/article/details/123995439

https://blog.csdn.net/lz20120808/article/details/103488186

 

posted on   shaun88  阅读(1066)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示