Linux newb starting out. Figuring it all out as I go along. Im trying to layer 2 bridge a virtual tap interface and an etehrnet interface. want to achieve this.
Tap0 10.0.0.3/8 =====> Br0 (Layer 2 only) ======> Eth2 (layer 2 only) =====> External device connected to eth2 10.0.0.5/8
config as the following:
sudo ifconfig tap0 10.0.0.3 netmask 255.0.0.0 promisc up
sudo ifconfig eth2 0.0.0.0 promisc up
sudo brctl addbr br0
sudo brctl stp br0 off
sudo brctl addif br0 tap0
sudo brctl addif br0 eth2
sudo ifconfig br0 0.0.0.0 up
with tcp dump i cant see any traffic hitting tap0. The only way i can get a ping from 10.0.0.5 to 10.0.0.3 to work is by adding a route to 10.0.0.5/0 with:
sudo route add 10.0.0.5 br0.
OK thats fine it works, but im surprised i need to do it and that the tap interface isnt seeing traffic. I expected the bridge to forward the arp request to tap0 or reply on tap0's behalf.
Have i missed something? is adding the route the way to do it, or should it work at layer 2 with no routes?