You are on page 1of 39

Practice Problems for previous Lecture

Cont..
Bit-oriented
Protocols

SDLC HDLC LAPs LANs

SDLC: Synchronous data link control – IBM


HDLC: High-level data link control – ISO
LAPs : Link access procedure
HDLC
 High-level Data Link Control (HDLC) is a group of
communication protocols of the data link layer for
transmitting data between network points or
nodes.
 Since it is a data link protocol, data is organized
into frames. A frame is transmitted via the network
to the destination that verifies its successful
arrival.
 It is a bit - oriented protocol that is applicable for
both point - to - point and multipoint
communications.

10.5
HDLC
 Support half/full – duplex over point-to-
point and multipoint links
 Uses Poll / Select Mechanism

 HDLC system characterization


 Station types
 Configurations
 Communication modes
 Three types of Frames
HDLC station types

 Primary station
 The station that controls the medium by sending
“command”
 Secondary station
 The station that “response” to the primary station
 Combined station
 The station that can both command and response
HDLC configurations

 The relationship of hardware devices on


a link
 3 configurations of all stations
(primary/secondary/combined)
 Unbalanced
 Symmetrical
 Balanced
HDLC Configurations:
Unbalanced (master/slave)
HDLC Configurations:
Symmetrical
HDLC Configurations:
Balanced
HDLC communication modes

Mode : describe “Who controls the link”

NRM: Normal response mode (master/slave)


ARM: Asynchronous response mode
(secondary can initiate if idle, all transmissions are made to primary station)
ABM: Asynchronous balanced mode (point-to-point equal)
HDLC frame
 3 frame types
 Information frame (I-frame)

 Supervisory frame (S-frame)

For ACK, Flow/Error controls

 Unnumbered frame (U-frame)

For Management purpose such as Mode


setting, Initialize, Disconnect
HDLC Frame
HDLC is a bit - oriented protocol where each frame contains up to
six fields. The structure varies according to the type of frame. The
fields of a HDLC frame are −

 Flag − It is an 8-bit sequence that marks the beginning and the


end of the frame. The bit pattern of the flag is 01111110.
 Address − It contains the address of the receiver. If the frame
is sent by the primary station, it contains the address(es) of the
secondary station(s). If it is sent by the secondary station, it
contains the address of the primary station. The address field
may be from 1 byte to several bytes.
 Control − It is 1 or 2 bytes containing flow and error control
information as well as sequence numbering of frames.
 Payload − This carries the data from the network layer. Its
length may vary from one network to another.
 FCS − It is a 2 byte or 4 bytes frame check sequence for error
detection. The standard code used is CRC (cyclic redundancy
code)
10.15
HDLC Frame
HDLC Frame: Flag field

Flag:  beginning and ending of a frame


 Last flag can be the start of the next flag
Flag  similar to “Control Character”
 problem for transparency !!!  Bit Stuffing
Bit Stuffing

 How to differentiate data and flag?


 Adding one extra 0 whenever there are five
consecutive 1s in the data
HDLC: Bit stuffing
 TX more than 5
consecutives “1” 
insert (stuffs) one
redundant bit “0” after
the fifth “1”
 Example: 0111 1111 1000
 0111 1101 1100 0
 No Matter that the sixth
bit is one or not !
 3-Exceptional:
1. it’s really a Flag
(6 consecutive “1”)
2. Tx is being
aborted (7-14 consecutive
“1”)
3. Channel is in Idle
state (>= 15 consecutive “1)
HDLC frame: Address field

 Primary station creates a frame


 destination address
 Secondary station creates a frame
 source address
 Can be one byte or more
HDLC Frame: Address field

 One byte = 128 stations (one bit is used for another


purpose)
 Large network needs multiple byte address
HDLC Frame: Control field
Contd..

N(R)  can be thought as “ACK”

if correct  N(R) = next frame seq


else  N(R) = number of damaged frame (need reTx)

In S-Frame  not transmit data, so do not need N(S)

 S-Frame for response (return N(R) )


Code  flow and error control information
HDLC frame: Poll / Final

P/F: dual purposes


1) P/F = 0 no meaning (regular data)
2) P/F = 1 means “poll” when sent by primary
P/F = 1 means “final” when sent by secondary

 P/F bit. Poll/Final is a single bit with two names. It is


called Poll when part of a command (set by the primary station
to obtain a response from a secondary station), and Final when
part of a response (set by the secondary station to indicate a
response or the end of transmission).
HDLC Frame: Information field
HDLC Frame: FCS field

FCS: Frame check sequence


HDLC: S-Frame
HDLC: Use of P/F field
HDLC: Use of P/F field

Piggybacking:
data + ack
HDLC: Use of P/F field
HDLC: Use of P/F field
HDLC: S-Frame
Acknowledgement
HDLC: S-Frame
Positive Acknowledgement
 RR
 Receiver sends “Positive Ack” (no data to send)
 N(R) = seq of next frame
 RNR
 Receiver sends “Positive Ack”
 N(R) = seq of next frame
 Receiver tells sender that sender cannot send any
frame until ‘RR’ frame is received
HDLC: S-Frame
Negative Acknowledgement
 Reject (REJ)
 Go-back-n ARQ
 N(R) = # of damage frame (and follow)
 Selective-Reject (SREJ)
 N(R) = # of damage frame
HDLC: U-Frame control field

For session management and control information


HDLC: U-Frame control field
HDLC: Polling example
HDLC: Selecting example
HDLC: Peer-to-peer example

SABM: Set asynchronous balanced mode


UA: Unnumbered ack
HDLC: Peer-to-peer example..

You might also like