I would want to buy a ethernet switch. But I have a question (maybe a noob's question...) that I can't find any answer on the forums... And I hope you will be able to answer. So if I buy an ethernet switch, connect it to network and connect 3pc to it (for instance), how many Mac adresses will be shown in output? For example, if the switch is connected to a router, how many Mac adresses will the router see? Just one, the switch 's Mac? Or each Mac adresses of any pc connected to the switch?
A switch learns the MAC addresses connected to each one of its ports. For example:
Port 1 - Connected to PC -Learns 1 MAC on this port.
Port 2 - Connected to router - Learns 1 MAC on this port.
Port 3 - Connected to hub - learns as many MACs as PCs are connected to the hub.
The Switching table of the switch will be something like this:
MAC PORT 0f-aa-34-56 1 0a-17-40-12 2 09-11-11-11 3 05-65-23-59 3 0f-0a-71-62 3
The router on Port 2 will be able to communicate with any other PC (the PC on port 1 or any other one on Port 3) and works transparently. A switch can't modify mask or modify a MAC address.
The switch isolates ethernet collisions, so if a collsion happens on the hub , the router and the PC on Port 1 won't notice it.
In your question. If a router is connected directly with a switch, must know all the addresses that for some point, communicate with him. In th other hand, the switch always must show you 2 mac address per port, the port MAC, and the MAC of the NIC connected to him. This one, will be stored, by default, 300 seconds.