第一步
vi /etc/sysconfig/network-scripts/ifcfg-ens33
加上以下配置,并将BOOTPROTO=dhcp注释
BOOTPROTO=static
IPADDR=192.168.0.195
NETMASK=0.0.0.0
GATEWAY=192.168.0.1
DNS1=192.168.0.1
保存
第四步,重启网络服务
systemctl restart network
最后,测试网络可用性
ping www.baidu.com
第一步
vi /etc/sysconfig/network-scripts/ifcfg-ens33
加上以下配置,并将BOOTPROTO=dhcp注释
BOOTPROTO=static
IPADDR=192.168.0.195
NETMASK=0.0.0.0
GATEWAY=192.168.0.1
DNS1=192.168.0.1
保存
第四步,重启网络服务
systemctl restart network
最后,测试网络可用性
ping www.baidu.com