Openvswitch 配置端口镜像

 Openvswitch 配置端口镜像

 

1 #Create a dummy interface that will recieve mirrored packets

modprobe dummy

ip link set up dummy0

modprobe dummy

#Add the dummy interface to the bridge in use

 

2 添加端口到openvswitch中

ovs-vsctl add-port br0 dummy0

3 做端口镜像

ovs-vsctl \

-- --id=@m create mirror name=mirror0 \

-- add bridge br0 mirrors @m

 

ovs-vsctl list port dummy0

d3427810-8e68-40af-99c0-8cb935af9882

ovs-vsctl set mirror mirror0 \

output_port=d3427810-8e68-40af-99c0-8cb935af9882

 

ovs-vsctl set mirror mirror0 select_all=1

测试

tcpdump –i dummy0

你可能感兴趣的:(Openvswitch 配置端口镜像)