67
CIS-325: Data Communicati ons 1 CIS-325 Data Communication Dr. L. G. Williams, Instructor

CIS-325 Data Communication

  • Upload
    ardice

  • View
    47

  • Download
    1

Embed Size (px)

DESCRIPTION

CIS-325 Data Communication. Dr. L. G. Williams, Instructor. Chapter Five. Data Communication Fundamentals. Data Communication Basics. Analog or Digital Three Components Data Signal Transmission. Analog Data Choices. Digital Data Choices. Transmission Choices. Analog transmission - PowerPoint PPT Presentation

Citation preview

Page 1: CIS-325 Data Communication

CIS-325: Data Communications 1

CIS-325Data Communication

Dr. L. G. Williams, Instructor

Page 2: CIS-325 Data Communication

CIS-325: Data Communications 2

Chapter Five

Data Communication Fundamentals

Page 3: CIS-325 Data Communication

CIS-325: Data Communications 3

Data Communication Basics

Analog or Digital Three Components

– Data– Signal– Transmission

Page 4: CIS-325 Data Communication

CIS-325: Data Communications 4

Codec

Codec: coder and decoder

telephone

analog voice

analog line

digital line

analog voice

0 1 1 0 1 0 0 0 1 1 0

digitized voice

Analog Data Choices

Page 5: CIS-325 Data Communication

CIS-325: Data Communications 5

DSU

DSU: data service unit

analog line

digital line

moduated data

0 1 1 0 1 0 0 0 1 1 0

data

data

modem

Digital Data Choices

Page 6: CIS-325 Data Communication

CIS-325: Data Communications 6

Transmission Choices

Analog transmission– only transmits analog signals, without

regard for data content– attenuation overcome with amplifiers

Digital transmission– transmits analog or digital signals– uses repeaters rather than amplifiers

Page 7: CIS-325 Data Communication

CIS-325: Data Communications 7

Advantages of Digital Transmission The signal is exact Signals can be checked for errors Noise/interference are easily filtered out A variety of services can be offered

over one line Higher bandwidth is possible with data

compression

Page 8: CIS-325 Data Communication

CIS-325: Data Communications 8

Analog Encoding of Digital Data

data encoding and decoding technique to represent data using the properties of analog waves

modulation: the conversion of digital signals to analog form

demodulation: the conversion of analog data signals back to digital form

Page 9: CIS-325 Data Communication

CIS-325: Data Communications 9

Modem

an acronym for modulator-demodulator uses a constant-frequency signal known

as a carrier signal converts a series of binary voltage

pulses into an analog signal by modulating the carrier signal

the receiving modem translates the analog signal back into digital data

Page 10: CIS-325 Data Communication

CIS-325: Data Communications 10

Methods of Modulation

amplitude modulation (AM) or amplitude shift keying (ASK)

frequency modulation (FM) or frequency shift keying (FSK)

phase modulation or phase shift keying (PSK)

Page 11: CIS-325 Data Communication

CIS-325: Data Communications 11

Amplitude Shift Keying (ASK)

In radio transmission, known as amplitude modulation (AM)

the amplitude (or height) of the sine wave varies to transmit the ones and zeros

major disadvantage– telephone lines are very susceptible to

variations in transmission quality that affect amplitude

Page 12: CIS-325 Data Communication

CIS-325: Data Communications 12

1 0 0 1

ASK Illustration

Page 13: CIS-325 Data Communication

CIS-325: Data Communications 13

Frequency Shift Keying (FSK)

in radio transmission, known as frequency modulation (FM)

the frequency of the carrier wave varies in accordance with the signal to be sent

signal is transmitted at constant amplitude more immune to noise than ASK requires more analog bandwidth than ASK

Page 14: CIS-325 Data Communication

CIS-325: Data Communications 14

1 1 0 1

FSK Illustration

Page 15: CIS-325 Data Communication

CIS-325: Data Communications 15

Phase Shift Keying (PSK)

also known as phase modulation (PM) frequency and amplitude of the carrier

signal are kept constant the carrier is shifted in phase according to

the input data stream each phase can have a constant value, or

value can be based on whether or not phase changes (differential keying)

Page 16: CIS-325 Data Communication

CIS-325: Data Communications 16

0 0 1 1

PSK Illustration

Page 17: CIS-325 Data Communication

CIS-325: Data Communications 17

Complex Modulations Combining modulation techniques allows us

to transmit multiple bit values per signal change (baud)

