Does intra-subnet traffic on a WLAN pass through a router

network-protocolsnetworking

Lets say I have two hosts, 1 and 2, both connected to the same wireless router, same network and same subnet.

If 1 pings 2 will:

(a) 1 addresses a wireless packet to the router's MAC address, but addressed to 2's IP. The router, after receiving a packet, re-transmits the same packet to 2 (obviously the source MAC changed.)

(b) 1 simply transmits a packet directly to the MAC address of 2.
or

(c) Something else happens.

Best Answer

With all due respect, Paula Bean's answer is wrong.

client 1 does know whether or not client 2 is on the same subnet (layer 3). It doesn't know or care whether it's on a wireless or wired network (layers 1 and 2). It only knows and cares whether it's on the same subnet. Data meant for hosts on the same subnet is sent directly to those hosts, whether they're on a wired or wireless connection, no routing takes place, so the router does not replace the sender's MAC address with it's own MAC address and forward the data from client 1 to client 2. In fact, the routing function of the wireless router is not called in to play at all in this scenario as the data doesn't need to be routed because it's local to the same subnet. The wireless network is merely the physical medium on which the data is sent/recieved but it works like any other network at layers 1, 2, and 3. Data meant for hosts not on the same subnet operate as in scenario A, data meant for hosts on the same subnet operate as in scenario B.

EDIT:

Here's the layer 2 information for a network capture of a wireless client (Client 2) pinging a wired client (Client 1) on my home network. You'll see that the MAC address of the packet from the wireless client (SourceAddress) is the MAC address of the wireless NIC, not the MAC address of the wireless router.

Client 1:

Ethernet adapter Local Area Connection:

Physical Address. . . . . . . . . : 00-21-9B-06-71-B5

Client 2:

Wireless LAN adapter Wireless Network Connection:

Physical Address. . . . . . . . . : 00-22-5F-B0-5E-66

Network Capture:

Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[00-21-9B-06-71-B5],SourceAddress:[00-22-5F-B0-5E-66]

So as you see, because both clients are local to the same subnet, no routing takes place and the packets from the wireless client are sent directly to the wired client and the wireless router performs no routing and no MAC address replacement, and acts soley as the physical medium for intra-subnet communication.

EDIT:

When dealing with intra-subnet traffic the wireless router acts as a layer 2 device (switch). When dealing with inter-subnet traffic the wireless router acts as a layers 3 device (router).