I am trying to understand Linux bridging.
Lets say I have a Linux bridge with two veth interfaces and a vNic.
Bridge: br0 Interfaces: veth1, veth2, and eth1
Now, if I do
brctl showmacs br0, it shows me a list of port no#s/ MAC address etc. Like:
$ brctl showmacs br0 port no mac addr is local? ageing timer 1 00:50:56:8f:96:e5 yes 0.00 2 f2:2b:f5:fa:17:9c yes 0.00 3 0e:fd:9d:0a:2c:4f yes 0.00
Question1: How is the above table constructed? I assume its called the forwarding database?
Now if a frame gets generated at veth1 with destination MAC address of veth2. It will just go to the bridge, the bridge will look up its forwarding database and it will be sent to the veth2's port on the bridge. Simple.
Question 2: But if a frame gets generated at veth1 with a destination MAC address that's not a bridge port then how does the bridging works? I assume the bridge floods all the ports with this frame. But then what? IF a port accepts the flooding frame, does it notify the bridge that I have this MAC address? If no port on the bridge is the receiver, how does the bridge know what's the uplink port or the port to which it should sent the frame to, in this event where no of bridge ports are the intended receivers?