Increases information-carrying capacity of a channel without increasing bandwidth

Increased combinations also leads to increased likelihood of errors

Typically, amplitude and phase modulation are combined

Page 18: CIS-325 Data Communication

CIS-325: Data Communications 18

Digital Encoding of Analog Data Primarily used in retransmission devices Uses pulse-code modulation (PCM) The sampling theorem: If a signal is sampled

at regular intervals of time and at a rate higher than twice the significant signal frequency, the samples contain all the information of the original signal.

8000 samples/sec sufficient for 4000hz

Page 19: CIS-325 Data Communication

CIS-325: Data Communications 19

Converting Samples to Bits

Quantizing Similar concept to pixelization Breaks wave into pieces, assigns a value in a

particular range 8-bit range allows for 256 possible sample

levels More bits means greater detail, fewer bits

means less detail

Page 20: CIS-325 Data Communication

CIS-325: Data Communications 20

Codec

Coder/Decoder converts analog signals into a digital

form and converts it back to analog signals

e.g., hi-fi music, television pictures, the output of copying machine, videoconferencing

Page 21: CIS-325 Data Communication

CIS-325: Data Communications 21

Digital Encodingof Digital Data Most common, easiest method is

different voltage levels for the two binary digits

Typically, negative=1 and positive=0 Known as NRZ-L, or nonreturn-to-zero

level, because signal never returns to zero, and the voltage during a bit transmission is level

Page 22: CIS-325 Data Communication

CIS-325: Data Communications 22

Differential NRZ

Differential version is NRZI (NRZ, invert on ones)

Change=1, no change=0 Advantage of differential encoding is

that it is more reliable to detect a change in polarity than it is to accurately detect a specific level

Page 23: CIS-325 Data Communication

CIS-325: Data Communications 23

Problems With NRZ

Difficult to determine where one bit ends and the next begins

In NRZ-L, long strings of ones and zeroes would appear as constant voltage pulses

Timing is critical, because any drift results in lack of synchronization and incorrect bit values being transmitted

Page 24: CIS-325 Data Communication

CIS-325: Data Communications 24

Biphase Alternatives to NRZ

Require at least one transition per bit time, and may even have two

Modulation rate is greater, so bandwidth requirements are higher

Advantages– Synchronization due to predictable

transitions– Error detection based on absence of a

transition

Page 25: CIS-325 Data Communication

CIS-325: Data Communications 25

Manchester Code

Transition in the middle of each bit period

Transition provides clocking and data Low-to-high=1 , high-to-low=0 Used in Ethernet

Page 26: CIS-325 Data Communication

CIS-325: Data Communications 26

Differential Manchester

Midbit transition is only for clocking Transition at beginning of bit period=0 Transition absent at beginning=1 Has added advantage of differential

encoding Used in token-ring

Page 27: CIS-325 Data Communication

CIS-325: Data Communications 27

Digital Encoding Schemes

Page 28: CIS-325 Data Communication

CIS-325: Data Communications 28

Analog Encoding of Analog Data

Often convert data directly to signal on same bandwidth– eg. Voice

Or, modulate signal to carrier at higher frequency– unguided media

Page 29: CIS-325 Data Communication

CIS-325: Data Communications 29

Asynchronous & Synchronous Transmission Concerned with timing issues How does the receiver know when the

bit period begins and ends? Small timing difference become more

significant over time if no synchronization takes place between sender and receiver

Page 30: CIS-325 Data Communication

CIS-325: Data Communications 30

Asynchronous Transmission

Data transmitted 1 character at a time

Character format is 1 start & 1+ stop bit, plus data of 5-8 bits

Character may include parity bit

Timing needed only within each character

Resynchronization each start bit

Uses simple, cheap technology

Wastes 20-30% of bandwidth

Page 31: CIS-325 Data Communication

CIS-325: Data Communications 31

Synchronous Transmission

Large blocks of bits transmitted without start/stop codes

Synchronized by clock signal or clocking data

Data framed by preamble and postamble bit patterns

More efficient than asynchronous

Overhead typically below 5%

Used at higher speeds than asynchronous

Requires error checking

Page 32: CIS-325 Data Communication

CIS-325: Data Communications 32

Data Flow: Simplex

only transmit in one direction rarely used in data communications e.g., receiving signals from the radio

station or CATV the sending station has only one

transmitter the receiving station has only one receiver

Page 33: CIS-325 Data Communication

CIS-325: Data Communications 33

host computer terminal

one w ay only

