1

As far as I know that the home WI-FI routers or commercial routers:

  • can do "Routing"
  • has a built-in Switch
  • has a built-in Access Point .
  • can do other functions like NAT, DHCP.

Now my question is when a device connected to the Wi-Fi router sends a message to another device on the same network (also connected via Wi-Fi) and when the router receives that message (via the access point), does it broadcast the message to all wireless devices or is there any mechanism that the router uses to send the message only to that particular device?

My second question is, if the two devices are connected to router's switch ports will it actually works as a real switch by forwarding the message only to the destination MAC Address or it will broadcast them?

2
  • You would do well to download Wireshark, install it and do some research. See what packets are going back and forth. Everything is in these packets.
    – anon
    Commented Feb 4, 2021 at 1:50
  • You have a terminology problem. "Broadcast" has one meaning at the level of wired Etherent using IP addresses. WiFi uses radio, and the signal is "broadcast" over the air.
    – sawdust
    Commented Feb 4, 2021 at 5:28

2 Answers 2

7

Wi-Fi uses a shared medium (2.4GHz or 5GHz radio waves), whereas modern Ethernet does not (each device has its own cable to the switch).

Whenever any Wi-Fi device (client or AP) transmits a packet, it's technically a "radio broadcast" at the physical layer, because those radio waves go everywhere. They're not getting sent down a dedicated antenna cable or waveguide or other dedicated pipe of some sort that guarantees that no one other than the intended recipient can eavesdrop on it. All clients of the same AP are on the same channel, so every packet transmitted on that channel, by any device, could potentially be heard by other device listening on that channel.

However, at the data-link layer (layer 2), the Wi-Fi packet being transmitted will be addressed to the unique hardware MAC address of the intended recipient. So at that layer we would call it a "unicast". Most devices ignore transmissions that aren't addressed to them, but people could still run sniffers or other network/security analysis tools that record those packets. Some packets are addressed to "multicast" or "broadcast" addresses at layer 2, when the sending device wants multiple other devices to receive the packet. So that latter kind of transmission would be considered a broadcast at both layers 1 and 2 (and probably layer 3 (e.g. IP) as well).

If two devices are connected to a switch (including the typical 4-port gigabit Ethernet switch on the LAN side of most home gateway wireless routers), then the switch looks at the destination MAC address on each packet to decide where to send it. If it's addressed to a unicast MAC address that the switch has already learned is connected to a certain other port, then the switch only forward it to that one port. If it's addressed to a multicast or broadcast address, or if it's addressed to a unicast address that the switch hasn't learned yet, then the switch will send the packet to all other ports.

If an Ethernet "switch" were to always send all unicast packets to all other ports, then it wouldn't be an actual switch, it would be an older obsolete device known as an Ethernet "hub". Hubs were common with 10 Mbit Ethernet in the early 1990's, and became rare in the days of 100 Mbit Ethernet in the mid-to-late 1990's. Gigabit Ethernet doesn't allow hubs at all (the IEEE 802.3 1000BASE-T gigabit Ethernet standard originally had a provision for gigabit Ethernet hubs, but no one ever shipped one, and that provision was quickly officially deprecated).

2
  • > (the IEEE 802.3 1000BASE-T gigabit Ethernet standard originally had a provision for gigabit Ethernet switches, but no one ever shipped one, and that provision was quickly officially deprecated) -- did you mean to say 'hubs' here?
    – Bob
    Commented Apr 23 at 0:03
  • @Bob Oops, yes. Fixed. Thanks!
    – Spiff
    Commented Apr 23 at 2:31
1

I am pretty sure that it broadcasts to all wireless devices. WIFI is a layer 2 protocol, ie it can work with TCP/IP, but sits below it in the stack. Also, the bandwidth taken up whether it broadcasts to all devices or just one would be the same.

If 2 devices are connected to the routers switch ports it will behave like a real switch and only forward the message to the destination MAC. For most SOHO routers with a 4 port LAN, the ports are actually a managed switch, although the processing is comparatively limited - ie if you connect the devices to a proper switch you will often see better performance then if you plug them into the 4 port "switch" on the router. (If you put the ports in different VLANS without tagged access like some more advanced software like *wrt allows you can actually treat each lan port as a different interface and enforce routing on them)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .