编辑网络配置文件
vi /etc/sysconfig/network-scripts/ifcfg-ens33
首先把ip地址设置为静态方式
找到:BOOTPROTO=dhcp
改成:BOOTPROTO=static
新增如下配置:
IPADDR=192.168.188.142
NETMASK=255.255.255.0
GATEWAY=192.168.188.2
DNS1=114.114.114.114
如图:
配置虚拟机静态ip
重启网卡,重新加载配置

systemctl restart network

相关文章:

  • 2021-11-20
  • 2021-05-01
  • 2021-04-07
  • 2021-04-15
  • 2021-06-16
  • 2021-05-12
  • 2021-06-26
猜你喜欢
  • 2022-01-05
  • 2022-01-05
  • 2022-01-05
  • 2021-10-29
相关资源
相似解决方案