7/27/2019 RQ 3.pdf
1/58
PRICIPLES OF TELECOMMUNICATIONAND PACKET NETWORKS MSc MODULE
EEM.ptn 2007-08
Lecture Component:
The Link Layer
Lectures 6-8
Prof. George Pavlou
Centre for Communication Systems Researchhttp://www.ee.surrey.ac.uk/CCSR/Networks/
Tel: 01483 689480
7/27/2019 RQ 3.pdf
2/58
A3.2
7/27/2019 RQ 3.pdf
3/58
A3.3
DATA TRANSMISSION TECHNIQUES
7/27/2019 RQ 3.pdf
4/58
A3.4
LINK LEVEL FRAMING
The Physical Layer provides a digital serial transmission
capability i.e. a raw bit stream.
Link-level protocols need to exchange data link messages called
frames.
We need an unambiguous way of delimiting frames transmitted
using the bit stream physical layer service.
The process is called Framing and it is an important aspect of
the Data Link Layer.
7/27/2019 RQ 3.pdf
5/58
A3.5
COMMUNICATION MODES
Simplex: Data transmitted in one direction only e.g. temperature
sensor output in an industrial plant. Half duplex: Data transmitted between communicating parties in both
directions but not at the same time.
(Full) Duplex: Both communicating parties may transmit and receive
at the same time. In all cases, the destination computer needs to detect the following:
start of each bit.
start and end of each byte (character) .
start and end of each data link level frame (message). A frame is ablock of data comprising several characters.
7/27/2019 RQ 3.pdf
6/58
A3.6
CHARACTER CODING
There are two types of messages exchanged between communication parties:
control: special data to overcome transmission errors. information: user data.
Alphanumeric characters need to be translated into a machine code i.e. a
binary representation.
There are two major standards for character encoding :
Extended Binary Coded Decimal Interchange Code(EBCDIC).
American Standards Committee for Information Interchange (ASCII), similar
to International Alphabet Number 5 (IA5) which is an ITU standard.
Both encoding standards have:
control characters such as STX (Start of Text), ETX (End of Text), SYN
(Synchronisation), etc.
printable characters such as numbers and alphabets.
7/27/2019 RQ 3.pdf
7/58
A3.7
ASCII AND EBCDIC Examples
Printable characters ASCII (7 bits) EBCDIC (8 bits)
A 41 C1
B 42 C2
a 61 81
b 62 82
Control characters ASCII (7 bits) EBCDIC (8 bits)
STX (Start Of Text) 02 02
ETX (End Of Text) 03 03DLE (Data Link Escape) 10 10
SYN 16 32
7/27/2019 RQ 3.pdf
8/58
A3.8
ASYNCHRONOUS FRAMING
Suitable for data generated at random such as a user typing from a
keyboard; transmission line is idle for long periods and the two endsoperate asynchronously.
Each byte is treated independently. Receiver tries to keep
synchronisation per character.
Character synchronisation is achieved using one start and one ormore stop bits, which delimit the 8 character bits.
The receiver samples the middle of each bit, the transmitter must
transmit at the same rate the receiver samples.
Not good for large frames due to the inefficiency of the per-charactersynchronisation overhead: 8 / (8+2) = 80% at best.
7/27/2019 RQ 3.pdf
9/58
A3.9
ASYNCHRONOUS FRAMING (contd)
8-bit character
Start bit Stop bitbit
sampling
Asynchronous
transmission basics1 2 2 4 5 6 7 8
7/27/2019 RQ 3.pdf
10/58
A3.10
SYNCHRONOUS FRAMING
Suitable for high speed data transmissions.
Complete frames of several characters are transmitted as a continuous
string. Receiver tries to keep synchronisation per frame.
It is synchronous because some pattern is always being transmitted
between successive frames or before the start of each frame so that
the receiver gets synchronised.
There are two types of framing: Byte-oriented and Bit-oriented.
Byte-oriented framing is the older of the two methods, imposes more
overheads and is gradually fading from use in favour of bit-oriented
framing.
7/27/2019 RQ 3.pdf
11/58
A3.11
BYTE-ORIENTED FRAMING
The SYN (Synchronisation) character is sent continuously between
frames.
Frame synchronisation for byte-oriented framing:
for text frames: Using control characters such as STX (Start Of
Text) and ETX (End Of Text).
for binary frames: insert DLE (Data Link Escape) before STX and
ETX.
character stuffing is achieved by substituting every DLE pattern in
the frame with DLE-DLE at the transmitter and removing the extra
DLE at the receiver.
Closely tied to 8-bit characters, not general enough.
7/27/2019 RQ 3.pdf
12/58
A3.12
BYTE-ORIENTED FRAMING (contd)
SYN STX ETX SYN SYN
DLE
DLE STX DLE ETX SYNSYN DLE DLE SYN
Data to transmit
Frame
Data to transmit
Byte-stuffed Frame
transmission order
7/27/2019 RQ 3.pdf
13/58
A3.13
BIT-ORIENTED FRAMING
In idle periods between frames, the receiver searches for the flag
bit pattern (01111110). This is typically preceded by a number of
idle bytes (01111111) for the receiver to gain synchronisation.
Frames are delimited by the flag pattern, which denotes both the
start and end of frame.
Bit stuffing is achieved by inserting a 0 after 5 consecutive 1s at
the transmitter and removing this 0 at the receiver:
if after 5 1s there is a 0, it is the result of bit-stuffing and it is
discarded by the receiver.
if it is a 1 followed by a 0, then the last 8 bits constitute a flag.
Allows arbitrary number of bits in a frame (not just multiple of 8)
and supports character sets with any number of bits per character
7/27/2019 RQ 3.pdf
14/58
A3.14
SYNCHRONISATION OVERHEADS: EXAMPLE
Find the additional number of bits required to transmit a message (frame)
consisting of 1000 characters (8-bits each) over a data link using the following
transmission modes:
a) Asynchronous: With one start bit and one stop bit per character and a
single start-of frame and end-of-frame characters per message.
b) Synchronous byte-oriented: With two synchronisation characters and a singlestart-of-frame / end-of-frame character per message.
c) Synchronous bit-oriented
Answer:
a) Extra number of bits per character = 1+1 = 2 bits
Total additional bits required = (2*1000) + 2*(2+8) = 2020 bits
b) 4*8=32 bits (DLE/STX and DLE/ETX)
c) 2*8=16 bits (only two FLAG bytes)
7/27/2019 RQ 3.pdf
15/58
A3.15
ERROR DETECTION (1)
Transmission is error prone:
Bit Error Rate (BER): the probability that a single bit iscorrupted e.g. 10-3 means 1 bit in 103.
Forward Error Control: redundant information is transmitted sothat the receiver can both detect and correct the error.
This is better for high BER links (e.g. wireless) and exhibits highframe overhead.
Feedback Error Control: less redundant information is transmitted,receiver can detect the error and discard / request retransmission.
7/27/2019 RQ 3.pdf
16/58
A3.16
ERROR DETECTION (2)
In character-based asynchronous transmission, the parity bit method
is used (add an extra bit per character for even / odd parity). can only detect odd number of bit errors.
For block-oriented synchronous transmission, a checksum is used -
known as Frame Check Sequence (FCS) orCyclic Redundancy
Check (CRC). Based on polynomial codes, a generator polynomial of R bits
(typically 16 or 32) will detect:
all single-bit, double-bit and odd number of bit errors.
All error bursts < R and most error bursts >= R. Easy to implement in hardware.
7/27/2019 RQ 3.pdf
17/58
A3.17
DATA LINK PROTOCOL BASICS
7/27/2019 RQ 3.pdf
18/58
A3.18
THE DATA LINK LAYER IN THE OSI
REFERENCE MODEL
Application
Session
Presentation
Physical
Data Link
Network
Transport
Application Process
7/27/2019 RQ 3.pdf
19/58
A3.19
INTRODUCTION
Transmission modes:
connection oriented, reliable (virtual circuit like).
connectionless, unreliable.
Link layer functions for the reliable, connection-oriented service:
error control, i.e. error detection and correction. flow control, so that the transmitter does not flood the
receiver with information the latter cannot handle.
Similar functions may be also found in the Network and
Transport layers.
7/27/2019 RQ 3.pdf
20/58
A3.20
TYPICAL DATA LINK FRAME FORMAT
Data Link frames contain a header, data and a checksum at the
end in order to enable the receiver to detect transmission errors.
The header contains various pieces of Protocol Control
Information (PCI): frame type, sequence numbers, etc.
The data part carries the payload i.e. the information the data link
service user wishes to transfer.
The length of the header and checksum reduce the effectivebandwidth, so they should be as small as possible.
There exist frames with no data part, used entirely for control
purposes e.g. acknowledgment frames.
Header ChecksumData
7/27/2019 RQ 3.pdf
21/58
A3.21
AUTOMATIC REPEAT REQUEST
Receiver checks received frame for errors and provides apositive or (in some modes) negative acknowledgment.
This form of automatic error error control is known as Automatic
Repeat reQuest (ARQ). There are two ARQ types:
idle (or stop-and-wait) RQ, used mostly for character-oriented transmissions (e.g. modem protocols).
continuous RQ, used for bit-oriented transmissions which
characterise more general data link protocols.
7/27/2019 RQ 3.pdf
22/58
A3.22
IDLE (STOP-AND-WAIT) RQ
Terminology:
information frames are called I-frames and acknowledgment
frames are called ACK-frames.
data source is called transmitter or primary and data
destination is called receiver or secondary.
Operation:
transmitter sends I-frames and waits for acknowledgment
from receiver.
timers are used to check on transmission failure for I-frames.
wait time equals the time I-frame takes to be received and
processed by the receiver and acknowledgment to be sent
back - time-out should be slightly larger than this time.
sequence numbers are used to mark both I-frames and
acknowledgments.
7/27/2019 RQ 3.pdf
23/58
A3.23
IDLE (STOP-AND-WAIT) RQ (contd)
Two potential schemes of implementing retransmissions:
implicit retransmissions: the receiver sends an ACK(acknowledgment) message only for correct I-frames and
does nothing for I-frames received in error.
explicit retransmission: in addition, the receiver sends
NAK (negative acknowledgment) for I-frames in error. In the implicit retransmission scheme, the transmitter will
eventually resend after a time out.
In the Idle RQ scheme, the transmitter can only have one I-
frame outstanding, hence the terms idle / stop-and-wait.
7/27/2019 RQ 3.pdf
24/58
A3.24
IMPLICIT RETRANSMISSION
I(N) I(N+1) I(N+2)
I(N) I(N+1)
Transmitter
Receiver
Timer started Timer stopped
I(N) ACK(N) I(N+1)ACK(N+1)
I(N) I(N) I(N+1)
I(N)
Transmitter
Receiver
I(N) I(N)ACK(N)
I(N)
Timer expiredTimer started
Correct N I-Frame
Corrupted N I-Frame
7/27/2019 RQ 3.pdf
25/58
A3.25
EXPLICIT RETRANSMISSION
I(N) I(N) I(N+1)
I(N)
Transmitter
Receiver
Timer started Timer restarted
I(N) I(N) ACK(N)NAK(N)
I(N)
Timer stopped
7/27/2019 RQ 3.pdf
26/58
A3.26
IDLE RQ FRAME (PDU) FORMAT
SOH
N(S)
STX
I-frame
content
ETX
BCC
ACK
N(R)
BCC
NAK
N(R)
BCC
SOH: Start of Header
N(S) send sequence number
N(R) receive sequence number
ACK-frame format
NAK-frame format
STX: Start Of Text
ETX: End Of Text
BCC: Block Check Character
I-frame format
7/27/2019 RQ 3.pdf
27/58
A3.27
LINK UTILISATION
Efficiency of utilisation U can be defined as U= Tx/Tt
Tx= (Number of bits in a frame) / (Bit rate), i.e. the frame transmissiontime.
Tt is equal to Tx plus any time the transmitter spends waiting for
acknowledgments.
In practice processing and acknowledgment transmission times arenegligible compared with propagation delay, so:
Tt = Tx + 2Tp
where 2Tp represents I-frame and ACK-frame propagation delays.
Therefore,U = Tx / (Tx + 2Tp) => U = 1/(1+2a) where a = Tp / Tx
The coupling ratio a is typically:
a > 1 for WANs
7/27/2019 RQ 3.pdf
28/58
A3.28
LINK UTILISATION: EXAMPLE 11000-bit frame to be transmitted using idle RQ protocol. Assuming the velocity
of propagation is 2 *108 m/s in cable and 3 *108 m/s in vacuum, determine the
link utilisation for a data rate of 1 Mbps for the following transmission media:i) A twisted pair cable 1 km in length.
ii) A leased line 200 km in length.
iii) A satellite link of 36 000 km.Answer:
Tx= (Number of bits in a frame) / (Bit rate) = 103 / 106 = 10-3 s
Tp = Distance/ Velocity, a = Tp / Tx and U = 1 / (1+2a)
i) Tp = 5 * 10-6 , a = 5 * 10-3, hence U = 1
ii) Tp = 10-3 , a = 1, hence U = 0.33
iii) Tp = 0.24, a = 240, hence U = 0.002
7/27/2019 RQ 3.pdf
29/58
A3.29
LINK UTILISATION: EXAMPLE 2
1000-bit frame to be transmitted using idle RQ protocol. Assuming the
velocity of propagation is 2 *108 m/s, determine the link utilisation for a
twisted pair cable 1 km in length:
i) For a data rate of 1 Kbps.
ii) For a data rate of 100 Mbps.
Answer:
Tx= (Number of bits in a frame) / (Bit rate)
Tp = Distance/ Velocity, a = Tp / Tx and U = 1 / (1+2a)
i) Tx = 1, Tp = 5 * 10-6 , a = 5 * 10-6 , hence U = 1
ii) Tx = 10-5, Tp = 5 * 10
-6, a = 0.5, hence U = 0.5
7/27/2019 RQ 3.pdf
30/58
A3.30
LINK UTILISATION WITH ERRORS
Assuming a Bit Error Rate (BER) of the link P, the probability to receive a
frame of Ni bits in error is:
Pf= 1-(1-P)Ni = Ni P (approx.) if Ni P U = (1- Pf) / (1 + 2a)
7/27/2019 RQ 3.pdf
31/58
A3.31
LINK UTILISATION (IDLE RQ CONCLUSIONS)
Link efficiency is affected by the:
link delay (propagation velocity and distance).
line speed i.e. bit data rate.
Bit Error Rate (BER).
7/27/2019 RQ 3.pdf
32/58
A3.32
7/27/2019 RQ 3.pdf
33/58
A3.33
CONTINUOUS RQ
7/27/2019 RQ 3.pdf
34/58
A3.34
CONTINUOUS RQ(1)
Link utilisation is better than idle RQ.
Operation:
transmitter sends I-frames continuously without waiting for
acknowledgment from receiver.
transmitter keeps a copy of transmitted I-frames for
retransmission in case of failure.
In duplex links, a commonly used technique is piggybacking where
acknowledgments are tagged to the end of I-frames.
There are two types of continuous RQ:
Selective-repeat.
Go-back-N.
7/27/2019 RQ 3.pdf
35/58
A3.35
CONTINUOUS RQ(2)
I(N) I(N+1) I(N+2) I(N+3) I(N+4)Primary I(N) I(N+1) I(N+2) I(N+3) I(N+4)Transmitter
I(N) I(N+1) I(N+2) I(N+3) I(N+4)I(N) I(N+1) I(N+2) I(N+3) I(N+4)Receiver
I(N)
ACK(N)
ACK(N+1) ACK(N+2)ACK(N+3)
7/27/2019 RQ 3.pdf
36/58
A3.36
SELECTIVE-REPEAT (1)
Selective repeat has better utilisation than Go-back-N and can be
used in links with high BER e.g. radio links. It can operate with implicit or explicit negative acknowledgments -
in the notes we cover only the implicit acknowledgment case.
The transmitter discovers missing ACK-frames from subsequentones and retransmits the corresponding I-frames.
Possibility for receiving duplicate frames when an ACK-frame iscorrupted.
The loss of an I-frame is detected only after the next I-frame iscorrectly received, which requires a continuous stream of I-frames.
The transmitter needs to set a timer for an I-frame so that incase it is corrupted and there are no more I-frames to send, itis retransmitted after the time-out.
7/27/2019 RQ 3.pdf
37/58
A3.37
SELECTIVE-REPEAT (2): CORRUPTED
I-FRAME
I(N) I(N+1) I(N+2) I(N+3) I(N+4)Primary I(N) I(N+1) I(N+2) I(N+3) I(N+4)Transmitter
I(N) I(N+1) I(N+2) I(N+3) I(N+4)I(N) I(N+1)
I(N+5)
I(N+5)
I(N+1)
Receiver
I(N)ACK(N) ACK(N+2)
ACK(N+1)
7/27/2019 RQ 3.pdf
38/58
A3.38
SELECTIVE-REPEAT(3): CORRUPTED
ACK-FRAME
I(N) I(N+1) I(N+2) I(N+3) I(N+4)Primary I(N) I(N+1) I(N+2) I(N+3) I(N)Transmitter
I(N) I(N+1) I(N+2) I(N+3) I(N)I(N) I(N+4)
I(N+5)
I(N+5)
I(N+4)
Receiver
I(N)ACK(N) ACK(N+2)
ACK(N+3)
ACK(N)ACK(N+4)ACK(N+1)
Duplicate,
ignored
7/27/2019 RQ 3.pdf
39/58
A3.39
GO-BACK-N (1)
In case of error, the transmitter retransmits all frames already sent
starting from the one in error.
In comparison with selective repeat, it is simpler and reduces the
buffer size on the receiver side but it is less efficient.
trades simplicity for efficiency in error recovery.
Operation: Assume that I-frame N+1 is corrupted.
Receiver will return NAK-frame for N+1 I-frame. A NAK-frame
is also known as Selective Reject.
Transmitter will know about corruption after N+X frames. It will then retransmit these frames, starting from N+1.
The receiver uses a timer so that it retransmits a NAK-frame in
case it is corrupted.
7/27/2019 RQ 3.pdf
40/58
A3.40
GO-BACK-N (2): CORRUPTED I-FRAME
I(N) I(N+1) I(N+2) I(N+3) I(N+4)Primary I(N) I(N+1) I(N+2) I(N+3) I(N+4)Transmitter
I(N) I(N+1) I(N+2) I(N+3) I(N+4)
I(N+3)
I(N+1)
I(N+2)
I(N+2)
I(N+1)
Receiver
I(N)ACK(N) NAK(N+1)
ACK(N+1)
Frames discarded
7/27/2019 RQ 3.pdf
41/58
A3.41
GO-BACK-N (3): CORRUPTED ACK-FRAME
I(N) I(N+1) I(N+2) I(N+3) I(N+4)Primary I(N) I(N+1) I(N+2) I(N+3) I(N+4)Transmitter
I(N) I(N+1) I(N+2) I(N+3) I(N+4)I(N) I(N+5)
I(N+6)
I(N+6)
I(N+5)
Receiver
I(N)ACK(N) ACK(N+2)
ACK(N+3)
ACK(N+4)ACK(N+5)ACK(N+1)
7/27/2019 RQ 3.pdf
42/58
A3.42
FLOW CONTROL
Flow control is needed to regulate traffic if the transmitter is faster
then the receiver.
An agreed window size determines the maximum number of
unacknowledged frames.
Sliding window:
receiver stops acknowledging received messages. sender notices the built up of unacknowledged messages so it
stops.
the window slides forward as acknowledgments are received
and more frames are transmitted. Window size impacts efficiency and relates also to the available
buffer storage in both sender and receiver.
7/27/2019 RQ 3.pdf
43/58
A3.43
FLOW CONTROL USING SLIDING WINDOW
I(N) I(N+1) I(N+2) I(N+3) I(N+4)Primary I(N) I(N+1) I(N+2) I(N+3) I(N+4)Transmitter
Send window size = 3
I(N+3) I(N+5)
Frames waiting to
be acknowledged
Frames already
acknowledged
Frames waiting to
be sent
I(N+6)
Protocol Send Window Receive window
Idle RQ 1 1Selective repeat K K
Go-back-N K 1
7/27/2019 RQ 3.pdf
44/58
A3.44
LINK MANAGEMENTSource application
L_CONNECT.request
L_CONNECT.confirm
L_DATA.request
L_DISCONNECT.request
L_DISCONNECT.confirm
Destination application
L_CONNECT.indication
L_DATA.indication
L_DISCONNECT.indication
Source
link layer
Destination
link layer
SETUP-frame
UA-frame
I-frame
ACK-frame
DISC-frame
UA-frame
7/27/2019 RQ 3.pdf
45/58
A3.45
LINK UTILISATION
Recall that for Idle RQ utilisation U can be defined as U= Tx/Tt =>
U = Tx / (Tx + 2Tp) => U = 1/(1+2a) where a = Tp / Tx
For Continuous RQ with sliding window size K:
U = K / (1+2a) if K < 1+2a, or
U = 1 if K >= (1+2a)
In the latter case, we fill the pipeline.
LINK UTILISATION
7/27/2019 RQ 3.pdf
46/58
A3.46
LINK UTILISATION:
(CONTINUOUS RQ EXAMPLE)
Q)1000-bit frame to be transmitted using continuous RQ protocol. Assuming
the velocity of propagation is 2*108 m/s in cable and 3 *108 m/s in vacuum,
determine the link utilisation for the following transmission media:i) A 10 km link of 200 Mbps with a send window of K=7.
ii) A satellite link of 36 000 km of 1 Mbps with a send window of K = 127.
Answer:
Tp = S / V, a = Tx / Tp and U = K/(1+2a)
i) Tp = 5*10-5 , Tx = 1000 / (200*10
+6) = 5*10-6, a = 10,
For K = 7 (K< 1+2a=21), U = 7 / (1+20) = 0.33
ii) Tp = 0.24, Tx = 10-3 , a = 240
For K = 127 (K< 1+2a=481), U = 127 / (1+480) = 0.26
LINK UTILISATION WITH ERRORS
7/27/2019 RQ 3.pdf
47/58
A3.47
LINK UTILISATION WITH ERRORS:
SELECTIVE REPEAT
In case of the Selective Repeat scheme, utilisation in case of errors is
reduced by the number of retransmissions required per frame.
It is reminded that the number of retransmissions per frame are
Nr= 1 / (1- Pf) where Pf is the probability of receiving a frame in error.
As such, the link utilisation is:U = (K / (1+2a)) / (1 / (1- Pf)) = K (1- Pf) / (1+2a) if K < 1+2a, or
U = 1 - Pf if K >= 1+2a
Note: when K >= 1+2a we substitute K = 1+2a since bigger values of K do notincrease utilisation i.e. the pipeline is full.
LINK UTILISATION WITH ERRORS
7/27/2019 RQ 3.pdf
48/58
A3.48
LINK UTILISATION WITH ERRORS:
GO-BACK-N
In case of the Go-Back-N scheme, each error means that K frames
should be retransmitted.
It can be proved that the number of retransmissions per frame in this
scheme are:
Nr= ( 1 + Pf(K-1) ) / (1- Pf)As such, the link utilisation is:
U = K (1- Pf) / ( (1+2a)(1 + Pf(K-1)) ) if K < 1+2a, or
U = (1 - Pf) / ( 1 + Pf(K-1) ) if K >= (1+2a)
USES OF ARQ PROTOCOLS IN HIGHER
7/27/2019 RQ 3.pdf
49/58
A3.49
USES OF ARQ PROTOCOLS IN HIGHER
LAYERS ADAPTIVE WINDOW SIZE
Similar protocols are also used end-to-end, i.e. in the computers/hosts,in the Network and Transport layers for connection-oriented reliableprotocols
In the Network layer, ARQ-based flow control through sliding windowis used per Virtual Circuit (VC see later) e.g X.25
In the Transport layer, ARQ-based error and flow control is used perTransport Connection (e.g. TCP, TP4)
In these cases, the window size may be adaptive for congestion control
reasons, e.g. as in TCP In this case, the sender starts from a window size of 1 packet and
increases it exponentially with positive acks (2, 4, 8, 16, ) until themaximum size (i.e. receivers capacity is reached) slow start
Packet loss across the network is mainly due to congestion (bufferoverflow), in which case the maximum window size is set to thecurrent size and a slow start phase begins again From the current maximum size (threshold), there is a linear only
increase until the absolute maximum size i.e. the receivers capacity
In this way, the sending entity helps de-congesting the network
TCP ADAPTIVE WINDOW MECHANISM
7/27/2019 RQ 3.pdf
50/58
A3.50
0
4
8
12
16
20
24
28
32
36
40
44
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Transmiss ion number
C
ongestion
window(
kbytes)
Timeout
Threshold
New threshold
TCP ADAPTIVE WINDOW MECHANISM -
SLOW START ALGORITHM
7/27/2019 RQ 3.pdf
51/58
A3.51
DATA LINK LAYER PROTOCOLS
7/27/2019 RQ 3.pdf
52/58
A3.52
LINK LAYER PROTOCOL IMPLEMENTATIONS
Character-oriented protocols with idle RQ are used for low bit rates e.g.
Kermit and X-modem.
Bit oriented protocols with continuous RQ are used for high bit rates and
long distance communications.
The key protocol is the ISO High-level Data Link Control (HDLC).
Variations of HDLC are used in:
X.25 WANs use a version called LAPB.
LANs use a version called LLC2.
ISDN signalling uses a version called LAPD.
GSM signalling uses a modified LAPD called LAPDm. Modems use a version called LAPM.
Internet point-to-point lines use PPP.
7/27/2019 RQ 3.pdf
53/58
A3.53
HDLC VARIATIONS
HDLC
LAPB
(X.25)
LAPD
(ISDN)
LAPM
(V.42)
LAPDm
(GSM)
LLC2
(LANs)
PPP
(many)
7/27/2019 RQ 3.pdf
54/58
A3.54
HDLC (1)
High-level Data Link Control (HDLC) is the most common bit-
oriented link protocol in use. It has its origins in IBMs SynchronousData Link Control (SDLC).
Terminology:
primary (transmitter) frames are called commands.
secondary (receiver) frames are called responses.
unbalanced configuration where one machine will be primary and
the other will be secondary.
balanced configuration where both machines are both primary
and secondary.
7/27/2019 RQ 3.pdf
55/58
A3.55
HDLC (2)
HDLC Modes of operation:
Normal Response Mode (NRM): secondary transmits only if polledby the primary (unbalanced configuration).
Asynchronous Response Mode (ARM): secondary is allowed to
transmit asynchronously to the primary (unbalanced configuration)
Asynchronous Balanced Mode (ABM): used for duplex links andmainly in PSDN networks. Each station performs both primary and
secondary functions.
7/27/2019 RQ 3.pdf
56/58
A3.56
HDLC FRAME FORMAT
Flag FlagAddress Control Information FCS
Start-of-
frame-delimiter
End-of-
frame-delimiterframe header
FrameCheck
Se uence
8 8/16 88/16 16/320 to N
Flag = 01111110FCS = X16+X12+X5+1
Address: single, group or broadcast
7/27/2019 RQ 3.pdf
57/58
A3.57
HDLC FRAME TYPES (1)
The control field in the frame header determines the frame type.
Unnumbered frames (i.e. no sequence number): Used to setup and releaseconnections. Also, used to set NRM, ARM and ABM modes of operation.
Information Frames: Used to carry user information and piggy-backed
acknowledgments in ABM and ARM modes. The sequence number range is
0-7 for normal frames and 0-127 for extended frames. Supervisory Frames: Used for error control such as Reject (REJ) for Go-back
-N and Selective Reject (SREJ) for selective-repeat operation. Also, used for
flow control such as Receiver Ready (RR) and Receiver Not Ready (RNR).
Data transparency is achieved by using the flag field and bit stuffing.
7/27/2019 RQ 3.pdf
58/58
A3.58
HDLC FRAME TYPES (2) Information frames.
Supervisory frames - RR, RNR, REJ, SREJ.
Unnumbered commands: Set Asynchronous Response Mode (Extended) - SARM(E).
Set Normal Response Mode (Extended) - SNRM(E).
Set Asynchronous Balanced Mode (Extended) - SABM(E).
Reset - RSET.
Frame Reject - FRMR.
Disconnect - DISC.
Unnumbered responses: Unnumbered Acknowledgment - UA.
Command Reject - CDMR.
Frame Reject - FRMR.
Disconnect Mode - DM.
Top Related