CSIT 220 (Blum)1 Modems Based on material from Chapter 6 in Computer Networks and Internets (Comer,...

58
CSIT 220 (Blum) 1 Modems Based on material from Chapter 6 in Computer Networks and Internets (Comer, Third Edition)

Transcript of CSIT 220 (Blum)1 Modems Based on material from Chapter 6 in Computer Networks and Internets (Comer,...

CSIT 220 (Blum) 1

Modems

Based on material from Chapter 6 in Computer Networks and Internets

(Comer, Third Edition)

CSIT 220 (Blum) 2

Local versus Non-Local Communication

• RS-232 is a local means of communication.

• It can be used for a computer to communicate with a modem (modulator-demodulator) but the modem prepares the signal to be sent over greater distances.

CSIT 220 (Blum) 3

Modem

• A modem converts a digital signal to an analog (actually pseudo-analog) signal more suited for transmission over long distances or receives the analog signal and converts it to the corresponding digital signal.

• That is, it modulates and demodulates. • The carrier wave is an alternating current with a

frequency in the AF (audio frequency range).

CSIT 220 (Blum) 4

Attenuation• Attenuation is the lowering of signal’s amplitude

(size and strength) that occurs while the signal is transmitted. – The opposite of attenuation is amplification.

• Too much attenuation leads to a loss of information.

• Repeaters detect the signal before it becomes too weak and amplify it.

• Different frequencies different amount of attenuation.

CSIT 220 (Blum) 5

Attenuation

CSIT 220 (Blum) 6

Waveform • The waveform is the shape of the wave

(voltage, current, electric field, etc.) as a function of time.

• Some standard waveforms are– sinusoidal– square – sawtooth– ramped– triangular

CSIT 220 (Blum) 7

AC Voltage

-200

-100

0

100

200

0 0.01 0.02 0.03 0.04

Time (s)

Vo

ltag

e (V

)

Peak voltage

CSIT 220 (Blum) 8

Square

-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

CSIT 220 (Blum) 9

Saw Tooth

-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

CSIT 220 (Blum) 10

Ramp

-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

CSIT 220 (Blum) 11

Triangular

-1.5-1

-0.50

0.51

1.52

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

CSIT 220 (Blum) 12

RS-232

• The signal coming into an RS-232 port is an irregular (non-periodic) square wave

CSIT 220 (Blum) 13

Fourier Demo

• Fourier analysis states that waves that do not have a sinusoidal waveform can be thought of as being comprised of a set of sinusoidal waves of different frequencies added together.

• So a square wave is a lot of sine waves added together.

• Demo

CSIT 220 (Blum) 14

They all lose their shapes in the end

• The key phrase on the last page is “a lot,” it takes a lot a sine waves (especially those with high frequencies) to reproduce the sharp features in a square wave.

• Two problems– Dispersion: the speed of the sine waves can depend on

frequency.– The attenuation of the sine waves can depend on

frequency.

• The result: square waves don’t remain square.

CSIT 220 (Blum) 15

A simple sine wave• A simple sine wave is more robust to

attenuation, that is, it travels farther without significant damping (and it is unaffected by dispersion since it is only one frequency).

• The problem is that a simple sine wave carries little to no information.

CSIT 220 (Blum) 16

Carrier wave• The idea is to take advantage of a sine

wave’s robustness and use it as the starting point for carrying information.

• Changing (modulating) the wave inserts the information into the signal.

• If one does not deviate too much from the simple sine wave, the signal should travel long distances.

CSIT 220 (Blum) 17

Modulation

• Modulation is the layering of information on a carrier.

• Example: in a smoke signal, the carrier is a steady stream of smoke, and the modulation is provided by the blanket waving which puts variations into the stream of smoke.

• The telecommunication industry uses either alternating currents (wired) or electromagnetic waves (wireless) as the carrier.

CSIT 220 (Blum) 18

Modulation Types

• Amplitude modulation (AM): the wave’s amplitude (size) is varied over time.

• Frequency modulation (FM): the wave’s frequency (number of cycles per second) is varied over time.

• Phase modulation (PM), the wave’s phase (the part of the cycle it’s in) is varied with time.

CSIT 220 (Blum) 19

PSK

• Phase-shift keying (PSK) is the fancy name for phase modulation.

• Biphase: A simple version of PSK using only two phases: 0° and 180°. The state of each bit is determined according to the preceding one. The bit is 0 if the phase does not change and 1 if it changes by 180°.

CSIT 220 (Blum) 20

Phase shifts

Phase shifted Phase not shifted

CSIT 220 (Blum) 21

QAM

• Quadrature Amplitude Modulation: Uses a combination of four phases and two amplitudes to encode three bits per cycle. – With phases it’s not strictly the shape of the

wave that matters but the shape of one segment compared to the previous segment.

CSIT 220 (Blum) 22

PCM

• The previous modulation schemes prepared digital signals to be sent over an traditionally analog medium (the phone system).

• PCM (pulse code modulation), on the other hand, is a digital scheme for transmitting analog data.

• The analog signal is sampled and digitized (a process sometimes known as quantization).

• The receiver demodulates the wave recovering an analog form.

CSIT 220 (Blum) 23

Broadband and Baseband

• Broadband: Data transmission in which a medium (wire) conveys several signals at once. – Example: Cable TV

• Baseband: Data transmission in which a medium conveys one signal– Example: Most communications between

computers, LANS, modems, etc.

CSIT 220 (Blum) 24

Sideband• If one analyzes the set of frequencies that go into

making a modulated wave, a sideband is the part that is either above or below the carrier frequency.

• The higher frequencies are known as the upper sideband; the lower frequencies are called the lower sideband.

• In normal AM (amplitude modulation) transmission, both sidebands are used. But in some transmissions, one or part of a sideband may be removed.

CSIT 220 (Blum) 25

Multiplexing

• “Capable of transmitting two or more signals or messages ‘simultaneously’ on the same circuit or channel.”

• Many to one

• In this case, many signals to one channel.

CSIT 220 (Blum) 26

Multiplexing (Fig. 6.6)

Many signals (from different sources) being put on one shared channel.

CSIT 220 (Blum) 27

Multiplexing (Cont.)

• Dividing the bandwidth of a carrier so that multiple signals can be sent on the same carrier.

• The carrier is called a channel and each signal is called a subchannel.

• A multiplexer is a device that puts the various signals on the carrier.

CSIT 220 (Blum) 28

Basic schemes of Multiplexing• Frequency Division Multiplexing (FDM): uses

different frequencies simultaneously. • Time Division Multiplexing (TDM): breaks

transmission into various time segments and the different signals are assigned to a segment in a round-robin fashion.

• Statistical Time Division Multiplexing (STDM): time segments are assigned based on need.

• Wavelength Division Multiplexing (WDM): pretty much the same as FDM but used when referring to signals sent on optical fiber.

CSIT 220 (Blum) 29

FDM

• Frequency Division Multiplexing: sending a number of signals using different frequency ranges.

• Usually refers to sending signals over a wire.• If you applied the term to wireless

communication, radio and television would be an example of FDM. The signals for different radio stations are sent through the same medium (“the airways”) at the same time.

CSIT 220 (Blum) 30

TDM• Time Division Multiplexing: different

signals take turns (are assigned time slots). • TDM repeatedly transmits a fixed sequence

of time slots over a single transmission channel.

• T-1 and T-3 lines use a combination of TDM (time division multiplexing) and PCM (Pulse Code Modulation).

CSIT 220 (Blum) 31

T-1

• A dedicated phone connection supporting data rates of 1.544Mbits per second.

• Divided into 24 channels, each supporting 64Kbits per second.

• The channels can be configured to carry voice (analog) or data (digital) traffic.

• Most telephone companies allow one to purchase some of these 24 channels; this is called fractional T-1 access.

CSIT 220 (Blum) 32

T-1 (Cont.)

• Used by businesses for connecting to the Internet and by Internet Service Providers (ISPs) for connecting to the Internet backbone. The Internet backbone itself consists of faster T-3 connections.

• T-1’s are sometimes called DS1 lines.

• More later in the semester.

CSIT 220 (Blum) 33

T-3 Carrier

• A dedicated phone connection capable of transmitting data at 43 Mbps.

• Comprised of 672 individual channels (64 Kbps each).

• Used by Internet Service Providers (ISPs) for connecting to the backbone and for the backbone itself.

• T-3’s are sometimes called DS3 lines.

CSIT 220 (Blum) 34

WDM and DWDM

• Wavelength Division Multiplexing, and Dense Wavelength Division Multiplexing: same as FDM but applied to light as the carrier instead of electricity

CSIT 220 (Blum) 35

Spread Spectrum

• Term for varying the baseband or carrier frequency.

• This scheme is used in wireless communication (e.g. cell phones) for two reasons: – To make sure the signal gets through – To make sure the signal is not intercepted

CSIT 220 (Blum) 36

Spread spectrum (Cont.)

• First, a constant-frequency may experience catastrophic interference.

• This occurs when another signal is transmitted on, or very near, the frequency of the desired signal.

• Catastrophic interference can be accidental (as in amateur-radio communications) or it can be deliberate (as in wartime).

CSIT 220 (Blum) 37

Spread spectrum (Cont.)

• Second, a constant-frequency signal is easy to intercept, and is therefore not well suited to applications in which information must be kept confidential between the source (transmitting party) and destination (receiving party).

CSIT 220 (Blum) 38

Hedy and George

CSIT 220 (Blum) 39

Hedy Bio

• Nee Hedwig Eva Maria Keisler• Was in one of the first nude scenes in cinema history – in

the Czech film Ecstasy.• First husband was Fritz Mandl, arms producer/dealer in

1930’s Europe. • Escaped from Mandl and headed to Hollywood where she

took the name Hedy Lamarr. • Along with pianist George Antheil, developed (and

patented) “frequency hopping” technique for guiding torpedoes in a way that could not be jammed.

• The implementation (they suggested player piano rolls) was too difficult at the time. The overall idea was used however in early 1960’s in US’s blockade of Cuba.

CSIT 220 (Blum) 40

Packet

• Recall that a message is broken into pieces called packets so that it can be sent over a network. A network which communicates in this way is known as is a packet-switching network.

• The data is “framed” by additional information including the packet’s destination (an address).

CSIT 220 (Blum) 41

Packet Switching• The protocol (rules for communication) for packet

switching determines the additional information and its format to be included in the framing.

• It might also place bounds on the size of the packets.• Packet are then sent over the network. They do not

have to follow the same route. (However, many will since routers cache recently used addresses.)

• After arriving at the destination, the packets must be re-assembled. The framing information must facilitate this.

CSIT 220 (Blum) 42

Packet Switching

• Popular protocols adhering to the packet switching model include: TCP/IP, X.25, and Frame Relay.

• Packet switching allows a resource (e.g. the transmission lines) to be shared without any one transmission hogging or glutting a resource.

CSIT 220 (Blum) 43

Multiplexing (Fig. 6.6)

• Sharing a transmission line requires multiplexing, in this case TDM (time division multiplexing)

CSIT 220 (Blum) 44

Getting through

• Suppose a short message was sent just after a much larger message was started.

• The packets of a short message are interspersed between the many more packets of a larger message allowing it to get through without waiting for the entire large message to transmit.

CSIT 220 (Blum) 45

Circuit switching

• Recall an alternative technology is circuit-switching as used for phone conversations. In this case a particular route is dedicated to the transmission between two parties.

• Packet switching is better for inter-computer communication since information tends to leave the computer in bursts with “dead” times in between which would waste a dedicated resource.

CSIT 220 (Blum) 46

ATM• Asynchronous Transfer Mode tries to provide the

best of both worlds: the quality of service (guaranteed transmission rate) of circuit-switching and the efficiency of packet-switching.

• ATM requires a much smaller, fixed packet size than standard packet-switching protocols. It also creates a fixed route between source and destination.

• Because there is a specific route, ATM service can be tracked and billed more like one’s phone service.

CSIT 220 (Blum) 47

ATM: Service Type • Constant Bit Rate (CBR): a fixed rate, data is sent

steadily. This is analogous to a leased line. • Variable Bit Rate (VBR): a specified throughput

capacity, but data sent somewhat unevenly. This is a popular choice for videoconferencing.

• Unspecified Bit Rate (UBR) no guaranteed throughput levels. This is used for applications, such as file transfer, that can tolerate delays.

• Available Bit Rate (ABR) guaranteed minimum capacity but allows data to be bursted at higher capacities when the network is free.

CSIT 220 (Blum) 48

Frame

• A frame is information that is sent between “nodes” as a unit.

• It is typically sent serially, bit-by-bit. • It usually contains a header field and sometimes a

trailer field with addressing and protocol information that "frame" the data.

• Some control frames contain no data (other than protocol information, such as addresses)– E.g. Ping, ATM set up

CSIT 220 (Blum) 49

Frame-relay Example

Header Trailer

Flag01111110

Address field

Information (data) field(0-4096 bytes)

Frame check sequence

Flag01111110

CSIT 220 (Blum) 50

Frame Example (Cont.)

• On the previous slide, the flag and address fields make up the frame’s header.

• The check sequence and second flag fields make up the frame’s trailer.

• The information in sandwiched in between. • The data may itself be another frame for another

(typically higher-level) protocol. Frame-relay frames often carry data previously framed by another protocol.

CSIT 220 (Blum) 51

Frame relay

• In previous protocols there was some error checking at each node along the transmission, as transmission lines improved this excessive error checking was wasting time.

• In frame relay the error checking is done at the end point only, speeding up transmission.

CSIT 220 (Blum) 52

Frame Example 2 (Fig. 7.3)

Start of header character

0116

End of transmission character

0416Hexadecimal

CSIT 220 (Blum) 53

Possible confusion

• The transmission begins with the soh (start of header) and ends with the eot (end of transmission) special characters (bytes)

• The frames are not of a specified length, so – If the soh byte were to occur within the frame, the

receiver would think a second frame was beginning before the first had ended.

– If the eot byte were to occur within the frame, the receiver would think the frame was ending before it really did.

CSIT 220 (Blum) 54

ASCII

CSIT 220 (Blum) 55

Escape sequence

• Analogy: In programming a string begins and ends with quotation marks, so the language must provide a way for one to put quotation marks in one’s strings. – For example in Java, to have a quotation mark

() within a string, one uses \

CSIT 220 (Blum) 56

Byte stuffing

• We do not want the soh and eot ASCII characters appearing within a transmission.

• Thus we replace soh with esc x (the escape character followed by the x character).

• Similarly we replace eot with esc y. • Esc has become a special character and esc

is replaced by esc z. • This process is known as byte stuffing.

CSIT 220 (Blum) 57

Byte stuffing (Cont.) (Fig. 7.5)

Sent before byte stuffing begins

Added after byte stuffing ends

CSIT 220 (Blum) 58

Additional References

• http://www.whatis.com

• http://www.webopedia.com

• Physics, Paul Tipler

• Understanding Data Communications & Networks, William Shay