[root@localhost ~]# cd /etc/sysconfig/network-scripts/

 

[root@localhost network-scripts]# cp ifcfg-eth0 ifcfg-eth0:1

 

[root@localhost network-scripts]# vim ifcfg-eth0:1

 

DEVICE=eth0:1
HWADDR=00:0C:29:73:E6:0D
TYPE=Ethernet
UUID=98b5dc88-94c0-4a78-a3e7-ba3873a4116d
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.1.29
NETMASK=255.255.255.0
GATEWAY=192.168.1.2
DNS1=202.106.0.20
DNS2=8.8.8.8

 

保存退出

[root@localhost network-scripts]# service network restart 重启网卡服务