修改虚拟机Centos7的网络静态ip地址

 

root用户,进入网卡:

[[email protected] user]#  vim /etc/sysconfig/network-scripts/ifcfg-ens33

注意:我的网卡是ifcfg-ens33,不同系统可能网卡不同,查看网卡可以用ifconfig

 

 

修改网卡设置:

1.设置静态ip地址“static”

2.填入自己的IPADDR,我这里是“192.168.0.102”

3.配置网关、子网、DNS
修改虚拟机Centos7的网络静态ip地址

 

重启网卡:
[[email protected] user]# systemctl restart network.service