You are on page 1of 11

Data Transmission CSE/EE 458: Data Communication (Data Link Control)

Guohong Cao Department of Computer Science & Engineering 310 Pond Lab gcao@cse.psu.edu

Timing problems require a mechanism to synchronize the transmitter and receiver Two solutions
Asynchronous Synchronous

Asynchronous
Data transmitted one character at a time
5 to 8 bits

Timing only needs to be maintained within each character Re-sync with each character Properties
Simple Cheap Overhead of 2 or 3 bits per char (~20%) Good for data with large gaps (keyboard)
3 Guohong Cao (gcao@cse.psu.edu)

Synchronous - Bit Level


Block of data transmitted without start or stop bits Clocks must be synchronized Can use separate clock line
Good over short distances Subject to impairments

Synchronous - Block Level


Need to indicate start and end of block Use preamble and postamble
e.g. series of SYN (hex 16) characters e.g. uses a pattern of 01111110 as a flag. Bit stuffing: avoid the pattern appears in the middle of the frame. The transmitter will always insert an extra 0 bit after each occurrence of five 1s in the frame.
If the receiver found five 1s, the sixth bit is examined. If it is 0, remove it. If it is 1, check the next bit. If it is 0, it is a flag, otherwise report error.

Embed clock signal in data


Manchester encoding Carrier frequency (analog)
5

More efficient (lower overhead) than async


6

Guohong Cao (gcao@cse.psu.edu)

Characteristics of Interface
Mechanical (ITU-T v.24)
Connection plugs (Mechanical ISO 2110)

Flow Control
Ensuring the sending entity does not overwhelm the receiving entity
Preventing buffer overflow

Electrical
Voltage, timing, encoding (RS-232)

Transmission time
Time taken to emit all bits into the medium

Functional
Data, control, timing, grounding

Propagation time
Time for a bit to traverse the link

Procedural
Sequence of events
9

10

Stop and Wait


Source transmits frame Destination receives frame and replies with acknowledgement Source waits for ACK before sending next frame Destination can stop flow by not replying ACK Works well for a few large frames
11 Guohong Cao (gcao@cse.psu.edu)

Fragmentation
Large block of data may be split into small frames
Limited buffer size Errors detected sooner (when the whole frame received) On error, retransmission of smaller frames is needed Prevents one station occupying medium for long periods

Sliding Windows Flow Control


Allow multiple frames to be in transit
The receiver can buffer W frames The transmitter can send up to W frames without ACK

Each frame is numbered ACK includes the next expected frame sequence number
Use RR (Receive Ready)

Stop and wait becomes inadequate


13

The sequence number is bounded by the size of the field (k)


Frames are numbered modulo 2k
14

15

Guohong Cao (gcao@cse.psu.edu)

Sliding Window Enhancements


Receiver can ack frames without permitting further transmission (Receive Not Ready) Must send a normal ack to resume If duplex, use piggybacking
If no data to send, use ack frame If data but no ack to send, send the last ack number again

Error Detection
Additional bits added for error detection. Parity
The parity bit is chosen so that the character has even (even parity) or odd (odd parity) number of ones Even number of bit errors cant be detected

Cyclic Redundancy Check


For a block of k bits, the transmitter generates a n bit sequence Transmit k+n bits which is exactly divisible by some number The receiver divides the received frame by that number
If no remainder, assume no error (see chapter 7)
17 18

Error Control
Detection and correction of errors
Lost frames, damaged frames

Stop and Wait


The source transmits single frame and wait for ACK If the received frame is damaged, discard it
The transmitter times out and retransmit if the ack is not received within timeout value.

Automatic repeat request (ARQ) techniques


Error detection Positive acknowledgment Retransmission after timeout Negative acknowledgement and retransmission

If the ACK is damaged, the transmitter can not recognize it


Transmitter retransmits The receiver gets two copies of the frame Use ACK0 and ACK1 to differentiate

Three standardized versions of ARQ


Stop and wait Go back N Selective reject (selective retransmission)
19

Simple, but inefficient


Guohong Cao (gcao@cse.psu.edu)

Go Back N
Based on sliding window If no error, ACK as usual with the next expected frame Use window to control the number of outstanding frames If error, reply with a reject
Discard that frame and all future frames until the error frame is received correctly The transmitter must go back and retransmit that frame and all subsequent frames
21 22

Damaged or Lost Frame


Receiver detects an error in frame i
Receiver sends reject-i Transmitter gets reject-i Transmitter retransmits frame i and all subsequent

Lost Frame or ACK


Frame i is lost and no additional frame will be sent
Receiver gets nothing and returns neither Ack or Reject Transmitter times out and sends ack with P bit set to 1 Receiver must ack with the next expected rame number (frame i ) Transmitter retransmits frame I

Frame i is lost
Transmitter sends i+1 Receiver gets frame i+1 out of sequence Receiver sends reject i Transmitter goes back to frame i and retransmits

Receiver gets frame i and sends ack(i+1) which is lost


Acks are cumulative, so next ack(i+n) may arrive before the transmitter times out on frame i If the transmitter times out, it sends ack with P set to 1 This can be repeated a number of times before a reset procedure is initiated
23 Guohong Cao (gcao@cse.psu.edu)

