centos7.2配置ip

在配置网络之前我们先要知道centos的网卡名称是什么,centos7不再使用ifconfig命令,可通过命令 ip addr查看

a)修改网卡配置文件 vi /etc/sysconfig/network-scripts/ifcfg-eno16777736    (最后一个为网卡名称)

centos7.2配置ip

 配置动态ip:

centos7.2配置ip

 修改网卡配置文件后,重启network则会生成uuid

 

 配置静态ip:

  centos7.2配置ip

 

    d) 重启network #systemctl network restart

   e) 查看ip   #ip addr

附:以上方法无效则再执行以下操作

vi /etc/sysconfig/network

centos7.2配置ip

 

上一篇:文件查找工具和打包压缩工具


下一篇:Linux网络相关配置