[root@vm7 ~]# ifconfig eth0:1 10.10.152.7 netmask 255.255.255.0 up
[root@vm7 ~]# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.16.100.252 netmask 255.255.255.0 broadcast 172.16.100.255 inet6 fe80::20c:29ff:feb6:6989 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:b6:69:89 txqueuelen 1000 (Ethernet) RX packets 13555483 bytes 1061275030 (1012.1 MiB) RX errors 0 dropped 105262 overruns 0 frame 0 TX packets 50472 bytes 11453893 (10.9 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth0:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.152.7 netmask 255.255.255.0 broadcast 10.10.152.255 ether 00:0c:29:b6:69:89 txqueuelen 1000 (Ethernet)
添加完虚拟网卡,可能需要指定静态路由
[root@vm7 ~]# route add -net 22.22.0.0/16 gw 10.10.152.1