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.

top 31 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 11 months ago

It used to be a lot simpler. The "Modem" received a stream of serial data (UART/RS232 + AT control codes).

The digital stream needed to be "encoded" and converted to electrical signals which could be sent on a physical wire.... most often the PSTN network (Public service telephone network)... aka "the phone line".

The audio/analoge technique used to produce the electrical signals was not as you might expect sending "blips" for 1s and silence for 0s. For way out of scope reasons that isn't efficient. Techniques like PCM or PWM, Pulse code/width modulation. Beyond the scope. However this gets you the "MODulator", "DEModulator". Which is you "MoDem"

Today, these still exist. Most would refer to them as "dial up modems". Rare. We tend to have "home broadband" technologies today which range from plain old twisted pair phone lines carrying 100s of times more bandwidth than an "analogu phone line", but over the same wires. We have old "Coax" cable for "Cable TV" carrying high speed internet. We even now have pure optical fibre connections in to the home.

At this point, really, it can be argued there is no modem. Certainly not in the terminology used to previously describe one. What often gets refered to as the "Modem" is usually an ONT or similar ePon/docsis device controlled by an ISP which "converts" or "bridges" the optical (or other broadband signal) to "Ethernet". Most, not all then additionally handle the authentication and "PPP" Peer to peer protocol used to transmit your data over this "You-ISP network". In larger enterprise these components can be broken down into individual (or multitudes of) different boxes. ONT, PPPoE client, Router, Firewall, Switch, Wifi Access point. In most homes they will either be a single box provided by the ISP or 2 boxes with one provided by the "Network operator" and the other by your "Internet retailer."

[–] [email protected] 3 points 11 months ago

I'll give it a shot.

In the past, before the internet existed, homes were connected to the national phone system. The national phone system is a bunch of interconnected electric lines that are designed to transport electricity in the frequencies used for speech / sound.

When internet became a thing, people needed electric lines to transport data from their internet providers to their home. Instead of building new electric lines, which would be very expensive, tech companies created a technique called "modem".

A modem transforms computer data into sound data, which can travel through phone lines. Once the sound data reaches the internet provider, another modem turns it back into computer data.

[–] [email protected] 2 points 11 months ago

Take a look at old issues of Byte Magazine where they will explain how to make a cassette tape backup system for your 1975 computer. Basically, you need to turn ones and zeros into tones that can be recorded on cassette tape, and you need to do it in a way that strings of 111111's and 00000's get the right count of '1's and '0's. There are a bunch of different ways of mapping tone changes to '1's and '0's, (frequency shift keying, phase shift keying, etc) and it's pretty amazing all the ways to pack bits into tones (how many tones do you want to distinguish - 2? 4? more?).

You could also look up how the old 300 baud (essentially bits per second) modems encoded bits over telephone lines that only provided 3Khz of bandwidth, and how more sophisticated encodings allowed 1200 baud, 2400 baud, and ultimately 56K baud.

[–] [email protected] 2 points 11 months ago

As others have noted a modem is a modulator / demodulator.

Most modems are designed into other things. Like cable coax modem/router/switch/wi-fi access point. Or other things. Or in a cell phone it converts bits internal to the phone into radio signals or back the other way. Many things people call a modem is really a more complicated box with a modem built into it.

In the basic definition of the term it is bits <-> analog wave forms. Back in the day it was land line modems and the wave forms could be heard by most people if they listened "in". Actual FAX machines (not email pretending to be a FAX) still do this. Connected to the "bits" side of a modem is usually a circuit that takes those bits and organizes them in agreement with the other end of the connection. Mostly these days Ethernet.

Most Fiber setups do NOT have a modem as they have networking bits already in the light in the fiber. They do "media conversion" between fiber and copper.

And if you want to dig deeper look into how DSP (Digital Signal Processing) works, Fourier Transforms, and how Wi-Fi radios encode things, and so on.

[–] [email protected] 2 points 11 months ago

It modulates and demodulates. It's right in the name 🤷 duh /s

[–] [email protected] 1 points 11 months ago

