Linux虚拟机将ip改为自定义模式网络

时间:2023-03-08 17:31:06

查看当前ip:ifconfig

配置linux的ip地址:vi /etc/sysconfig/network-scripts/ifcfg-ens33

  BOOTPROTO="dhcp"改为:BOOTPROTO="static"

  IPADDR=192.168.255.3

  NERMASK=255.255.255.0

  GATEWAY=192.168.255.1

  NDS1=114.114.114.114

重启网卡:service network restart