[SOLVED] Question about my network "architecture" and how switches work

Forfex

Prominent
Oct 7, 2021
6
0
510
Hi everyone,
In my LAN I have a switch (marked as two in the picture below) which is directly connected to the "main" router (marked as one) (which is linked to the modem); one of the ports of the switch is then connected to another router (marked as three) which functions as an access point. I was wondering: when data is sent to a device connected to router three, it has to pass through the switch, but how does the switch knows where to send it, since it only knows the mac address of router three and it doesn't deal with ip addresses? I have a simple diagram below which might help to understand my situation.
My thought was that in that case the switch kind of works as a hub and sends the data to every device, since it does not know who to send the data to, but I really don't know. Can anyone help?


This is the picture
 
Solution
Both your switches and AP are layer 2 and have MAC tables, so no you should not get broadcasts to everything on the second switch (as if it were a hub).
If your switch was a managed switch you could look at the ARP table. You would see many MAC addresses associated with the port connected to the AP/router -- not JUST the router's MAC.
What you call router 3 is actually closer to a switch with wireless ports on it.

Switches and the AP keep lists of mac addresses and what ports they last saw them on. Only if there is no entry does it send it out all ports. It is kinda rare for that to happen unless a device is not sending any packets at all.
This table has a different names in different switches but unless you have a managed switch you can't display it anyway.
 
  • Like
Reactions: RealBeast