Does Wi-Fi traffic from one client to another travel via the access point?

Solution 1:

Yes, the communication is traveling through the access point. In this case the AP is functioning exactly like a switch does in a wired network.

It is possible to have two devices communicate directly, without an AP. This is known as Ad Hoc networking.

Solution 2:

Obviously the Access Point (AP) must be in range of both (assuming no fancy mesh modes, etc.) for the network to be deemed available, but does the data actually travel through it?

Yes, data actually flows through the AP. Why? The 802.11 frames standards defined 802.11 frame headers:

Enter image description here

802.11 works on mostly the MAC layer of the data-link and physical layer, So as you see there are four addresses (instead of two in case of Ethernet) in the frame header and depending on where the frame is to be forwarded the address placement in dot11 header is decided.

The possible addresses are:

  1. Destination Address -> To which frame is intended to reach finally (DA)
  2. Source Address -> The original sender of frame (SA)
  3. Current Destination Address -> The current receiver of the frame (CDA)
  4. Current source Address -> The current source of the frame (CSA)

Now it depends on where the frame needs to be forwarded, i.e. from which Distribution system (DS) to which distribution system (here let’s suppose wireless is DS 0 and wired is DS 1) the placement of these addresses is decided in the frame header.

CASE 1: When a frame needs to be forwarded from DS 0 to DS 0 from one wireless client (STA) to another client (this would mostly happen on an ad-hoc network).

The following would be the addresses:

  • CDA and DA are going to be the same
  • CSA and SA are going to be the same

The following would be address placement:

  • Address 1 -> CDA or DA
  • Address 2 -> CSA or SA
  • Address 3 -> BSSID(MAC) or ff:ff:ff:ff:ff:ff in case of probe requests
  • Address 4 -> Not Applicable

CASE 2: When a frame needs to be forwarded from a wireless client to an AP i.e. from DS 0 to DS 1.

The following would be the addresses:

  • CDA and BSSID are going to be the same (since the packet is being forwarded on an SSID)
  • DA is going to be the ultimate wireless client where frame needs to be forwarded(in its LAN).
  • CSA and SA are going to be the same

The following would be address placement:

  • Address 1 -> CDA or BSSID
  • Address 2 -> CSA or SA
  • Address 3 -> DA
  • Address 4 -> Not Applicable

CASE 3: When a frame needs to be forwarded from an AP to a wireless client i.e. from DS 1 to DS 0.

The following would be the addresses:

  • CDA and DA are going to be the same.
  • CSA and BSSID are going to be the same.
  • SA is going to be the original source address

The following would be address placement:

  • Address 1 -> CDA or DA
  • Address 2 -> CSA or BSSID
  • Address 3 -> SA
  • Address 4 -> Not Applicable

CASE 4: When a frame needs to be forwarded from one AP to another AP sharing same LAN (and two wireless clients communicating on it) i.e. from DS 1 to DS 1.

The following would be the addresses:

  • CSA is going to be MAC of first AP
  • CDA is going to be MAC of second AP
  • SA is going to be the MAC of source wireless client
  • DA is going to be the MAC of destination wireless client

The following would be address placement:

  • Address 1 -> CDA
  • Address 2 -> CSA
  • Address 3 -> DA
  • Address 4 -> SA

Conclusion: If you are in an AP-based environment (infrastructure) you have to switch DS and hence the destination MAC from BSSID to end client MAC addresses (explained above in detail) that is how dot11 is written.

Analogy with wired: Take the wireless medium as an invisible wire between a switch and an end host. The switch in this case is an AP and the end host is the wireless client. You still need a source MAC and a destination MAC in wireless, But now in a multiple AP environment you do not know who is your AP (switch) as there is no cable (invisible) to which you are connected (via) hence came in two more addresses (CSA and CDA explained above).

I hope this helps!


Solution 3:

The standard configuration for Wi-Fi (with Access Points) is to operate as a repeater. The AP will pick up the data it receives and retransmit. This configuration is the standard for centralized radio communications of many types, with Wi-Fi just being one particular subset.