I'm thinking of something that would need to emulate an ethernet switch.
We have a proprietary bus connecting a central unit with several "slave units", and I would like to move ethernet packets over this bus, too, as a secondary payload.
I thought about this setup, but I have never done something similar, so I may be completely wrong with my ideas...
I would add a PHY and connectors to our chips in the central and slave units.
When a device attached to a slave unit sends a packet, the slave unit would put it on the bus, sends it to the central unit, which catches the MAC and stores it in a table together with our local bus address, and sends it out through the central units' PHY into the world.
When a packet comes in at the central unit and matches one of the entries in the lookup table, it is put on the bus and rides as a payload to the unit, which would then put out to the units PHY. With a broadcast MAC address, it would be broadcasted to all units on the bus.
So apart from forwarding packets, does the central unit have to to do other jobs, like somehow informing its network partner that is expects packets for different MACs?
Is there any literature (online or offline) which would give some more insights? I tried to google a bit (and I've seen ads for switches that will last a lifetime), but either it's not there or I asked the wrong questions.
Instead of looking up a MAC in the central unit and sending it to a dedicated unit, what if I would just put any incoming packet on our bus as local broadcasts, and let the slave units do the MAC matching?