So things are sent through the wire, that needs to be demodulated coming from the ISP, and modulated to go back to the ISP> Hence the title, module and demodulate. It takes the digital information, transforms it into an analog format (most often through coax cable where I live.

[–] [email protected] 1 points 11 months ago

It modulates and demodulates.

[–] [email protected] 1 points 11 months ago

Let's use a non-techy example. I speak English (your home network for this analogy), and I'm trying to converse with a person who speaks Chinese (the wider internet). Neither of us understands the other's language, leading me to find someone who speaks both to interpret (the modem). The interpreter listens to what I have to say and then repeats it to the other party in Chinese. The Chinese person gives a response, which the interpreter repeats back to me in English.

[–] [email protected] 1 points 11 months ago (1 children)

The modem device bridges between the local network and the WAN. The physical medium of the WAN is designed to cover longer distances.

Modems used to use audio signaling to send data over phone lines. Nowadays they generally use higher frequencies such as radio signals or optical to send data over radio link, DSL, cable, or fiber media.

The modem device encodes and error checks/corrects, converts and transmits the data -- between the different LAN-WAN protocols / physical layers.

MoDem stands for modulator-demodulator. That implies an audio or RF "baseband" signal being "modulated" (the carrier frequency shifted) to encode the data onto the physical layer.

However, modern modems use DAC/ADC (analog-digital/digital-analog converter) modules to transmit/receive the analog signals and directly convert to/from digital (logic level) signals. They don't need the intermediate step of generating a baseband carrier frequency and then modulating it. Hence the modern modem may actually be an SDR (software-defined radio). SDR can cover a huge frequency range and any encoding/modulation -- defined only by the software!

In fact, some newer radio transceivers use SDR for its flexibility. For example, Flex / Anan radio transceivers. Some designers have repurposed commodity modem chips to create less expensive SDR transceivers. There are now Ham Radio transceivers based on this concept.

[–] [email protected] 2 points 11 months ago (1 children)

A modem device bridges between the local area network (LAN) and the wide area network (WAN).

Nope. A modem can be a part of a box doing this but not always.

[–] [email protected] 1 points 11 months ago

Yes, of course. Feel free to explain it better!

[–] [email protected] 1 points 11 months ago
[–] [email protected] 1 points 11 months ago

It just changes the way the data looks so it can travel on a different cable. Modulates/demodulates the data/signal. The ISP doesn’t use Ethernet to transmit the data so to transmit the same data it needs to change they way it look. Kind of like taking normal book text and converting it into braille so a blind person can read it.

[–] [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.

[–] [email protected] 1 points 11 months ago (1 children)

The problem you’re running into is that many modern ISP’s combine the router, modem, switch, and access point all into a single piece of shitty hardware.

[–] [email protected] 1 points 11 months ago

"Shitty" is being generous most times.

[–] [email protected] 1 points 11 months ago

The term "modem" is a contraction of "modulator-demodulator".

If one wants to send/transmit a binary digit (zero or one) through a length of wire, one of the easiest ways to do that is to make the wire at some predetermined voltage for the zero symbol, and some other predetermined voltage for the one symbol, with respect to ground. This is known as modulation, more specifically voltage modulation. The voltages are arbitrary.

(Other forms of modulation include frequency modulation and phase modulation, which would work over wired or wireless/radio communication. The principles of modulation don't care what kind of modulation it is, so this explainer will stick with wired voltage modulation even where practice would use something else.)

For an ideal wire, the voltage signal at the far end will be the same as the near end. A receiver can detect the voltage signal and check if it matches the voltage for the zero symbol, or matches voltage for the one symbol. Detecting and checking is known as demodulation. Symbols that go in one end can be detected at the far end.

Unfortunately, we can't buy ideal wires; nobody has them in stock.

For our wires, physics limitations (such as but not limited to wire resistance) come into play and the voltage at the far end will be different than what we put in at the near end. However, a receiver can detect the voltage signal and decide if it is closer to the voltage for zero, or closer to the voltage for one, and use that to determine the symbol received. However, eventually the wire gets so long and resistance so high that we can't tell the difference between the received voltage for zero/one.

One solution is to break the wire into two. We then insert an ideal amplifier at the half-way point, where we still have enough voltage signal to detect zero/one, and we make it "louder". It might appear obvious that we can continue to divide the wire into segments with an ideal amplifier on each one to get any length of transmission.

Unfortunately, we can't buy ideal amplifiers; nobody has them in stock.

For our amplifiers, each one makes the voltage signal "louder", but also adds unpredictable noise. And the next one down the line both amplifies the desired voltage signal, but also the unpredictable noise, making both "louder", before adding yet more unpredictable noise. So it is entirely possible that by the time we get to the far end, we have so much noise that the received voltage signal can no longer be reliably detected to be a zero/one symbol.

We can fix that by replacing amplifiers with custom repeaters. These custom repeaters know what voltage should be there for a zero/one symbol. Rather than simply making the incoming signal "louder", they detect the incoming symbol, and then drive the predetermined voltage signal for that symbol, along with the unavoidable noise. But in this case, the noise received from the previous length has been eliminated.

So now we can send a zero symbol or one symbol reliably over a cable of any length, but what happens when we want to send more than one? We have to change the voltage for each new symbol.

There is a new physics issue here. No matter how rapidly we raise or lower the voltage signal on the near end of a wire segment, the far end of the wire segment will more slowly transition (ramp) from one voltage to the other. This causes issues for the repeaters, because during that transition, there is a time where the input is more or less in the middle, and it isn't clear whether they are detecting a zero/one symbol. And noise from the repeater makes the symbol further ambiguous.

If we change the voltage once per minute, we're fine because the receiver can simply check a couple times per minute and average the readings to safely determine a single zero/one symbol. But that sending frequency would require 100 years to send a single picture that would fill today's screens.

So what happens if we change the voltage faster? Eventually we reach a physics limit what the wires can carry or what the repeaters can repeat, and the zero/one symbols start to blend into each other (a form of intersymbol interference.) This limiting frequency is the fastest we can change the symbols.

Some clever folks realized that instead of a two predefined voltages for the two symbols of zero/one, they could choose four predefined voltages for the four symbols of 00/01/10/11. This requires that each receiver (including the repeaters) is now more complicated and expensive because it must detect one of four voltages. We still have the practically the same limit for the fastest frequency to change the symbols. But at that same frequency, we are now sending twice as much data.

It is clear this can be extended to larger collections (constellations) of symbols, following the rules of 2^N. Three bits would have eight symbols, six bits would be sixty-four symbols. Each time we increase the number of bits transmitted per symbol, we get an increase in the data rate.

It would seem that data rate should be unlimited, except that our physics limitations make it really hard to reliably detect which symbol was received for high-order constellations. Our network of wire lengths and repeaters was chosen/tuned to work for only two symbols. When we try to put higher rate constellations of symbols into our network, we also have to replace all of our custom repeaters! We also have to shorten the wire lengths of each segment and increase the number of repeaters for the same distance.

It is also really difficult and expensive to design and build receivers that can detect higher rate constellations of symbols. [As of this writing Nov 2023, the highest order constellations of symbols planned are 12-bit (4096 symbols) but I'm not aware of any systems where that is widely deployed.]

Note that in practice, repeaters are not often used because, for the reasons listed above, they have to be replaced anytime you change the number of symbols used. So instead of repeaters, most networks use amplifiers with all of their difficulties.

A bit outside the scope of "How the f*ck does a modem work?" and moving more into the degree-required area, there is one more improvement that is notable. Some more clever folks realized that by slightly limiting the number of symbols that are sent, they can improve the reliability of the connection even if the channel of wires/amplifiers has a lot of noise and degradation.

To explain what they did, imagine a system of 6-bit symbols. We switch gears from voltage modulation to frequency modulation, so each symbol corresponds to a specific predetermined frequency. For explanation purposes, we choose those frequencies arbitrarily to be the highest 64 keys of those on a piano keyboard. If we play those frequencies into the channel and have someone with perfect pitch listening on the far end, we hope they are able to determine which of those 64 notes is being struck each time.

However, noise in the channel means that sometimes it will be ambiguous which note was used; e.g. it kind of sounds like middle F or maybe middle F-sharp/G-flat. If we prearrange that we will only play in the key of C-major, then some of the notes will not be used, but that makes it easier for the listener with perfect pitch (receiver) to guess which note it was. In the example above, middle F#/Gb is not part of the C-major scale, so the received note must be middle F. Resolving such an ambiguity of a received symbol based on probability following predetermined rules is named the Viterbi algorithm, named after one of the inventors.

[–] [email protected] 1 points 11 months ago

For cable internet there is a CMTS at the cable TV headendThe return path, your uplink covers from 5mhz to 42mhz. Your downlink 54 MHz to 860 MHz.

The CMTS modulates on the downstream using QAM this encodes on this analog signal via 256QAM.

To correct for Errors Reid Solomen encoding is used.

Your baseband data (digital) is converted into symbol bits than modulated in an broadband signal (analog) with 256 points of interest that are monitored for changes in frequency, amplitude and by extension phase.

Your Modem, takes these QAM signals demodulates the analog signal to extract the symbol bits. Then it turns it back into digital data and it comes out your ethernet port as baseband.

The reverse process is done on your upstream.

Analog is used for all but fiber optic data networks as its far more efficient per mhz of radio spectrum used. If you have fiber to the home its digital baseband the whole way like your ethernet cable.

Rather than broadband like dsl,catv, wifi, LTE, 5g, satellite, etc.

Multiple channels can be put together to enable upwards of 10 gigaits per second of capacity on a modern catv plant.

This all happens on layer 1 of the OSI model, (physical) until its handed off via a bridge to your port you plug your modem in.

American politicians have become confused between the meaning of broadband and baseband, rather confusingly trying to redefine it as a measure of speed rather than a technical term to differentiate between digital and analog signaling.

Technically an ONT for fiber to the home is a bridge (layer 2) or router (layer 3) if it doesn't have a coax port for television.

This is a grossly oversimplified technical explanation, if I went in depth this would be probably 3-4 chapters in a technical manual. 5+ if I included pictures and examples of how the framing bandwidth (analog in mhz) and signaling works.

[–] [email protected] 1 points 11 months ago

Wow, so many lousy answers in here. ...

The first question should be; Which kind of modem are you inquiring about as many different technologies exist.

There are many different types of Modems and each is unique, some examples include ...

  1. Radio frequency modulator demodulator (Modem)

2.Telephone Modems.Dual Tone Multi Frequency (DTMF)

  1. Satellite Modems.

  2. Digital Subscriber Line (DSL)

  3. Cellular Modems.

  4. Cable Television Modems.

ASSUMING you are referring to the one from a Cable TV ISP which hands off an RJ-45 Ethernet connection it's known as a ...

"Hybrid fiber-coaxial" (HFC) Network.

https://en.m.wikipedia.org/wiki/Hybrid_fiber-coaxial

The protocol which runs on such networks is known as the

"Data Over Cable Service Interface Specification (DOCSIS)"

Patented by: Robert Cruickshank III who built and led the CableLabs team that developed, tested, and certified the DOCSIS standard cable modem.

https://en.m.wikipedia.org/wiki/DOCSIS

As for the actual electrical/ electronic mechanism enabling the protocols algorithm, it's known as ..

"Phase-shift keying"

https://en.m.wikipedia.org/wiki/Phase-shift_keying

☆ The bottom line though,

Is that it's really not even technically a modem, rather it's actually a protocol converter which translates one digital standard into another.

How's that for an answer 🤔

Happy Turkey!

[–] [email protected] 1 points 11 months ago

Here is a training video for IT pros on how cable modems worth.

[–] [email protected] 1 points 11 months ago

How deep are you willing to go.

I'm a computer engineer, I design and develop embedded systems like modems, TCU, ECU and many others.

If you want to understand how a modem works, truly understand everything. You need to first understand some basic physics primarily electromagnetism and the property of waves.

From there you can jump to a higher abstracted level such as amplitude modulation, frequency modulation and phase modulation. From this you can try to read up on Quadrature amplitude modulation.

You can also use this to understand demodulation.

Then jump back to the lower level and study up signal theory and how these things work.

Honestly the level of information to fully understand how a device like a modem is huge.

If you love this stuff and you're still young I would encourage you to become a computer engineer with a focus in asic. It's not easy but the stuff you work on is rewarding.

[–] [email protected] 1 points 11 months ago

Machine Spirit.

[–] [email protected] 1 points 11 months ago

Cable modems use the DOCSIS standard. On the downstream to everyone's house, everyone's data packets are combined by a CMTS into electrical signals using various modulation techniques. Modems extract the data addressed to that home and convert it to ethernet. For the upstream, modem's are given specific time slots to broadcast (time division multiplex) so their signals do not collide with other modems.

It is more complex than that covering both MAC-PHY (layer 2 and 1), but over that it's just IPs. If you want to know more, I would start looking for introductory material on DOCSIS.

[–] [email protected] 1 points 11 months ago

Yeah man I got you. Go to your local community college and take a course on IP networking. Then if you want to go deeper take some courses on physics and RF.

But yeah... a modem is a modulator demodulator. It modulates an IP stream into RF over whatever medium the modem is made for (Coax, fiber, copper, satellite, etc.). And back. The rest is just IP networking.

[–] [email protected] 1 points 11 months ago

I feel your pain on that,there are many rabbit holes about many different ones out in the wild.
Either gonna find a plug in power plug in cable plug in computer description, or every math formula in existance to describe how it sent one of ten trillion packets that one unique time to the billion different ways it can send them.

[–] [email protected] 1 points 11 months ago (3 children)

The straight answer is a modem bridges and translates between layers in the OSI model, typically layers 1&2 (physical and data) on one side (your coax for cable or fiber) and layers 3&4 (IP and TCP, the typical protocols for home networking) on the other side. We used to call modems the devices that would do that translation over a phone line, and we would call the devices that connected two different network types bridges (like coax or microwaves to Ethernet or token ring), but now we call what are really bridges modems for home networking deployments.

To get between ELI5 and PhD, dig into some good telecom textbooks and focus on the fundamentals like the OSI model, time-division multiplexing (TDM), frequency-division multiplexing (FDM), DOCSIS, how to send binary data over radio, etc.

[–] [email protected] 2 points 11 months ago (1 children)

But all these layers exist on both sides of a modem. Really the modem is translating between a type of physical/data layer on one side (e.g. twisted pair ethernet) to a different physical/data layer on the other side (e.g. docsis)

[–] [email protected] 1 points 11 months ago

That's why technically, it's a "bridge". When DOCSIS was deployed for the consumer market, marketing continued to sell the electronics box at the point of demarcation (DEMARC) as a "modem".

[–] [email protected] 1 points 11 months ago

Nice concise explanation. Would like to add that a modem originally were useful to be able to modulate and demodulate analog signals to and from digital signals due to limitations on most phone lines to allow for higher speeds than was practical if trying to transmit pure digital signals on them due to bad noise suppression.

[–] [email protected] 1 points 11 months ago

OSI Layers are bullshit leftovers from the past, they're no longer applicable in modern computing.

[–] [email protected] 1 points 11 months ago

You'll get a better answer on something like r/embedded. I.e. seek out the people who work on them.

Here's the less-then-degree answer: Think about a telephone dial tone or key press sound. That's sending a digital command over audio. You're sending a tone that the other side can pick up and turn back into a number. You can step up higher and higher in frequency to send more information. This was originally what they called broadband, when it got high enough in frequency to go outside the audible range. There's other techniques besides just tones, like phase differences between two signals (think how headsets can mimic directional sound). You could use this to encode much more information than just frequency alone. As modems get "faster" we're moving to more complicated algorithms to send data.