Score:0

port-mirroring with OpenvSwitch on OpenStack not working after reboot of a VM

ng flag

I am using openvswitch to mirror traffic coming in or going out of a VM interface. Traffic is mirrored to output-port and could capture the packets on the output-port.

Was using the following command to create mirror

ovs-vsctl add-port br-int vxlan0
-- set Interface vxlan0 type=vxlan
options:local_ip= options:remote_ip=
options:key=25 option:dst_port=4789
-- --id=@p get port vxlan0 -- --id=@p1 get Port tap2
-- --id=@m create mirror name=mirr0 select_dst_port=@p1
select_src_port=@p1 output-port=@p -- set bridge br-int mirrors=@m

Mirroring does work fine until VM is rebooted. But once the VM is rebooted mirroring doesn't work. Mirroring works only when the src-interface is once again added to mirror.

Root cause is that OVS removes the src-interface of the mirror during reboot and doesnt add it back.

sudo ovs-vsctl list mirror mirr0

select_dst_port : [8d5554bb-e6c0-447c-922c-9fc0227b00b8] select_src_port : [8d5554bb-e6c0-447c-922c-9fc0227b00b8]

After reboot

sudo ovs-vsctl list mirror mirr0

select_dst_port : [] select_src_port : []

Is there a way to make OVS mirror work persistent across reboots.

Ubuntu version

Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.