Selective Reject
Also called selective retransmission Only the rejected frames are retransmitted Subsequent frames are accepted by the receiver and buffered Minimizes retransmission Receiver must maintain large enough buffer Sequence number:
Go-back-N: Max 2k - 1 Selective reject: Max 2k-1 (Max 2k 1)
25 26

High Level Data Link Control (HDLC) Station types:


Primary station:
Controls link operations. Frames issued are called commands Maintains separate logical link to each secondary station

HDLC Transfer Modes


Normal Response Mode (NRM)
Unbalanced, primary initiates transfer to secondary, the secondary can only respond the command.

Secondary station
controlled by the primary station. Frames issued are called responses

Asynchronous Balanced Mode (ABM)


Balanced, either station may initiate transmission without receiving permission, widely used, no polling overhead

Combined station
May issue commands and responses

Link Configurations:
Unbalanced
One primary and one or more secondary stations

Asynchronous Response Mode (ARM)


Unbalanced, secondary may initiate transmission without permission form primary. The primary is responsible for link management, rarely used
27 Guohong Cao (gcao@cse.psu.edu)

Balanced
Two combined stations: supports full duplex and half duplex

Frame Structure
Synchronous transmission Transmitted in frames Single frame format for all data and control exchanges

Address Field
Identifies the secondary station that will sent or receive frame Usually 8 bits long May be extended to multiple of 7 bits
LSB of each octet indicates that it is the last octet (1) or not (0)

All one (11111111) address represents broadcast

29

30

Control Field
Three frame types
Information - data to be transmitted to the upper layer
Flow and error control is piggybacked on information frames

Control Field Diagram

Supervisory - ARQ when piggyback not used Unnumbered - supplementary link control, such as set initialization mode (SIM), disconnect (DISC), set asynchronous balanced/extended mode (SABM, SABME), set normal response/extended mode (SNRM/SNRME), unnumbered ack (UA).

First one or two bits of control field identify frame type


31 Guohong Cao (gcao@cse.psu.edu)

Operation Examples(1)

Operation Examples (2)

33

34

Other DLC Protocols


Link Access Procedure, Balanced (LAPB)
Part of X.25 (ITU-T) Point to point link between the system and the network switching node

Multiplexing
Frequency-Division Multiplexing (FDM)
Channel bandwidth exceeds per user requirements. Each signal is modulated to a different carrier frequency, e.g. broadcast radio Channel allocated even if no data in transmission

Link Access Procedure, D-Channel


ISDN (ITU-D), 7-bit sequence numbers (no 3-bit) 16 bit address field contains two sub-addresses
One for device and one for user (next layer up)

Time-Division Multiplexing (TDM)


Real data rate exceeds per user requirements Multiple digital signals interleaved in time Time slots allocated even if no data Time slots do not have to be evenly distributed among different sources.

Logical Link Control (LLC)


IEEE 802, different frame format Link control split between medium access layer (MAC) and LLC (on top of MAC)
35

Guohong Cao (gcao@cse.psu.edu)

Digital Carrier Systems


Hierarchy of TDM USA/Canada/Japan use one system, which is based on the DS-1 format
Multiplexes 24 channels Each frame has 8 bits per channel plus one framing bit 193 bits per frame

ITU-T use a similar (but different) system


37 38

Digital Carrier Systems


For voice, each channel contains one byte of the digitized data (PCM, 8000 samples per sec)
Data rate 8000x193 = 1.544Mbps Five out of six frames have 8 bit PCM samples Sixth frame is 7 bit PCM word plus a signaling bit Signaling bits from each channel containing control and routing info

Same format for digital data


23 channels of data
7 bits per frame plus indicator bit for data or systems control

24th channel is sync


39 Guohong Cao (gcao@cse.psu.edu)

Carrier Standards
North America Name # of voice channel 24 48 96 672 4032 Data rate (Mbps) 1.544 3.152 6.312 International (ITU-T) level # of voice channels 30 120 480 1920 7680 Data rate (Mbps) 2.048 8.448 34.368 139.264 565.148

Integrated Services Digital network (ISDN)


ISDN allows multiplexing of devices over single ISDN line, two interfaces: Basic ISDN Interface
Data rate 192kbps: 2B+D, Two 64kbps B channels and one 16kbps D channel, total 144kbps, remaining capacity used for framing and sync B channel is the basic data (voice) channel, D channel is used for control or data

DS-1 DS-1C DS-2 DS-3 DS-4

1 2 3

44.736 4 274.176 5

Primary ISDN Interface:


1.544Mbps: based on US DS-1, used on T1 services, 23 B plus one D channel 2.048Mbps: Based on European standards, 30 B plus one D channel
41 42

Sonet/SDH
Synchronous Optical Network (Sonet) by BellCore and ANSI Synchronous Digital Hierarchy (SDH), Compatible with Sonet, standardized by ITU-T. STS-1/OC-1: 51.84 Mbps STS-3/OC-3: 155.52 STS-9/OC-9: 466.56 STS-12/OC-12: 622.08 STS-24/OC-24: 1244.16
43

You might also like