Skip to content

Instantly share code, notes, and snippets.

@ffainelli
Created October 1, 2018 16:25
Show Gist options
  • Save ffainelli/b1901d6a39f3f5d621a2401eaa4e218b to your computer and use it in GitHub Desktop.
Save ffainelli/b1901d6a39f3f5d621a2401eaa4e218b to your computer and use it in GitHub Desktop.
2 bridge port with TC
tc qdisc add dev eth1 handle ffff: ingress
tc qdisc add dev eth3 handle ffff: ingress
tc filter add dev eth3 parent ffff: u32 \
> match u32 0 0 \
> action mirred egress redirect dev eth1
tc filter add dev eth1 parent ffff: u32 \
> match u32 0 0 \
> action mirred egress redirect dev eth3
ifconfig eth3 promisc
ifconfig eth1 promisc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment