The public switched telephone network (PSTN) is the network of the world's public circuit-switched telephone networks. It consists of telephone lines, fiber optic cables, microwave transmission links, cellular networks, communications satellites, and undersea telephone cables, all inter-connected by switching centers, thus allowing any telephone in the world to communicate with any other. Originally a network of fixed-line analog telephone systems, the PSTN is now almost entirely digital in its core and includes mobile as well as fixed telephones.
The technical operation of the PSTN utilizes standards created by the ITU-T. These standards allow different networks in different countries to interconnect seamlessly. There is also a single global address space for telephone numbers based on the E.163 and E.164 standards. The combination of the interconnected networks and the single numbering plan make it possible for any phone in the world to dial any other phone.
The PSTN network architecture had to evolve over the years to support increasing numbers of subscribers, calls, connections to other countries, direct dialling and so on. The model developed by the US and Canada was adopted by other nations, with adaptations for local markets.
The original concept was that the telephone exchanges are arranged into hierarchies, so that if a call cannot be handled in a local cluster, it is passed to one higher up for onward routing. This reduced the number of connecting trunks required between operators over long distances and also kept local traffic separate.
However, in modern networks the cost of transmission and equipment is lower and, although hierarchies still exist, they are much flatter, with perhaps only two layers.
As described above, most automated telephone exchanges now use digital switching rather than mechanical or analog switching. The trunks connecting the exchanges are also digital, called circuits or channels. However analog two-wire circuits are still used to connect the last mile from the exchange to the telephone in the home (also called the local loop). To carry a typical phone call from a calling party to a called party, the analog audio signal is digitized at an 8 kHz sample rate with 8-bit resolution using a special type of nonlinear pulse code modulation known as G.711. The call is then transmitted from one end to another via telephone exchanges. The call is switched using a call set up protocol (usually ISUP) between the telephone exchanges under an overall routing strategy.
The call is carried over the PSTN using a 64 kbit/s channel, originally designed by Bell Labs. The name given to this channel is Digital Signal 0 (DS0). The DS0 circuit is the basic granularity of circuit switching in a telephone exchange. A DS0 is also known as a timeslot because DS0s are aggregated in time-division multiplexing (TDM) equipment to form higher capacity communication links.
A Digital Signal 1 (DS1) circuit carries 24 DS0s on a North American or Japanese T-carrier (T1) line, or 32 DS0s (30 for calls plus two for framing and signaling) on an E-carrier (E1) line used in most other countries. In modern networks, the multiplexing function is moved as close to the end user as possible, usually into cabinets at the roadside in residential areas, or into large business premises.
These aggregated circuits are conveyed from the initial multiplexer to the exchange over a set of equipment collectively known as the access network. The access network and inter-exchange transport use synchronous optical transmission, for example, SONET and Synchronous Digital Hierarchy (SDH) technologies, although some parts still use the older PDH technology.
Within the access network, there are a number of reference points defined. Most of these are of interest mainly to ISDN but one â€“ the V reference point â€“ is of more general interest. This is the reference point between a primary multiplexer and an exchange. The protocols at this reference point were standardized in ETSI areas as the V5 interface.
A 56k modem is a voiceband modem nominally capable of download speeds up to 56 kbit/s (56,000 bits per second). In the late 1990s, they were the most popular access method for personal Internet usage, but their use has declined in the developed world as broadband internet technologies such as DSL and cable internet, along with mobile data services such as 4G, have been more widely adopted and made available. In other parts of the world, ad hoc wireless networks are being more widely deployed.
The 56 kbit/s theoretical speed is only possible when the system being dialled into has a digital connection to the telephone system, such as DS0 service. By the time 56k modems came into use, most of the telephone system beyond the local loop was already digital, so the new 56k protocols took advantage of this.
If both calling party and called party have an analog connection, the voiceband signal will be converted from analog to digital and then back to analog. Each conversion adds noise, and there will be too much noise from the second conversion for 56k to work. The modem's negotiation processes will fall back to the less demanding 33.6 kbit/s mode. Other local loop conditions, such as certain antiquated pair gain systems, may have similar results.
In 8-N-1 connections (1 start bit, 8 data bits, No parity bit, 1 stop bit), which were typical before LAPM became widespread, the actual throughput is a maximum of 5.6 kilobytes per second, since ten bits are transmitted for every 8-bit byte, although effective throughput can be increased as high as 32 kbytes/s using internal compression, or 100 kbytes/s using ISP-side compression.
Effective throughput will vary, depending on framing protocols, noise, data compression, and other factors. See V.42 and Comparison of synchronous and asynchronous signalling article for more detail.
The upload speed is 33.6 kbit/s if an analog voiceband modem is used (V.90), or 48.0 kbit/s using a digital modem (V.92). Due to the design of public telecommunications networks, higher speed dialup modems are unlikely to ever appear. Also, depending on the quality of the line conditions, the user may not be able to reach this maximum speed. While faster communications such as DSL and cable modems became widely available to urban consumers in the early 2000s in the United States, dial-up Internet access remains common, since high speed rural Internet connections are often scarce and because people may still use it to send faxes.
An image of modem
Computers are Digital; phone lines are Analog.
Computers are all digital inside. There is hardly any analog logic used. This is convenient, since it makes it possible for the machine to deal with great amounts of data at high speeds. Phone lines on the other hand, are analog by definition. They were designed to carry Voice traffic, which was being transformed into an Electrical signal by a Microphone. This signal is analog, and therefore the phone line is analog.
To make something digital talk over an analog line, you need to do 'something' to the digital signal. In a computer for example, a digital signal is represented by the presence or lack of an electrical current. Over a phone line, this cannot be done. However, if you have a way to make this current into a tone, you could make an analog representation of the digital data. Since the phone line was designed to carry tones, you should thus be able to carry digital data in the form of analog tones.
Digital to Analog: the Modem.
So what a modem does is really this: It reads the computers 'digital' signals, and makes them into tones. These tones are sent over the phone line. The modem on the other end listens; it picks up the tones, and transforms them back into digital signals that get sent to a computer. This function is referred to as Digital to Analog or D/A conversion, and Analog to Digital, or A/D conversion.
Practical description of a simple modem.
First we will look at how a simple modem works. Let's say we have one computer that wishes to call another. The modem on one end will dial on the line. The other side will ring; the modem will 'hear' the ring, and answer the call. Now, how do the modems know that the line is 'open' and 'working?'
On the receiving end, the modem will, immediately after answering the call, put a tone on the line. This tone will be a set frequency. The modem on the other end will listen to this tone, and recognize it as being 'A modem.' A human would not make that tone, so the modem knows right away whether it misdialed.
This initial Guard Tone is followed by a transmission from the receiving modem of what is called an Unmodulated Carrier. This is again a continuous tone of a set frequency. Depending on the speed the modem is trying to talk at, this tone will have a different pitch. The calling modem will listen for a pitch it recognizes.
If it hears one, it will also start sending a carrier. These Carriers will stay up throughout the modem connection. As long as there is a carrier, there is a connection. If the carrier is gone, the connection is broken. This is why most External modems have a carrier Detect, or CD light. it will normally only be lit when there is a carrier.
The two carriers are on different pitches or Frequencies. Both the Sending and Receiving carrier will exist at any given time on a connection, on the modem connections we deal with today.
Now that this is completed, as soon as both modems hear each other, they turn on the Carrier Detect light. This means the two modems have agreed on a carrier frequency pair, and are 'ready to talk'. Now, each modem can start accepting digital data from the computer connected to it. This data will come in as a stream of digital ones or zeroes. The modem takes these, and makes them into little frequency changes. These changes are sent over the line. However, the receiving modem will need to know when to start listening for data. For example, if we send all 0's, there would not be a change in tone!
This is why all serial communications like this, without a set clock to time what happens, use a chip called a UART. It adds some data to the data you want to send. In this case, we will need to add a notifier to let the modems know we will start sending data. This is done by sending one bit to start, a Start Bit. Then we will send the data bits, and then we will follow it by another bit, saying that we're done, the stop bit. The other end also has a UART, which will strip off the start and stop bits, so that the data comes out the other end looking the same as it did when you put it in.
Technically speaking, if everything goes right, we now have a great system of talking digital over an Analog line... but of course, not everything always goes right...
So if you think about it, sending Data over a modem line is no more than sending an endless series of 'beeps' of a slightly different pitch. Of course, for every bit there needs to be a beep. Needless to say that the faster the beeps can flow, the faster your bits will go.
Everyone making a phone call has heard a hiss, popping sound, or someone else's phone conversation on their line. Well, the same thing happens to modems. And since they just send 'beeps' what would happen? For example, what would happen if you lose one or a couple of these data bits? What would happen if you suddenly started seeing Data Beeps as Start and Stop beeps?
With old phone lines, this was of course a big problem... Speaking of problems: We did not even agree yet on how many bits we would send between Start and Stop, and what speed we would send bits on! So there is a lot left to do.
Let's say we pick a nice number of bits to get Data across. For example, we can pick 7 bits to be able to send clear ASCII text over a modem. We call this number the Data bits. Then we could do some simple error checking, a Parity check.
A parity (No, Not purity!) check does a very simple trick. It defines whether the sum of all bits in a data packet is an even or an odd number. For example, the data packet 1111110 is even since the sum of all the bits is 6, which is an even number. On the other hand, 1111111 is odd, since the sum of all the bits is 7, which is an odd number.
Of course, data can be either even or odd; but if one or more of the bits in the data change; there is a pretty good chance it will come out the wrong way. But... If it comes out wrong, how do we know??
Before the communications begin, they must agree on Even or Odd communications. What the computers will do is add in one extra bit to each set of data; this is called the parity bit. This bit is set or unset, to make sure the data will pass the parity test. For example, say you agree on even parity. That means the sum of all bits should be an even number. So to send 1111111 over the line, you would need to set the parity bit to 1. The 1111111 makes an Odd parity, plus the 1 for parity makes it Even, so this byte matches!
The same goes for the sequence 1111110. It is already an even number (6), so you add a 0 bit to the end for parity. Now if both sides agree on the parity, you got yerselves a nice deal; you can catch simple errors in the data (your parity will be wrong), AND you can catch it when you go Out Of Sync (you will not see the Sync bits at the right times anymore..), AND you can see when the line is still okay (You still hear the base carrier).
Putting it all together: Line Parameters.
So, the four parameters we described above really define the essence of the mode link. How Fast, How Many Data bits, What Parity, how many stop bits. This is usually described in a cryptic way; for example to say 300 bits per second, 7 databits, even party, one stop bit we usually just say 300 bps, 7E1. We agree we will always send one start bit.
The technique described above will work pretty well on clean lines at 300 bps or 300 baud. But what if we go faster? Well, simple: Just make the tones shorter! This works pretty good up to about 2400 tones per second or Baud. And then, you run into a new problem: The changes in frequency would happen faster than you could hear them on the line! So you could not hear individual tones anymore, simply since the audio quality of the phone line is not good enough!
What we are already doing though, is sending more than one tone at once; we have one tone for each of the two modems. So, what would happen if we fit more than one tone going in each direction on the line? The speed at which the tones keep changing will be the same, but there will be more than one tone at the line going in each direction at any given time.
Baud vs. Bits Per Second.
This technique will allow for every time unit on the line to carry more than just one piece of data, and that is where the difference between Baud and bps comes in. The Baud rate on a line indicates how many changes in tones per second there are; for example, on a 300 baud line there are 300 changes per second. On a 2400 baud line there are 2400.
The bits per Second rate explains how many bits can go over the line. For example, on a 300 bps modem connection, there is a 300 baud link, so there are only two sets of frequencies in use. On a 2400 bps line, there's 2400 baud speed, and one bit per baud unit.
Jumping from 2400 to 9600.
So why did modems go from 2400 to 9600 bps? Well.. they started putting more than one Bit in a Baud. On a 2400 bit line, there are 4 frequencies in use: Originate 0, originate 1, Receive 0, Receive 1. Each may change up to 2400 times a second.
On a 9600 bps line, the number of changes is the same; there are, however, more originate and send channels, 4 to be exact, which are all used simultaneously. Of course, this means there are more different frequencies on the line at each time, and that means the line needs to be 'cleaner.'
And 14400? Does it amaze you that this is 6*2400? And 28.8? 12*2400? So how far can we go?? Well.. it all depends on how many beeps we can send on a line simultaneously.
A way to measure this is Frequency Response on a line; this number defines the lowest and highest sounds a line will reproduce. There are standards for this, and about 150 Hertz to 6 Kilohertz is what a phone line will handle, with the peak performance in the 1500-300 Hertz range. Most distortions are clicks, pops and hums (low frequencies) and hisses, whistles and static (high frequencies). So the cleanest part of a line is 'in the middle,' which is where 9600 bps and lower speed modems have all their frequencies mapped. As a matter of fact, 9600 bps is guaranteed to work over all phone lines that adhere to the Bellcore Standard.
The higher you try to get your speed, the more you will get into the range of the noise on your line. 14,400 is more or less sensitive to this. 28.8, since it uses most of the frequencies available, most certainly is. These things did, of course, not go unnoticed: more speed on the lines caused more errors sooner. And not every error can be caught by Parity checks at higher speeds. Think about it: if a POP causes one bit to be lost at a 300 bps/Baud connection, it will cause 4 bits to be lost on a 1200 bps and 8 bits to be lost on a 2400 bps connection!
So, smart as humans are, we thought up a way to work around this. We defined a protocol that makes agreements between modems on how to handle data. It will take a block of data and calculate a checksum on it. This is a mathematical trick to describe the data in the block. This checksum will reflect changes in the block fairly accurately. What a modem will do with this Error Correction is calculate the data checksums as the data flows. Every so often it will pass on the Checksum numbers to the other side. This can, for example, be done every 128 bytes or less.
The other side also keeps a checksum and compares the two checksums when the block of data is complete. If there is an error, it will kindly ask the other side to re-send the block of data. Of course, it takes some time to do this, and if a block needs to be re-sent, this will be noticeable as a delay. But the data going from one side to the other will be correct, almost 100% guaranteed.
This Error Correction technology started out under the name MNP, it evolved all the way to MNP-4. Mainly performance improvements were made up to this point. Then the technique was adopted into the V.42 national standard.
In more modern error correction protocols, such as MNP-4 and V.42, the data is sent over the line Synchronously. The Error Correction Protocol puts little Synchronization Bits on the line, which the other end receives. Since they now have a Synchronized Clock that they agree on, they can just send data in-between those Clock pulses. Then, they do their own Error Correction, so why send the Parity Bits over the line? In other words, in modern modems with Error Correction, the actual transfer over the line is Synchronous. The modem on either end, and the computer on either end, use UART chips to translate from Synchronous to Asynchronous data.
And of course, with more demands on the phone lines, people started looking for ways to better adapt a modem to a phone line. One of the things used in home stereos to better adopt the speaker sound to your room is an Equalizer; a thing that can add or remove low or high tones, to respond to your room. Well, modem manufacturers did the same with the phone line.
They designed circuitry in the modem that will measure on a phone line how it responds to certain frequencies; some may need to be sent a little louder, some a little less loud. And on some lines, there may be frequencies that can not be used at all. So modems can then decide to not use certain frequencies and to use others.
And then Compression Technology came along. If you look at a stream of data, you can sometimes find patterns in it. For example instead of saying 0101 0101 0101 0101 0101 0101 0101 0101 You could say 8 times 0101, which may be shorter. This would mean that the slowest determining factor on a modem line - The actual line speed - would no longer be an issue.
So modem manufacturers got together and upgraded MNP-4 to MNP-5, and V.42 to V.42Bis. These protocols do the following two things: They still do all the error correction that we talked about before, but in addition they attempt to compress the data. But to do so, they will need some time and a little data to play with, so they need to be talking to the computer at higher speeds than they are on the line, assuming that they can compress the data and no errors occur.
The data is then compressed at one side, before it goes over the line, it is sent over the line at the good old speed of 2400 BAUD and 2400, 9600, 14400 or 28800 bps, and on the other side it is decompressed and fed to the receiving computer at the higher speed.
Once again: Making a connection.
Now that there are more things that can be done whilst making a connection, more speeds, line equalization, error correction and compression, things are becoming a bit more complicated when we make a connection.. Let's look at the steps again:
The Caller (The side we call the Originate) calls out, the other side (the Answer side) rings and picks up. Answer will send the Modem tone, then it will send an unmodulated carrier. The Originate modem will listen, and wait until it hears a carrier it knows. When it does so, it will also send out a carrier, which is slightly lower in pitch. To us, we have so far: Dialing, Ringing, High tone with Dips in it, higher continuous tone, static.
Now, the Answer will do the same, and we have two carriers. Next, the modems will query each other about their capabilities. This is done by adding carriers. The Answer will add all carriers it can; in the case of a 9600 modem 3, in the case of a 28,800 modem 11. Originate will hear this and answer with all carriers it knows. In some protocols, this is heard as a series of beeps going from low to high, in some others it just appears there is another burst of static.
Carriers that remain unanswered will be dropped. A 14.4 modem for example, dialing into a 28.8 modem, will only recognize and answer the 14.4 carriers. The 28.8 modem will drop the rest and they will start talking at 14.4. Depending on the line quality, some carriers may not be heard, this is how strange speeds like 21600 bps come to be.
Now that the modems are talking, they will go through the Adoptive Equalization stage. You hear this as a short low buzz, followed by a lower Hiss, then another beep and a higher Hiss, then another beep and the 'normal sounding hiss.' During these stages, the modems have measured the quality of the line. They will change how they transmit and listen to compensate for line imperfections.
If all goes well, the speaker will now shutup, and the CD light will come on. The modems have now successfully managed to talk to each other. Next, they start 'talking' over the carriers. The conversation goes in the form of questions and answers. The Answerer will ask whether it is okay to do MNP-2, MNP-3, MNP-4, MNP-5, V.42, V.42Bis, etc. etc. The two modems will shortly arrive at a mutual conclusion, and now they are ready to start sending and receiving data. Some modems wait until this point to turn on Carrier Detect. This entire process the modems go through to build up a connection is referred to as Handshaking. At this point, the traffic on the line will most likely be Synchronous, that between the modem and computer will be Asynchronous.
The modems will now talk until the connection is broken, or until things go wrong...
Retrain, Fall Back and Fall Forward.
The modems continuously monitor the status of the line; the quality of the signals they get, the number of errors corrected, the validity of data on each of the carriers. When the modems see excessive problems, they can ask for a re-evaluation of the line. This is done by interrupting the carriers, and sending a low burst tone on the line. Now, the modems will again go through the process of sending out carriers, and doing the adoptive line equalization. This process is called retraining, and may occur at any time. You will hear that your speaker comes on, and your modem starts hissing again.
Usually, the initial re-train will result in a 2400 bps connection. This uses only a limited number (2) carriers, and thus will most likely work. This process is called Automatic Fall Back. After a while, if we see few errors, we will again try to re-train. This time, more carriers will be used. Hopefully, if a connection with multiple carriers is indeed successful, our speed will come back up. This process is called Fall Forward.
Both Fall back and Fall Forward sequences are controlled by the modems; both sides of the line must support this feature for it to work. On modems that do not support this feature, or that do not support retrains, the connection will often seem to 'drop' on poor lines.
The amount of time allowed without a carrier can be configured; it is a good idea to set this to a longer time, such as 20 seconds, and to set the retrain period to a longer period, such as 10 seconds. This way, if someone picks up a telephone, or a call-waiting tone is received, modems may retrain and stay online, instead of loosing a connection.
Problems in Handshaking, Retraining, Fall Forward and Fall Back.
It should be obvious that the way a modem handles the training, handshaking, Fall Forward and Fall Back procedures will play a large role in the performance of the modem. This is one of the places were manufacturers try to make their mark, by adding and/or removing features. The most problems happen with Error Correction and Compression.
A lot of manufacturers make their own non-standard protocols. These are built to not interact with standard protocols.. But they are not always able to avoid interaction with non-standard protocols! This is why sometimes modems of one brand have trouble dialing into, or dialing in on, modems from another brand.
U.S. Robotics is a prime example; when driving the negotiation (i.e. being the Answer modem) things go fine, when Originating (i.e. listening to other people's questions) things sometimes go wrong. Especially when negotiating Data Compression and Error Correction, or when determining Carrier Frequencies, things tend to go wrong. A good way to prevent this from happening is to turn the specific feature that causes the problem off, for example: U.S. Robotics in Originate mode works a lot better without Compression enabled.