linux虚拟机配置静态网络,解决centos7网络异常,ping不通

问题:ifconfig 无eth0。ping不通百度

解决办法:

               1. cd /etc/sysconfig/network-scripts/目录下的文件,一般系统的第1个网卡配置文件被命名为ifcfg-eth0,如果有第2或3个物理网卡,依次顺延eth1,eth2 ......

                

                    1.1 centos7中,ifcfg-eth0命名方式改为了ensX。改为eth0比较费劲,网上也有,感觉没有必要

                         

                2.onboot 改为yes,bootproto改为dhcp。然后重启网卡service network restart

                    

    参考博客图片:https://www.cnblogs.com/chenKnowledgeConllection/p/6945215.html

猜你喜欢

转载自blog.csdn.net/qq_33919114/article/details/80968713