内核修改:
/device drivers/Network device support/MAC-VLAN support
1、创建目录和文件
#cd /usr
#mkdir vlan
#cd vlan
#cp /xxx/vlan .
chmod +x vlan
cp /???/cli8795 /usr/sbin
chmod +x /usr/sbin/cli8795
2、编辑网络配置文件
vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address x.x.x.x
netmask 255.255.255.0
2、编辑自动加载文件
vi /etc/init.d/rc.local
.....
/usr/vlan/vlan
ip link add link eth0 dev net1 type macvlan
ifconfig net1 hw ether E2:44:45:7A:E0:A8
ifconfig net1 up
ip link add link eth0 dev net2 type macvlan
ifconfig net2 hw ether D8:B8:25:CB:C0:25
ifconfig net2 up
ip link add link eth0 dev net3 type macvlan
ifconfig net3 hw ether 96:B0:5A:C9:61:0C
ifconfig net3 up