I am most likely looking at this in the wrong way, but I hope for clarification.

Let's say, for example, my computer sends a request to another computer on a separate LAN and house. So the data would, in simplest terms, go to the router, then to the modem, then to the modem at the other computer's house, and so on.

My question is, how does the modem of that other house know what to listen to (which is my computer in this case), rather than take data from an entirely different request from a different source traveling to a different destination? Does it listen to everything and validate if it was meant for it?

  • I would say it depends on the LAN protocol implemented, take this with a grain of salt as I'm not a networking pro, but generally network packages include a destination address, the destination machine only needs to be listening a port for incoming messages and should only capture packages destined to its own address, a good protocol implementation would require that packages be sent encrypted be the originator and decrypted be the reciever, how the crypto keys are managed and the algorithms involved is protocol-specific, also a good implementation would require packaes to be digitally signed. Dec 15 '18 at 16:38
  • 1
    What kind of "modems" are we talking about here? Cable modem? DSL? And what is the application? Or are we talking about multiplayer gaming, and if so, what platform? Dec 15 '18 at 16:55
  • I recommend you read up on Routing for Internet Protocol. That's the core technology involved in getting information from one networked computer to another. Dec 17 '18 at 18:27

As a general principle of networking, if your physical layer (layer 1) is a shared medium (where everyone can see all the traffic, or at least anyone might see traffic not meant for them), then every device must have an address at the data-link layer (layer 2) in order to tell what's for them and what's not. This is why Ethernet, which started out as a completely shared medium at layer 1, always had Ethernet hardware MAC addresses at layer 2. Many other shared medium networking schemes followed Ethernet's example here. Wi-Fi (IEEE 802.11) is wireless Ethernet, so it uses this model. DOCSIS (cable modems) is a semi-shared medium where your DOCSIS modem may have been instructed to listen to some of the same downstream channels as your neighbor's DOCSIS modems, so it uses link-layer addresses.

If your physical layer is a point-to-point connection (i.e. not shared), like PPP over a serial cable, dial-up modem, or DSL line, then you don't need link-layer addresses because everything you can "hear" on the wire must be intended for you to handle, by definition.


There are 2 different technogies at play here which are often confused. Once you understand these it becomes easier.

A true modem serves 1 purpose - it converts analog signals to digital ones and back (modem is short for MODulator/DEModulator). Modems themselves don't understand Internet or routing traffic.

What most people call a modem is actually a router with a bulit in modem. It may be useful to think of a so-called modem as a router where one of the network Interfaces is a modem rather then Ethernet - but nonetheless serves as a similar function.

We can now focus on the router. While there are many protocols, let's talk about TCP/IP which is the most common. (While there are differences, both v4 and v6 work similarly so this describes both. I'm also simplifying some functions just a bit).

Routers have a routing table with a list of routes they know. These routes are defined by IP address range (the subnet tells us the size of the range). Each route us either directly connected or reachable through another router (gateway). On most routers there is a "default gateway" whete all unknown traffic is sent.

(Where there is more then 1 possible route to pick, a router chooses the most specific). The default route for a home router is normally across the modem interface

In this way all the router dies is forward packets to other machines. Either those machines will route them further or accept them as the final destination.

  • OK, this makes sense. Does this mean modems always demodulates the signal and send the packets to the router? If so, must the router always check if it is the correct destination?
    – TheRyGuy
    Dec 16 '18 at 4:01
  • Short answer is (almost always) yes. Modems demodulate the signal and then hand it over to a device/subsystem (typically a router) which handles forwarding if the packets. The router does not need to check the validity of the destination and can blindly forward packets as per the routing table (unless the router does egress filtering - which is, in effect, checking the destination validity)
    – davidgo
    Dec 16 '18 at 4:20

Short (and very simplified) answer: default gateways and routing tables, both on each layer 3 device (i.e., router). You’re Home router says “this IP isn’t on my network” so sends packet out to default gateway upstream (i.e. your ISP’s network), ISP basically does same, and so on until destination found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.