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
 

相关文章:

  • 2021-10-24
  • 2022-02-27
  • 2021-09-21
  • 2022-12-23
  • 2021-12-27
  • 2021-05-17
  • 2021-11-29
猜你喜欢
  • 2021-11-17
  • 2021-12-25
  • 2021-10-05
  • 2021-05-12
  • 2022-12-23
  • 2021-12-25
  • 2021-11-27
相关资源
相似解决方案