Switches and self-learning
A switch learns which port leads to each MAC address from the source addresses of the frames it sees, sends a frame only out the port it has learned for the destination and floods it out every other port when it does not know, so a LAN builds its own forwarding table with no configuration.