Simplex Illustration

Page 34: CIS-325 Data Communication

CIS-325: Data Communications 34

Data Flow: Half Duplex data may travel in both directions, but only

in one direction at a time provides non-simultaneous two-way

communication computers use control signals to negotiate

when to send and when to receive the time it takes to switch between sending

and receiving is called turnaround time

Page 35: CIS-325 Data Communication

CIS-325: Data Communications 35

host computer terminal

first one w ay....

terminal

...then the other

Half Duplex Illustration

Page 36: CIS-325 Data Communication

CIS-325: Data Communications 36

Data Flow: Full Duplex

complete two-way simultaneous transmission

faster than half-duplex communication because no turnaround time is needed

Page 37: CIS-325 Data Communication

CIS-325: Data Communications 37

host computer terminal

both w aysat the same time

Full Duplex Illustration

Page 38: CIS-325 Data Communication

CIS-325: Data Communications 38

Generic Communications Interface Illustration

Page 39: CIS-325 Data Communication

CIS-325: Data Communications 39

DTE and DCE

DT E DT E

host com puter term inal

in terface in terface

m odem m odem

DCE

Page 40: CIS-325 Data Communication

CIS-325: Data Communications 40

Telecommunications Standards

Where do they come from?– Standard setting bodies– Governments

Two types– Market-driven and voluntary– Government-regulated and mandatory

Page 41: CIS-325 Data Communication

CIS-325: Data Communications 41

Advantages

Assures a large market, which encourages mass production and often lowers costs

Encourages vendors to enter market because investment is protected

Allows products from multiple vendors to communicate, providing consumers with wider selection

Page 42: CIS-325 Data Communication

CIS-325: Data Communications 42

Disadvantages

Standards process can freeze technology too early, due to the length of the standards-setting process and the speed with which technology changes

Current process allows for multiple standards for the same thing

Page 43: CIS-325 Data Communication

CIS-325: Data Communications 43

Interface Standard

Four Characteristics– Mechanical– Electrical– Functional– Procedural

Page 44: CIS-325 Data Communication

CIS-325: Data Communications 44

RS-232C (EIA 232C)

EIA’s “Recommended Standard” (RS) Specifies mechanical, electrical,

functional, and procedural aspects of the interface

Used for connections between DTEs and voice-grade modems, and many other applications

Page 45: CIS-325 Data Communication

CIS-325: Data Communications 45

Mechanical Specifications

25-pin connector with a specific arrangement of leads

DTE devices usually have male DB25 connectors while DCE devices have female

In practice, fewer than 25 wires are generally used in applications

Page 46: CIS-325 Data Communication

CIS-325: Data Communications 46

RS-232 DB-25 Pinouts

Page 47: CIS-325 Data Communication

CIS-325: Data Communications 47

Electrical Specifications

Specifies signaling between DTE and DCE Uses NRZ-L encoding

– Voltage < -3V = binary 1– Voltage > +3V = binary 0

Rated for <20Kbps and <15M– greater distances and rates are theoretically

possible, but not necessarily wise

Page 48: CIS-325 Data Communication

CIS-325: Data Communications 48

RS-232 Signals (Asynch)

Odd Parity

Even Parity

No Parity

Page 49: CIS-325 Data Communication

CIS-325: Data Communications 49

Functional Specifications

Specifies the role of the individual circuits

Data circuits in both directions allow full-duplex communication

Timing signals allow for synchronous transmission (although asynchronous transmission is more common)

See Table 5-5 on p. 115 for this spec

Page 50: CIS-325 Data Communication

CIS-325: Data Communications 50

Procedural Specifications

Multiple procedures are specified Simple example: exchange of asynchronous

data on private line– Provides means of attachment between

computer and modem– Specifies method of transmitting

asynchronous data between devices– Specifies method of cooperation for

exchange of data between devices

Page 51: CIS-325 Data Communication

CIS-325: Data Communications 51

Limited Distance Modem Example (Point-to-Point) Only a few circuits

are necessary:– Signal Ground (7)– Transmitted Data (2)– Received Data (3)– Request to Send (4)– Clear to Send (5)– DCE Ready (6)– Received Line Signal

Detector (8)

For exchange over PSTN, additional circuits necessary:– DTE Ready(20)– Ring Indicator (22)

Page 52: CIS-325 Data Communication

CIS-325: Data Communications 52

Flow Control

Necessary when data is being sent faster than it can be processed by receiver

Computer to printer is typical setting Can also be from computer to

