将动态ip修改为静态ip
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static
IPADDR=192.168.49.137
GATEWAY=192.168.49.2
NETMASK=255.255.255.0
DNS1=8.8.8.8
重新启动网络
service network restart
将动态ip修改为静态ip
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static
IPADDR=192.168.49.137
GATEWAY=192.168.49.2
NETMASK=255.255.255.0
DNS1=8.8.8.8
重新启动网络
service network restart