53

Consider a Wi-Fi network with one access point and two clients, operating in marginal conditions due to range, etc. Client 1 is communicating with Client 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?

That is, does the AP receive the packets from one client and rebroadcast them for the other client to pick up, or does Client 2's radio receive the signals directly as they're transmitted from Client 1 and the AP just provides some sort of arbitration and metadata to help them find each other?

I'm particularly interested in how the answer to this would affect the case where the two clients are near to each other and have good radio propagation, but the access point is some distance away.

  • 4
    While the question is well-received and on-topic here, it feels like it would also be a good fit at the network engineering Stack Exchange. – Jules Oct 27 '16 at 17:38
  • 1
    Thanks, wasn't aware there was a more specific SE. I might have more questions for them in future, good to know. – Pete Oct 28 '16 at 8:47
68

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.

| improve this answer | |
  • 5
    The situation isn't exactly analogous to a switch on a wired (xBASE-T) network, though, because Client 2 can see Client 1's transmissions even if the protocol is such that it ignores them. In some ways it's closer to old-school 10BASE2 or 10BASE5 cabling. That's why I have doubts. – Pete Oct 26 '16 at 12:59
  • 3
    Although modern switches don't really behave this way anymore, technically ALL Ethernet networks are multi-access and therefore have the possibility for devices to receive packets that they aren't the intended recipient for. – D34DM347 Oct 26 '16 at 13:04
  • 12
    @Pete it's not necessarily true that C2 can see C1's transmissions. Consider the case where C1 is near one edge of the AP's range, and C2 is near the opposite edge. The distance between C1 and C2 is then twice the range of either to the AP, so they can't communicate directly with one another. But since they don't have to, it doesn't matter. All that counts is they're both able to talk to the AP. – Monty Harder Oct 26 '16 at 17:48
  • 4
    I'd suggest you use the word "hub" as that is closer to the wired equivalent. Hubs are not really available now days but it kind of works. – TafT Oct 27 '16 at 11:16
  • 1
    @Monty Harder Not necessarily true in general, of course, but will always be in my specific situation. My C1 and C2 will generally be fairly close to each other, but the AP will sometimes be some distance away. – Pete Oct 28 '16 at 8:46
37

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!

| improve this answer | |
  • +1 Just for the details! – Michael-O Oct 30 '16 at 9:06
4

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.

| improve this answer | |
0

i recently finished up with contract at HP where I developed WIFI/Wifi Direct test procedures and test automation. In WIFI Direct this is peer to peer, so no AP association involved at all. I suggest you read up on this area as well.

Consider that WIFI itself is an unlicensed service, so on bands like 5GHz which is where licensed services like RADAR and Military use, any WIFI device on these bands needs to 'move' off the shared WIFI channel for the primary license holder to use said channel

My two cents == My two dollars same thing

Cheers

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.