how to let network traffic mirror to guest os using linux bridge(port mirroring)?

serveryang

Member
Feb 21, 2022
12
0
6
38
pve host:has network traffic.
1656064133621.png
vmid=102, guest os:
1656064190110.png
config bridge to vmbr4, but cant get network traffic.

1656064253756.png
why?
 
How looks your network config?
1656379465839.png
network config:
ens15f2(nic) -> vmbr4(bridge) -> eth0(guest os).

network traffic from ens15f2 can't mirror to eth0.
using tcpdump -i eth0 got nothing, but tcpdump -i vmbr4 can got packets.
so how to mirror network traffic to eth0 like a switch?
 
Last edited:
View attachment 38492
network config:
ens15f2(nic) -> vmbr4(bridge) -> eth0(guest os).

network traffic from ens15f2 can't mirror to eth0.
using tcpdump -i eth0 got nothing, but tcpdump -i vmbr4 can got packets.
so how to mirror network traffic to eth0 like a switch?
I heard there is a hidden tap device. You need to mirror from there. See this one, the author used ovs, but I guess the same applies to linux bridge.
https://codingpackets.com/blog/proxmox-enable-port-mirror/