1. 修改配置文件
2. 重启network
3. 查看ip
1. 修改配置文件
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 HWADDR=08:00:27:6B:37:AE TYPE=Ethernet UUID=a7f077c4-69e5-4c59-b25d-67973fde9e2b NM_CONTROLLED=yes
ONBOOT=yes BOOTPROTO=static IPADDR=192.168.31.248 NETMASK=255.255.255.0 GATEWAY=192.168.31.1
2. 重启network
# service network restart
3. 查看ip
# ip addr