this post was submitted on 20 Nov 2023
4 points (100.0% liked)

Home Networking

198 readers
1 users here now

A community to help people learn, install, set up or troubleshoot their home network equipment and solutions.

Rules

founded 1 year ago
MODERATORS
 

Google searches have only yielded 5th grade level examples (“the modem talks between your ISP and your home network!”) or articles I would need a degree to understand. Can anyone provide an explanation that’s somewhere in between the two? I understand the fundamentals of how the Internet works, and how LAN works regarding a router and individual devices, but I’m curious to know more about the link between those.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 11 months ago

Modem stands for modulator-demodulator. Modulation is the encoding of information into a signal, especially when it involves combining of different frequencies into a complex analog waveform. The demodulation is the opposite, extracting the original information back out by separating out the various parts of the signal that were encoded.

You can imagine that a very simple stand-in for a modem might just be to take every bit (binary digit) of input and encode as either a low or high voltage on output. That is a very basic way of encoding data for sending as voltage down a wire and works really well down short wires at reasonable speeds. You do need some way of synchronising both ends, and without a separate wire for a synchronization clock you need to agree on a communication speed and periodically interrupt the encode with a particular pattern so that the receiver can re-synchronize itself.

So, the above describes how 1-wire serial communication works, basically a UART which is the fundamentals behind RS-232, but this tends to be useful for short lengths of wire only.

When you want to send over long distances then effects in the wire start becoming a problem, like the capacitance of the wire, or its voltage loss over its length, or the interference it can pick up. If the signal in the wire doesn't have certain properties, such as being cyclical, the signal can be flattened out or suffer other artifacts that destroy the ability to tell what input it had.

So you encode the data in different ways that make it resistant to these effects. You take analog waves of one or more carrier frequencies, and encode the data as slight changes in these frequencies such as frequency or phase changes. Modulating data into a carrier wave makes it much more tolerant to capacitance and loss on a long bit of wire (or indeed, over the air waves).

In order to counter interference, you need to either slow down your communication or build in some ability for itself to either detect errors, or correct errors. A simple form of error detection, for example, would be to transmit everything twice - if the same thing wasn't received twice, then you have detected an error. This unfortunately doubles the amount of data you need to transmit, just to detect errors, but the good news is complex mathematics can reduce this inefficiency down to just a few percent of overhead, by transmitting an error detection code calculated based on the data, such that if the receiver receives the data and the code, and gets the same result from the algorithm, they know it has transmitted safely. Modern systems also expand this to error detection and correction where a little more redundancy is built in to be able to not only detect errors but correct most of them, and clever mathematics, again, helps us to minimise the amount of redundant data required to do this.

Finally, the quest for greater and greater transmission speed has driven us to find creative ways of getting the most data transmission through a given wire length possible, by using multiple carriers, multiple ways of modifying them to encode data into them, and use special mathematical algorithms to work out the encoding and decoding of such a scheme.