1、修改网络配置文件:
vim /etc/sysconfig/network-scripts/ifcfg-ens32
BOOTPROTO=static
IPADDR=192.168.100.21
GATEWAY=192.168.100.2
NETMASK=255.255.255.0
DNS1=192.168.1.1
DNS1=8.8.8.8
2、重启网络
service network restart
3、给网卡增加或删除ip
ip addr add/delete 192.168.100.21/24 dev ens32