Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will two devices connected to the same wifi, talk via the access point for communicating with each other?

Tags:

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.

like image 561
pareshverma91 Avatar asked Dec 05 '14 09:12

pareshverma91


People also ask

How do two devices communicate with each other wirelessly?

A wireless network uses radio waves, just like cell phones, televisions and radios do. In fact, communication across a wireless network is a lot like two-way radio communication. Here's what happens: A computer's wireless adapter translates data into a radio signal and transmits it using an antenna.

Can you connect multiple devices to an access point?

Most of the wireless routers and access points state they can support about 250 devices connected at once.

Does all WiFi traffic go through access point?

Almost always the connections will traverse the AP, but this does actually depend on your particular hardware. If the devices support and are configured to use WIFI Direct/P2P-Go then they can talk to each other without going through a route.

What happens when multiple devices are connected to WiFi?

When multiple devices use the same network, overcrowding occurs as they all compete with each other to connect to the same router. This means low quality or buffering during streaming, latency during gaming, and frustratingly slow browsing speeds.


2 Answers

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.

like image 59
Doddie Avatar answered Mar 06 '23 06:03

Doddie


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.

like image 23
allen-smithee Avatar answered Mar 06 '23 06:03

allen-smithee