24

If two devices A and B are connected to same wifi via access point C, and if A pings B, will those packets be directly picked up by B or will they be captured by C and then retransmitted such that B can capture them?

Using wireshark to capture packets shows that mac addresses in the ping packets are of A and B [not sure if C is even supposed to have one], thus if the packets are going via C, then C is analogus to a hub.

A link to a primer on 802.11[?] that covers this aspect would be highly appreciated.

pareshverma91
  • 804
  • 2
  • 8
  • 14

3 Answers3

11

In a standard (i.e. non-AdHoc) WiFi network the answer is yes, packets sent between WiFi Stations will go via the Access Point. As allen-smithee mentions, the analogy probably makes more sense if you think of the AP as a switch, with the "association" between each station being a cable.

A good way to test this would be to see if two clients A & B, which are connected to an access point C but are a long way apart so they cannot hear each other, can sent packets to each other.

NB: If the client A & B are close enough to hear each other, it would be possible for them to communicate directly, but implementing the communications like this would introduce a lot of complexities.

A great primer on WiFi is Matthew Gast's book 802.11 Wireless Networks: The Definitive Guide (see the link for a "copy"). In particular Chapter 4. Also, table 4-2 summarises the 4 address fields and what "address" will be present in them for the different functions in WiFi.

Doddie
  • 1,393
  • 13
  • 21
8

An 802.11 frame can have up to 4 MAC addresses - sender, destination and the MACs of the transmitting and receiving radio points (the AP). If you're only seeing the sender and destination then likely you are seeing a 'fake Ethernet capture'.

'Hub' probably isn't really the right term to describe an AP any more. A wireless network is basically a single medium, like a hub network, with bandwidth shared between clients. However MIMO increases the bandwidth by effectively layering a greater number of media. A switched ethernet network is really just a medium per client (one wire to each client from the switch) so if a MIMO wireless network had enough layers and the AP had more bandwidth than any one client it would resemble a switched network in some ways.

For a general description of 802.11 and the frames see this link. For an interesting look at MAC address usage in 802.11 see this link.

The amount of work that the AP does for retransmitting packets from A to B is an interesting question. I believe that most APs will inspect the packets at the data layer and then construct a new packet for transmission to the other client. The most important reason for this is to provide some degree of inter-client protection. Another thing to consider is if the AP has WPA/WPA2 Enterprise security where per-client encryption is used so the AP has to decrypt and re-encrypt the packets.

eugenhu
  • 1,168
  • 13
  • 22
allen-smithee
  • 651
  • 3
  • 4
  • Thanks for the explanation and links, especially the wireshark part (I again realized that partial knowledge can be dangerous). – pareshverma91 Dec 18 '14 at 07:54
2

The short answer is YES. In your scenario (non AdHOC connection) both devices must be connected via an Access Point. WiFi is a physical layer that converts data (0s and 1s) into radio signals. So physically the packets must pass through the access point otherwise there can not be communication with any other device.

The reason you can't see any information on your Wireshark, I assume, is because you are looking at Layer 3 (IP Addresses) which doesn't change. If you take a closer look at Layer 2 (link layer) which changes at every hop you will find the MAC address of the last hop, in this case of your router.

NOTE: That is what normally happens to every network with a router. There is a technique called transparent routing which conceals the presence of a host, usually for security reasons (e.g. firewalls are usually performing transparent routing).

Here is some further reading:

  1. What happens, when router receives packet? - CISCO Forums

  2. http://www.cs.miami.edu/~burt/learning/Csc524.092/notes/ip_example.html - Miami University CS Class Notes

patm
  • 1,420
  • 14
  • 19