computer, when a processing program is limited in capacity

Page 53: CIS-325 Data Communication

CIS-325: Data Communications 53

Stop-and-Wait Flow Control

Simplest form Source may not send new frame until

receiver acknowledges the frame already sent

Very inefficient, especially when a single message is broken into separate frames

Page 54: CIS-325 Data Communication

CIS-325: Data Communications 54

Sliding-Window Flow Control

Allows multiple frames to be in transit Receiver sends acknowledgement with

sequence number of anticipated frame Sender maintains list of sequence

numbers it can send, receiver maintains list of sequence numbers it can receive

ACK (acknowledgement) supplemented with RNR (receiver not ready)

Page 55: CIS-325 Data Communication

CIS-325: Data Communications 55

Error Control Process

All transmission media have potential for introduction of errors

Error control process has two components– Error detection– Error correction

Page 56: CIS-325 Data Communication

CIS-325: Data Communications 56

Error Detection

Parity Check Cyclic Redundancy Check (CRC)

Page 57: CIS-325 Data Communication

CIS-325: Data Communications 57

Parity Check

Attach Parity Bit to ASCII character Even parity

– even # of 1’s in 8-bit character– e.g. - 01101010 (last bit is parity bit)

Odd parity– odd # of 1’s in 8-bit character

Only good if 1, 3, 5 bits inverted

Page 58: CIS-325 Data Communication

CIS-325: Data Communications 58

Frame Check Sequence

Add Frame Check Sequence (FCS) to each frame

Take all data bits and perform some calculation

Attach answer to end of frame Rcvr does same calculation and

compares answer to FCS

Page 59: CIS-325 Data Communication

CIS-325: Data Communications 59

Cyclic Redundancy Check

A type of FCS Treat data as one long number Divide by a unique prime Remainder is FCS Use 17-bit prime and get 16-bit

remainder Powerful, with very little overhead

Page 60: CIS-325 Data Communication

CIS-325: Data Communications 60

Error Correction

Two types of errors– Lost frame– Damaged frame

Automatic Repeat reQuest (ARQ)– Error detection– Positive acknowledgment– Retransmission after time-out– Negative acknowledgment and retransmission

Page 61: CIS-325 Data Communication

CIS-325: Data Communications 61

Stop-and-Wait ARQ

One frame received and handled at a time If frame is damaged, receiver discards it and sends

no acknowledgment– Sender uses timer to determine whether or not to

retransmit– Sender must keep a copy of transmitted frame

until acknowledgment is received If acknowledgment is damaged, sender will know it

because of numbering

Page 62: CIS-325 Data Communication

CIS-325: Data Communications 62

Go-Back-N ARQ

Uses sliding-window flow control When receiver detects error, it sends

negative acknowledgment (REJ) Sender must begin transmitting again

from rejected frame Transmitter must keep a copy of all

transmitted frames

Page 63: CIS-325 Data Communication

CIS-325: Data Communications 63

Self-Correcting Code

What if retransmission is not available?– E.g., satellite imaging, Mars Explorer

Code must be able to identify inverted bits

Example is Hamming Code– Good for only one bad bit

Page 64: CIS-325 Data Communication

CIS-325: Data Communications 64

Data Link Control Specified flow and error control for

synchronous communication Data link module arranges data into

frames, supplemented by control bits Receiver checks control bits. If data

is intact, it strips them

Page 65: CIS-325 Data Communication

CIS-325: Data Communications 65

High-Level Data Link Control

On transmitting side, HDLC receives data from an application, and delivers it to the receiver on the other side of the link

On the receiving side, HDLC accepts the data and delivers it to the higher level application layer

Both modules exchange control information, encoded into a frame

Page 66: CIS-325 Data Communication

CIS-325: Data Communications 66

HDLC Frame Structure

Flag: 01111110, at start and end

Address: secondary station (for multidrop configurations)

Information: the data to be transmitted

Frame check sequence: 16- or 32-bit CRC

Control: purpose or function of frame– Information frames:

contain user data– Supervisory frames:

flow/error control (ACK/ARQ)

– Unnumbered frames: variety of control functions (see p.131)

Page 67: CIS-325 Data Communication

CIS-325: Data Communications 67

HDLC Operation

Initialization: S-frames specify mode and sequence numbers, U-frames acknowledge

Data Transfer: I-frames exchange user data, S-frames acknowledge and provide flow/error control

Disconnect: U-frames initiate and acknowledge