I do not understand how packets from remote systems reach my PC
through a wireless router.
On the local network side of the router, my PC is assigned an IP
address in the range 192.168.*.*. Of course, that is a private network
address range. Packets transmitted to an external network cannot
have 192.168.*.* in the source IP address field, and inbound packets
from an external network should not have 192.168.*.* in the destination
IP address field; they should be blocked eventually by some router, or
by our wireless router as a last resort.
But Ethereal shows that outbound packets from my PC do have
192.168.*.* in the source IP field, and inbound packets from external
systems do have 192.168.*.* in the destination IP field.
The external network side of the router has an IP address assigned
dynamically by the cable ISP -- for example, 24.7.*.* assigned by
Comcast. Websites such as
www.showmyip.com confirm that packets
from my PC have that address in the source IP field.
So packets leave my PC with source IP address 192.168.*.*, the
wireless router presumably replaces the source IP field with its own
24.7.*.* IP address, and the remote system sends packets back to
24.7.*.*. Both the Comcast cable network and external systems are
oblivious to the existence of the wireless home network.
My question is: then, how does the wireless router know that such
inbound packets should go to my PC instead of another PC on the
same wireless network? What information does the wireless router
have and use to demultiplex inbound traffic -- be it part of an
established TCP session or a TCP SYN, UDP or ICMP packet?
If you can also point to any online explanation as well as your own,
I would appreciate it. My google searches have turned up nothing
so far.
If it matters, my wireless router is a Linksys WRT54G. But I am
hoping for a more general response based on networking architecture.
TIA.