# cd /etc/sysconfig/network-scripts
# cp ifcfg-eth0 ifcfg-eth0:0
# vim ifcfg-eth0:0
DEVICE=eth0:0
HWADDR=00:15:17:ac:36:d0
ONBOOT=yes
IPADDR=192.168.100.1
BOOTPROTO=none
NETMASK=255.255.255.0
重启网卡即可
# service network restart
eth0:0 绑定在 eth0 上,是个虚拟的网卡配置,用来配置多个ip在同一网卡上
可以是 eth0:n
网卡 eth0 关闭后, eth0:n 都将被关闭,如要启动,则需要启动 eth0 先~