Local Wireless Network – What Happens When Pinging a Computer

dhcplanNetworkpingrouter

I'm trying to get a better understanding of networking in general. Here's one of the many questions I got:

What exactly happens (network wise) when I ping 192.168.0.5 from 192.168.0.3, when both are on a wireless connection for example?

Does it go through the default gateway (let's say 192.168.0.1), and would that be the DHCP Server, the modem, or the router?

I feel like it should be the router. But if it is, how do you configure your network if the modem and the router are 2 separate entities (so, with different ips). Because the default gateway has to be the modem, what's left for the router?

Or am i missing something?

Best Answer

Wireless networking (802.11) works differently than wired Ethernet.

The access point "creates" the wireless LAN. In a standard infrastructure mode WLAN, when two devices want to communicate on the same subnet, the source sends its frames to the access point which then resends the frame to the destination. So when station A ARPs for the mac of station B, the frame is sent to the access point, when then forwards it to station B.

That's why devices have to be associated with an access point (on the same SSID) in order to communicate with each other.

Note that most consumer wireless routers are actually three devices in one: An access point, a router and a modem. Even though they are in the same box, they function separately.