SlideShare a Scribd company logo
1 of 99
Data Link Control & Protocol 
Concepts 
Chapter 5
Introduction 
 Characters are defined as binary 
character codes for the purpose of Digital 
Transfer. 
 Data Link Layer is Concerned with digital 
transfer over a link. 
 Link – P to P circuit or Radio Based 
Channel. 
 Effective Digital Data communication 
need  Control & Manage the 
Exchange
Functions 
 To Establish and maintain Effective 
Communication. 
 Error Control -> 
Defines how a station check frames for 
errors & What it does if it finds. 
 Flow Control -> 
Defines the way in which many frames 
sent and how the stations do error 
control.
Flow Control 
 Tells the sender how much data it can 
transmit before it must wait for an 
acknowledgement from the receiver. 
 Receiving device has 
 Limited speed 
 Limited amount of Memory 
 So the sending device must not send 
frames at a rate faster than a receiving 
station can absorb them.
Techniques 
 To control the flow of data across the 
communication links: 
Stop and Wait flow Control 
Sliding Window flowControl.
Stop and Wait flow Control
Stop and Wait flow Control 
 Source transmits frame 
 Destination receives frame and replies 
with acknowledgement (ACK) 
 Source waits for ACK before sending 
next frame 
 Destination can stop flow by not 
sending ACK 
Adv ---- Simplicity 
Disadv ---- Inefficiency
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, or RR – 
Receiver Ready) supplemented with 
RNR (receiver not ready).
 The problem of “Stop and Wait” is not be 
able to send multiple packets 
 Receiver has buffer of W (called window size) 
frames 
 Transmitter can send up to W frames without 
ACK 
 Each frame is numbered 
 frames are numbered modulo-n (0 … n-1) 
 ACK includes number of next frame expected
ERROR CONTROL: 
 Error control in the data link layers is 
based on automatic repeat 
request(ARQ)which means 
retransmission of data in three cases: 
 1. Damaged frame 
 2. Lost frame 
 3. Lost acknowledgement
DAMAGED FRAME: 
 A recognizable frame does arrive, but 
some of the bits are in error.
LOST FRAME: 
 A frame fails to arrive at the other side.
LOST ACKNOWLEDGEMENT: 
 An acknowledgement fails to arrive at 
the source. 
 The sender is not aware that 
acknowledgement has been transmitted 
from the receiver
Automatic repeat request 
 The purpose of ARQ is to turn an 
unreliable data link into a reliable one. 
 Three versions of ARQ have been 
standardized. 
 1. stop-and-wait ARQ 
 2. Go-back-N ARQ 
 3. selective-reject ARQ
STOP-AND-WAIT ARQ: 
 Stop-and-wait is the simplest of the error 
control protocols. 
 A transmitter sends a frame then stops and 
waits for an acknowledgment. 
 If a positive acknowledgment (ACK) is 
received, the next frame is sent. 
 If a negative acknowledgment (NAK) is 
received, the same frame is transmitted 
again.
 Source transmits single frame and Wait 
for ACK 
 If received frame is damaged, discard it 
 If transmitter receives no ACK within 
timeout, retransmits 
 If ACK damaged,transmitter will not 
recognize it 
 Transmitter will retransmit after timeout 
 Receiver gets two copies of frame, but 
disregards one of them 
 Use ACK0 and ACK1 
 ACKi means “I am ready to receive frame i”
 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
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.
Selective Reject 
 Also called selective retransmission 
 Only rejected frames are retransmitted 
 Subsequent frames are accepted by the 
receiver and buffered 
 Minimizes retransmissions 
 Receiver must maintain large enough 
buffer 
 Complex system
Protocols 
 set of rules that governs the operation 
of functional units to achieve 
communication . 
 data link protocol. 
 The type of protocol used to establish a 
link between two stations in accordance 
with the second layer of OSI model
Data link protocol subgroups 
 Asynchronous protocols 
 Synchronous protocols 
 Asynchronous protocols treat each 
character in a bit stream independently. 
 Synchronous protocols take the whole 
bit stream and chop it into characters of 
equal size.
 Asynchronous protocols-used primarily 
in modems 
 feature start and stop bits and variable-length 
gaps between characters. 
 A variety of Asynchronous protocols :- 
 1. X-modem 
 2. Y-modem 
 3. Z-modem 
 4. Blocked Asynchronous transmission 
(BLAST)
X-MODEM 
 File transfer communication for 
telephone line communication between 
PC‟s. 
 designed by Ward Christiansen in 1979, 
X-modem. 
 It is a half duplex stop-and-wait ARQ 
protocol.
 In this protocol, transmission begins 
with the sending of a NACK frame from 
the receiver to the sender. 
 each time the sender sends a frame, it 
must wait for an acknowledgement 
before the next frame can be sent. 
 A frame can be resend either if 
response is not received by the sender 
after a specified period of time 
 or if NACK is received by the sender.
Y-MODEM: 
 1. The data unit is 1024 bytes. 
 2. ITU-T CRC-16 is used for error 
checking 
 3. Multiple files can be sent 
simultaneously
Z-MODEM: 
 Z-modem is a protocol which combines 
features of both X-modem and Y-modem. 
 BLAST: 
 BLAST is more powerful than X-modem. 
It is full duplex with sliding window flow 
control. 
 It allows the transfer of data and binary 
files.
35 
Synchronous Transmission 
With Synchronous Transmission all the 
letters or data in one group of data is 
transmitted at one time as a block of 
data called a frame or packet. 
The start and end of each packet 
sometimes is marked by adding 
synchronization characters (SYN) at the 
start/end of each packet.
Message Format 
 Start of header (SOH) 
 Header (Address, sequence, date and 
time) 
 Start of text (STX) 
 Text 
 End of text (ETX) or text length 
 Trailer 
 Block check character (BCC) 
 Synchronization character (SYN)
Synchronous Data Link Protocols - 
Classification 
 Character-oriented protocols 
 Special character for start and end of message 
 Binary Synchronous Communication Protocol (BSC 
or BISYNC) 
 Byte-count-oriented protocols 
 Special character for start of the header, count 
field, message, block check character (BCC) 
 DEC’s Digital Data Communication Message 
Protocol (DDCMP) 
 Bit-oriented protocols 
 Use flag character for start and end of message 
 IBM’s Synchronous Data Link Control (SDLC) 
 ISO’s High-Level Data Link control (HDLC)
Binary Synchronous 
Communications 
 By IBM 
 For 6-bit transcode (SBT), ASCII, EBCDIC 
 SYN at start and middle of transmission 
 Point to point and multipoint (polling) 
 ARQ approach for error checking (ACK1, ACK0, NAK) 
 Pros: 
 Transparency and non-transparency modes 
 Efficient, understandable, and widely used 
 Point-to-point & multipoint operations 
 Cons: 
 Code dependent 
 Half-duplex protocol 
 Cumbersome for transparency mode
High Level Data Link Control 
 HDLC 
 ISO Standard 
 Basis for some other DLL protocols
40 
High-Level Data Link Control 
(HDLC) 
 The OSI’s data link protocol 
 A bit-oriented protocol 
 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 
(IBM’s SDLC has similar features and the format of HDLC)
41 
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)
42 
Transparency Problem 
 The problem of transparency 
 Because HDLC uses 01111110 to mark the 
start and end of a packet, the character 
“01111110” will confuse the receiver. 
 Solution - Bit Stuffing 
 Add a 0 after every five 1s at sender side 
and delete the 0 at receiver side.
43 
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
High-Level Data Link Control (HDLC) 
 HDLC was defined by ISO for use on both 
point-to-point and multipoint data links. 
 It supports full-duplex communication 
 Other similar protocols are 
 Synchronous Data Link Control (SDLC) by IBM 
 Advanced Data Communication Control Procedure 
(ADCCP) by ANSI 
 Link Access Procedure, Balanced (LAP-B) by 
CCITT, as part of its X.25 packet-switched 
network standard
HDLC Overview 
Broadly HDLC features are as follows: 
 Reliable protocol 
 selective repeat or go-back-N 
 Full-duplex communication 
 receive and transmit at the same time 
 Bit-oriented protocol 
 use bits to stuff flags occurring in data 
 Flow control 
 adjust window size based on receiver capability 
 Uses physical layer clocking and 
synchronization to send and receive frames
HDLC Overview 
 Defines three types of stations 
 Primary 
 Secondary 
 Combined 
 Defines three types of data transfer mode 
 Normal Response mode 
 Asynchronous Response mode 
 Asynchronous Balanced mode 
 Three types of frames 
 Unnumbered 
 information 
 Supervisory
HDLC 
 The three stations are : 
 Primary station 
 Has the responsibility of controlling the operation of data 
flow the link. 
 Handles error recovery 
 Frames issued by the primary station are called 
commands. 
 Secondary station, 
 Operates under the control of the primary station. 
 Frames issued by a secondary station are called 
responses. 
 The primary station maintains a separate logical link with 
each secondary station. 
 Combined station, 
 Acts as both as primary and secondary station. 
 Does not rely on other for sending data
HDLC 
Primary 
Commands 
Responses 
Unbalanced Mode 
Secondary Secondary 
Balanced mode 
Combined Combined 
commands/Responses
HDLC 
 The three modes of data transfer operations are 
 Normal Response Mode (NRM) 
 Mainly used in terminal-mainframe networks. In this case, 
 Secondaries (terminals) can only transmit when specifically 
instructed by the primary station in response to a polling 
 Unbalanced configuration, good for multi-point links 
 Asynchronous Response Mode (ARM) 
 Same as NRM except that the secondaries can initiate 
transmissions without direct polling from the primary station 
 Reduces overhead as no frames need to be sent to allow 
secondary nodes to transmit 
 Transmission proceeds when channel is detected idle , used 
mostly in point-to-point-links 
 Asynchronous Balanced Mode (ABM) 
 Mainly used in point-to-point links, for communication between 
combined stations
Non-operational Modes 
 Normal Disconnected Mode 
 Asynchronous Disconnected Mode 
Both the above modes mean that the secondary node is 
logically disconnected from the primary node 
 Initialization Mode 
 A node negotiates transmission parameters with the other 
node E.g., flow control information 
 Parameters negotiated in this mode are used during any of 
the data transfer modes
Data Link Control HDLC frame 
structure 
(a) Frame 
Format 
(b) Control 
field 
format
Data Link Control 
HDLC frame structure 
(c) Extended address field (d) Extended control field
HDLC 
 Flag: 01111110- start and ending delimiter. Bits are stuffed for flags in 
data frames 
 FCS: 16-bit CRC using generating polynomial 
G(x) = x16 + x12 + x5 + 1 
 Address field: 
 mainly used in multidrop link configuration, and not used in point-to-point 
 In unbalanced configuration, every secondary is assigned a unique address. 
Contains address of secondary station in both command and response 
frames 
 In balanced mode, command frame has destination address and response 
frame has sending node’s address 
 Group addresses are also possible. E.g., One command sent to all the 
secondaries 
 In I-frames, N(s) is the sequence number of the frame being sent, and 
R(s) is the sequence number of the frame being expected. 
 The P/F bit, known as the poll/final bit, is used with different meaning 
in different contexts. 
 It is used to indicate polling, to indicate the final I-frame, etc
HDLC 
 There are three different classes of frames 
used in HDLC 
 Unnumbered frames, used in link setup and 
disconnection, and hence do not contain ACK. 
 Information frames, which carry actual 
information. Such frames can piggyback ACK in 
case of ABM 
 Supervisory frames, which are used for error and 
flow control purposes and hence contain send and 
receive sequence numbers
HDLC 
 There are four different supervisory frames 
 SS=00, Receiver Ready (RR), and N(R) ACKs all 
frames received up to and including the one with 
sequence number N(R) - 1 
 SS=10, Receiver Not Ready (RNR), and N(R) has 
the same meaning as above 
 SS=01, Reject; all frames with sequence number 
N(R) or higher are rejected, which in turns ACKs 
frames with sequence number N(R) -1 or lower. 
 SS=11, Selective Reject; the receive rejects the 
frame with sequence number N(R)
HDLC 
 The unnumbered frames can be 
grouped into the following categories: 
 Mode-setting commands and responses 
 Recovery commends and responses 
 Miscellaneous commands and responses
Review of Link Layer 
 Services 
 Framing 
 Error control 
 Reliability 
 Connection management 
 Medium access control 
 Switching 
 Protocols, Standards 
 Ethernet 
 Token Ring 
 FDDI 
 Wireless 
 PPP 
 HDLC
HDLC Station Types 
 Primary station 
 Controls operation of link 
 Frames issued are called commands 
 Secondary station 
 Under control of primary station 
 Frames issued called responses 
 Combined station 
 May issue commands and responses
HDLC Link Configurations 
 Unbalanced 
 One primary and one or more secondary 
stations 
 Supports full duplex and half duplex 
 Balanced 
 Two combined stations 
 Supports full duplex and half duplex
HDLC Transfer Modes (1) 
 Normal Response Mode (NRM) 
 Unbalanced configuration 
 Primary initiates transfer to secondary 
 Secondary may only transmit data in 
response to command from primary 
 Terminal-host communication 
 Host computer as primary 
 Terminals as secondary 
 not so common nowadays
HDLC Transfer Modes (2) 
 Asynchronous Balanced Mode (ABM) 
 Balanced configuration 
 Either station may initiate transmission 
without receiving permission 
 Most widely used
Frame Structure 
 All transmissions in frames 
 Single frame format for all data and 
control exchanges
Frame Structure Diagram
Flag Fields 
 Delimit frame at both ends 
 01111110 
 Receiver hunts for flag sequence to 
synchronize 
 Bit stuffing used to avoid confusion with 
data containing 01111110 
 0 inserted after every sequence of five 1s 
 If receiver detects five 1s it checks next bit 
 If 0, it is deleted 
 If 1 and seventh bit is 0, accept as flag
Bit Stuffing Example
Address Field 
 Identifies secondary station that sent or 
will receive frame 
 Usually 8 bits long 
 May be extended to multiples of 7 bits 
with prior agreement 
 leftmost bit of each octet indicates that it is 
the last octet (1) or not (0)
Frame Types 
 Information - data to be transmitted to 
user 
 Acknowledgment is piggybacked on 
information frames 
 Supervisory – ARQ messages 
(RR/RNR/REJ/SREJ) when piggyback 
not used 
 Unnumbered – supplementary link 
control functions. For examples, 
 setting the modes
Control Field Diagram
Poll/Final Bit 
 Use depends on context. A typical use 
is below. 
 Command frame 
 P bit set to 1 to solicit (poll) supervisory 
frame from peer 
 Response frame 
 F bit set to 1 to indicate response to 
soliciting command
Information Field 
 Only in information and some 
unnumbered frames 
 Must contain integral number of octets 
 Variable length
Frame Check Sequence Field 
 FCS 
 Error detection 
 16 bit CRC 
 Optional 32 bit CRC
HDLC Operation 
 Exchange of information, supervisory 
and unnumbered frames 
 Three phases 
 Initialization 
 Data transfer 
 Disconnect
Initialization 
 Issue one of six set-mode commands 
 Signals other side that initialization is 
requested 
 Specifies mode (NRM, ABM, ARM) 
 Specifies 3- or 7-bit sequence numbers 
 If request accepted HDLC module on 
other side transmits unnumbered 
acknowledged (UA) frame 
 If request rejected, disconnected mode 
(DM) sent
Data Transfer 
 Both sides may begin to send user data in I-frames 
 N(S): sequence number of outgoing I-frames 
 modulo 8 or 128, (3- or 7-bit) 
 N(R) acknowledgment for I-frames received 
 seq. number of I-frame expected next 
 S-frames are also used for flow and error control 
 Receive ready (RR) frame acknowledges last I-frame received 
 Indicating next I-frame expected 
 Used when there is no reverse data 
 Receive not ready (RNR) acknowledges, but also asks peer to 
suspend transmission of I-frames 
 When ready, send RR to restart 
 REJ initiates go-back-N ARQ 
 Indicates last I-frame received has been rejected 
 Retransmission is requested beginning with N(R) 
 Selective reject (SREJ) requests retransmission of single frame
Disconnect 
 Send disconnect (DISC) frame 
 Remote entity must accept by replying 
with UA 
 Informs layer 3 user about the termination 
of connection
Other DLC Protocols 
(LAPB,LAPD) 
 Link Access Procedure, Balanced (LAPB) 
 Part of X.25 (ITU-T) 
 Subset of HDLC - ABM (Async. Balanced 
Mode) 
 Point to point link between user and packet 
switching network node 
 HDLC frame format 
 Link Access Procedure, D-Channel (LAPD) 
 Part of ISDN (ITU-T) 
 ABM 
 Always 7-bit sequence numbers (no 3-bit) 
 always 16-bit CRC
Other DLC Protocols (LLC) 
 Logical Link Control (LLC) 
 IEEE 802 
 For LANs (Local Area Networks) 
 Link control split between medium access control layer (MAC) and 
LLC (on top of MAC) 
 Different frame format 
 Two addresses needed (sender and receiver) – actually at MAC layer 
 Sender and receiver SAP addresses 
 Control field is same as HDLC (16-bit version for I and S frames; 8- 
bit for U frames) 
 No primary and secondary - all stations are peers 
 Error detection at MAC layer 
 32 bit CRC
Other DLC Protocols (LLC) 
 LLC Services 
 3 alternatives 
 Connection Mode Services 
 Similar to HDLC ABM 
 Unacknowledged connectionless services 
 no connection setup 
 No flow-control, no error control, no acks (thus 
not reliable) 
 good to be used with TCP/IP. Why? 
 Acknowledged Connectionless Service 
 No connection setup 
 reliable communication
High-level Data Link Control (HDLC) 
- I 
 Operating modes 
 Normal response mode (NRM) for a primary node 
and one or more secondary modes on a circuit 
(polling) 
 Asynchronous balanced mode (ABM) for nodes 
with peers (most used for efficiency with no 
polling in full duplex) 
 Asynchronous response mode (ARM) for primary 
and secondary nodes with same transmission right 
(rarely used) 
 Frames 
 Supervisory or S format: control acknowledge 
 Unnumbered or U format: (operation mode, start, 
termination) 
 Information or I format: (data)
High-level Data Link Control (HDLC) 
- I 
 Flag 
 01111110 
 Bit stuffing 0 after five 1s by hardware 
 For synchronization 
 Other fields 
 Address field 
 Control field: type of frame, sequence number for 
information frames 
 Information field: multiple of 8 bits 
 Frame check sequence (FCS) field: error checking 
 Frame flow 
 Initialization phase, data transfer phase, and 
disconnect phase
Other Data Link Control Protocols 
 Link access procedure, balanced (LAPB) 
 Full-duplex, point-to-point mode 
 For X.25 DTE and packet switching network 
 Link access procedure, D-channel (LAPD) 
 ISDN network 
 Link access procedure for frame –mode 
bearer service (LAPF) 
 High-speed packet switching network on low error 
rate digital circuits 
 Asynchronous transfer mode 
 Data transfer on high s-speed, digital, error free 
network
High Level Data Link Control 
 One of the more popular data link 
control protocols 
 Similar to IBM’s SDLC but more flexible 
 Many data link protocols are based on 
HDLC – thus if you learn HDLC, you will 
understand many others, such as all the 
LAP standards 
11.82
HDLC Station Types 
 Primary station 
11.83 
 Controls operation of link 
 Frames issued are called commands 
 Maintains separate logical link to each secondary 
station 
 Secondary station 
 Under control of primary station 
 Frames issued called responses 
 Combined station 
 May issue commands and responses
HDLC Link Configurations 
 Unbalanced 
11.84 
 One primary and one or more secondary 
stations 
 Supports full duplex and half duplex 
 Balanced 
 Two combined stations 
 Supports full duplex and half duplex
HDLC Transfer Modes (1) 
 Normal Response Mode (NRM) 
11.85 
 Unbalanced configuration 
 Primary initiates transfer to secondary 
 Secondary may only transmit data in 
response to command from primary 
 Used on multi-drop lines 
 Host computer as primary 
 Terminals as secondary
HDLC Transfer Modes (2) 
 Asynchronous Balanced Mode (ABM) 
11.86 
 Balanced configuration 
 Either station may initiate transmission 
without receiving permission 
 Most widely used 
 No polling overhead
HDLC Transfer Modes (3) 
 Asynchronous Response Mode (ARM) 
11.87 
 Unbalanced configuration 
 Secondary may initiate transmission 
without permission from primary 
 Primary responsible for line 
 Rarely used
Frame Structure 
 Synchronous transmission 
 All transmissions in frames 
 Single frame format for all data and 
control exchanges 
11.88
Frame Structure Diagram 
11.89
11.90 
HDLC frame types
Address Field 
 Identifies secondary station that sent or will 
receive frame 
 Usually 8 bits long 
 May be extended to multiples of 7 bits 
 LSB of each octet indicates that it is the last octet (1) 
or not (0) 
 All ones (11111111) is broadcast 
11.91
Control Field 
 Different for different frame type 
11.92 
 Information - data to be transmitted to 
user (next layer up) 
 Flow and error control piggybacked on 
information frames 
 Supervisory - ARQ when piggyback not 
used 
 Unnumbered - supplementary link control 
 First one or two bits of control field 
identify frame type
Control Field Diagram 
11.93
Poll/Final Bit 
 Use depends on context 
 Command frame 
11.94 
 P bit 
 1 to solicit (poll) response from peer 
 Response frame 
 F bit 
 1 indicates response to soliciting command
Information Field 
 Only in information and some 
unnumbered frames 
 Must contain integral number of octets 
 Variable length 
11.95
Frame Check Sequence Field 
 FCS 
 Error detection 
 16 bit CRC 
 Optional 32 bit CRC 
11.96
HDLC Operation 
 Exchange of information, supervisory 
and unnumbered frames 
 Three phases 
11.97 
 Initialization 
 Data transfer 
 Disconnect
HDLC Bit-Oriented Frame 
Format 
Information 
Frame 
Supervisory 
Frame 
Unnumbered 
Frame 
Frame Sequence # Poll/Final Next Frame Expected
Data link control & protocol concepts

More Related Content

What's hot

Internetworking
InternetworkingInternetworking
Internetworking
Raghu nath
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
tameemyousaf
 

What's hot (20)

Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
 
Datalinklayer tanenbaum
Datalinklayer tanenbaumDatalinklayer tanenbaum
Datalinklayer tanenbaum
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
TCP and UDP
TCP and UDP TCP and UDP
TCP and UDP
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Internetworking
InternetworkingInternetworking
Internetworking
 
Distance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing AlgorithmDistance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing Algorithm
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
HDLC and Point to point protocol
HDLC and Point to point protocolHDLC and Point to point protocol
HDLC and Point to point protocol
 
Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer
 
Routing in Mobile Ad hoc Networks
Routing in Mobile Ad hoc NetworksRouting in Mobile Ad hoc Networks
Routing in Mobile Ad hoc Networks
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
 
client server protocol
client server protocolclient server protocol
client server protocol
 
Data communication and networks by B. Forouzan
Data communication and networks by B. ForouzanData communication and networks by B. Forouzan
Data communication and networks by B. Forouzan
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake
 
Tcp
TcpTcp
Tcp
 
Transport layer
Transport layer Transport layer
Transport layer
 

Viewers also liked

Chapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9eChapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9e
adpeer
 
HDLC(high level data link control)
HDLC(high level data link control)HDLC(high level data link control)
HDLC(high level data link control)
Anand Biradar
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control Protocols
TechiNerd
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
mekind
 
Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22
koolkampus
 

Viewers also liked (20)

Data link control protocol(1)
Data link control protocol(1)Data link control protocol(1)
Data link control protocol(1)
 
Data link control protocol(2)
Data link control protocol(2)Data link control protocol(2)
Data link control protocol(2)
 
Chapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9eChapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9e
 
HDLC(high level data link control)
HDLC(high level data link control)HDLC(high level data link control)
HDLC(high level data link control)
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control Protocols
 
14 data link control
14 data link control14 data link control
14 data link control
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link control
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
Data link layer
Data link layer Data link layer
Data link layer
 
Go Back N ARQ
Go  Back N ARQGo  Back N ARQ
Go Back N ARQ
 
Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22Data Link Protocols in Data Communication DC22
Data Link Protocols in Data Communication DC22
 
Data link control protocol(3)
Data link control protocol(3)Data link control protocol(3)
Data link control protocol(3)
 
Data link control
Data link controlData link control
Data link control
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
Osi model
Osi modelOsi model
Osi model
 
OSI Model of Networking
OSI Model of NetworkingOSI Model of Networking
OSI Model of Networking
 
Flow Control
Flow ControlFlow Control
Flow Control
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) ppt
 
GO BACK N PROTOCOL
GO BACK N PROTOCOLGO BACK N PROTOCOL
GO BACK N PROTOCOL
 
OSI Model
OSI ModelOSI Model
OSI Model
 

Similar to Data link control & protocol concepts

group11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressinggroup11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressing
Anitha Selvan
 
datalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxdatalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptx
lathass5
 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
k2w9psdb96
 

Similar to Data link control & protocol concepts (20)

Data Link Control
Data Link ControlData Link Control
Data Link Control
 
09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt
 
DATA LINK CONTROL.pptx
DATA LINK CONTROL.pptxDATA LINK CONTROL.pptx
DATA LINK CONTROL.pptx
 
07 data linkcontrol
07 data linkcontrol07 data linkcontrol
07 data linkcontrol
 
Unit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part AUnit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part A
 
DLL
DLLDLL
DLL
 
Chapter 11: Data Link Control
Chapter 11: Data Link ControlChapter 11: Data Link Control
Chapter 11: Data Link Control
 
datalinklayermukesh
datalinklayermukeshdatalinklayermukesh
datalinklayermukesh
 
group11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressinggroup11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressing
 
Datalink control(framing,protocols)
Datalink control(framing,protocols)Datalink control(framing,protocols)
Datalink control(framing,protocols)
 
HDLC
HDLCHDLC
HDLC
 
Different protocols for data communication networks
Different protocols for data communication networks Different protocols for data communication networks
Different protocols for data communication networks
 
datalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxdatalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptx
 
HDLC(High level Data Link Control)
HDLC(High level Data Link Control)HDLC(High level Data Link Control)
HDLC(High level Data Link Control)
 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
 
stop and wait
stop and waitstop and wait
stop and wait
 
Nigga.pdf
Nigga.pdfNigga.pdf
Nigga.pdf
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
 
Unit 2
Unit 2Unit 2
Unit 2
 
Role of CAN BUS in automotives
Role of CAN BUS in automotivesRole of CAN BUS in automotives
Role of CAN BUS in automotives
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Data link control & protocol concepts

  • 1. Data Link Control & Protocol Concepts Chapter 5
  • 2. Introduction  Characters are defined as binary character codes for the purpose of Digital Transfer.  Data Link Layer is Concerned with digital transfer over a link.  Link – P to P circuit or Radio Based Channel.  Effective Digital Data communication need  Control & Manage the Exchange
  • 3. Functions  To Establish and maintain Effective Communication.  Error Control -> Defines how a station check frames for errors & What it does if it finds.  Flow Control -> Defines the way in which many frames sent and how the stations do error control.
  • 4. Flow Control  Tells the sender how much data it can transmit before it must wait for an acknowledgement from the receiver.  Receiving device has  Limited speed  Limited amount of Memory  So the sending device must not send frames at a rate faster than a receiving station can absorb them.
  • 5. Techniques  To control the flow of data across the communication links: Stop and Wait flow Control Sliding Window flowControl.
  • 6. Stop and Wait flow Control
  • 7. Stop and Wait flow Control  Source transmits frame  Destination receives frame and replies with acknowledgement (ACK)  Source waits for ACK before sending next frame  Destination can stop flow by not sending ACK Adv ---- Simplicity Disadv ---- Inefficiency
  • 8. 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, or RR – Receiver Ready) supplemented with RNR (receiver not ready).
  • 9.
  • 10.  The problem of “Stop and Wait” is not be able to send multiple packets  Receiver has buffer of W (called window size) frames  Transmitter can send up to W frames without ACK  Each frame is numbered  frames are numbered modulo-n (0 … n-1)  ACK includes number of next frame expected
  • 11.
  • 12. ERROR CONTROL:  Error control in the data link layers is based on automatic repeat request(ARQ)which means retransmission of data in three cases:  1. Damaged frame  2. Lost frame  3. Lost acknowledgement
  • 13. DAMAGED FRAME:  A recognizable frame does arrive, but some of the bits are in error.
  • 14. LOST FRAME:  A frame fails to arrive at the other side.
  • 15. LOST ACKNOWLEDGEMENT:  An acknowledgement fails to arrive at the source.  The sender is not aware that acknowledgement has been transmitted from the receiver
  • 16. Automatic repeat request  The purpose of ARQ is to turn an unreliable data link into a reliable one.  Three versions of ARQ have been standardized.  1. stop-and-wait ARQ  2. Go-back-N ARQ  3. selective-reject ARQ
  • 17. STOP-AND-WAIT ARQ:  Stop-and-wait is the simplest of the error control protocols.  A transmitter sends a frame then stops and waits for an acknowledgment.  If a positive acknowledgment (ACK) is received, the next frame is sent.  If a negative acknowledgment (NAK) is received, the same frame is transmitted again.
  • 18.  Source transmits single frame and Wait for ACK  If received frame is damaged, discard it  If transmitter receives no ACK within timeout, retransmits  If ACK damaged,transmitter will not recognize it  Transmitter will retransmit after timeout  Receiver gets two copies of frame, but disregards one of them  Use ACK0 and ACK1  ACKi means “I am ready to receive frame i”
  • 19.  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
  • 20.
  • 21.
  • 22. 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.
  • 23.
  • 24.
  • 25. Selective Reject  Also called selective retransmission  Only rejected frames are retransmitted  Subsequent frames are accepted by the receiver and buffered  Minimizes retransmissions  Receiver must maintain large enough buffer  Complex system
  • 26.
  • 27. Protocols  set of rules that governs the operation of functional units to achieve communication .  data link protocol.  The type of protocol used to establish a link between two stations in accordance with the second layer of OSI model
  • 28. Data link protocol subgroups  Asynchronous protocols  Synchronous protocols  Asynchronous protocols treat each character in a bit stream independently.  Synchronous protocols take the whole bit stream and chop it into characters of equal size.
  • 29.  Asynchronous protocols-used primarily in modems  feature start and stop bits and variable-length gaps between characters.  A variety of Asynchronous protocols :-  1. X-modem  2. Y-modem  3. Z-modem  4. Blocked Asynchronous transmission (BLAST)
  • 30. X-MODEM  File transfer communication for telephone line communication between PC‟s.  designed by Ward Christiansen in 1979, X-modem.  It is a half duplex stop-and-wait ARQ protocol.
  • 31.  In this protocol, transmission begins with the sending of a NACK frame from the receiver to the sender.  each time the sender sends a frame, it must wait for an acknowledgement before the next frame can be sent.  A frame can be resend either if response is not received by the sender after a specified period of time  or if NACK is received by the sender.
  • 32. Y-MODEM:  1. The data unit is 1024 bytes.  2. ITU-T CRC-16 is used for error checking  3. Multiple files can be sent simultaneously
  • 33. Z-MODEM:  Z-modem is a protocol which combines features of both X-modem and Y-modem.  BLAST:  BLAST is more powerful than X-modem. It is full duplex with sliding window flow control.  It allows the transfer of data and binary files.
  • 34.
  • 35. 35 Synchronous Transmission With Synchronous Transmission all the letters or data in one group of data is transmitted at one time as a block of data called a frame or packet. The start and end of each packet sometimes is marked by adding synchronization characters (SYN) at the start/end of each packet.
  • 36. Message Format  Start of header (SOH)  Header (Address, sequence, date and time)  Start of text (STX)  Text  End of text (ETX) or text length  Trailer  Block check character (BCC)  Synchronization character (SYN)
  • 37. Synchronous Data Link Protocols - Classification  Character-oriented protocols  Special character for start and end of message  Binary Synchronous Communication Protocol (BSC or BISYNC)  Byte-count-oriented protocols  Special character for start of the header, count field, message, block check character (BCC)  DEC’s Digital Data Communication Message Protocol (DDCMP)  Bit-oriented protocols  Use flag character for start and end of message  IBM’s Synchronous Data Link Control (SDLC)  ISO’s High-Level Data Link control (HDLC)
  • 38. Binary Synchronous Communications  By IBM  For 6-bit transcode (SBT), ASCII, EBCDIC  SYN at start and middle of transmission  Point to point and multipoint (polling)  ARQ approach for error checking (ACK1, ACK0, NAK)  Pros:  Transparency and non-transparency modes  Efficient, understandable, and widely used  Point-to-point & multipoint operations  Cons:  Code dependent  Half-duplex protocol  Cumbersome for transparency mode
  • 39. High Level Data Link Control  HDLC  ISO Standard  Basis for some other DLL protocols
  • 40. 40 High-Level Data Link Control (HDLC)  The OSI’s data link protocol  A bit-oriented protocol  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 (IBM’s SDLC has similar features and the format of HDLC)
  • 41. 41 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)
  • 42. 42 Transparency Problem  The problem of transparency  Because HDLC uses 01111110 to mark the start and end of a packet, the character “01111110” will confuse the receiver.  Solution - Bit Stuffing  Add a 0 after every five 1s at sender side and delete the 0 at receiver side.
  • 43. 43 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
  • 44. High-Level Data Link Control (HDLC)  HDLC was defined by ISO for use on both point-to-point and multipoint data links.  It supports full-duplex communication  Other similar protocols are  Synchronous Data Link Control (SDLC) by IBM  Advanced Data Communication Control Procedure (ADCCP) by ANSI  Link Access Procedure, Balanced (LAP-B) by CCITT, as part of its X.25 packet-switched network standard
  • 45. HDLC Overview Broadly HDLC features are as follows:  Reliable protocol  selective repeat or go-back-N  Full-duplex communication  receive and transmit at the same time  Bit-oriented protocol  use bits to stuff flags occurring in data  Flow control  adjust window size based on receiver capability  Uses physical layer clocking and synchronization to send and receive frames
  • 46. HDLC Overview  Defines three types of stations  Primary  Secondary  Combined  Defines three types of data transfer mode  Normal Response mode  Asynchronous Response mode  Asynchronous Balanced mode  Three types of frames  Unnumbered  information  Supervisory
  • 47. HDLC  The three stations are :  Primary station  Has the responsibility of controlling the operation of data flow the link.  Handles error recovery  Frames issued by the primary station are called commands.  Secondary station,  Operates under the control of the primary station.  Frames issued by a secondary station are called responses.  The primary station maintains a separate logical link with each secondary station.  Combined station,  Acts as both as primary and secondary station.  Does not rely on other for sending data
  • 48. HDLC Primary Commands Responses Unbalanced Mode Secondary Secondary Balanced mode Combined Combined commands/Responses
  • 49. HDLC  The three modes of data transfer operations are  Normal Response Mode (NRM)  Mainly used in terminal-mainframe networks. In this case,  Secondaries (terminals) can only transmit when specifically instructed by the primary station in response to a polling  Unbalanced configuration, good for multi-point links  Asynchronous Response Mode (ARM)  Same as NRM except that the secondaries can initiate transmissions without direct polling from the primary station  Reduces overhead as no frames need to be sent to allow secondary nodes to transmit  Transmission proceeds when channel is detected idle , used mostly in point-to-point-links  Asynchronous Balanced Mode (ABM)  Mainly used in point-to-point links, for communication between combined stations
  • 50. Non-operational Modes  Normal Disconnected Mode  Asynchronous Disconnected Mode Both the above modes mean that the secondary node is logically disconnected from the primary node  Initialization Mode  A node negotiates transmission parameters with the other node E.g., flow control information  Parameters negotiated in this mode are used during any of the data transfer modes
  • 51. Data Link Control HDLC frame structure (a) Frame Format (b) Control field format
  • 52. Data Link Control HDLC frame structure (c) Extended address field (d) Extended control field
  • 53. HDLC  Flag: 01111110- start and ending delimiter. Bits are stuffed for flags in data frames  FCS: 16-bit CRC using generating polynomial G(x) = x16 + x12 + x5 + 1  Address field:  mainly used in multidrop link configuration, and not used in point-to-point  In unbalanced configuration, every secondary is assigned a unique address. Contains address of secondary station in both command and response frames  In balanced mode, command frame has destination address and response frame has sending node’s address  Group addresses are also possible. E.g., One command sent to all the secondaries  In I-frames, N(s) is the sequence number of the frame being sent, and R(s) is the sequence number of the frame being expected.  The P/F bit, known as the poll/final bit, is used with different meaning in different contexts.  It is used to indicate polling, to indicate the final I-frame, etc
  • 54. HDLC  There are three different classes of frames used in HDLC  Unnumbered frames, used in link setup and disconnection, and hence do not contain ACK.  Information frames, which carry actual information. Such frames can piggyback ACK in case of ABM  Supervisory frames, which are used for error and flow control purposes and hence contain send and receive sequence numbers
  • 55. HDLC  There are four different supervisory frames  SS=00, Receiver Ready (RR), and N(R) ACKs all frames received up to and including the one with sequence number N(R) - 1  SS=10, Receiver Not Ready (RNR), and N(R) has the same meaning as above  SS=01, Reject; all frames with sequence number N(R) or higher are rejected, which in turns ACKs frames with sequence number N(R) -1 or lower.  SS=11, Selective Reject; the receive rejects the frame with sequence number N(R)
  • 56. HDLC  The unnumbered frames can be grouped into the following categories:  Mode-setting commands and responses  Recovery commends and responses  Miscellaneous commands and responses
  • 57. Review of Link Layer  Services  Framing  Error control  Reliability  Connection management  Medium access control  Switching  Protocols, Standards  Ethernet  Token Ring  FDDI  Wireless  PPP  HDLC
  • 58. HDLC Station Types  Primary station  Controls operation of link  Frames issued are called commands  Secondary station  Under control of primary station  Frames issued called responses  Combined station  May issue commands and responses
  • 59. HDLC Link Configurations  Unbalanced  One primary and one or more secondary stations  Supports full duplex and half duplex  Balanced  Two combined stations  Supports full duplex and half duplex
  • 60. HDLC Transfer Modes (1)  Normal Response Mode (NRM)  Unbalanced configuration  Primary initiates transfer to secondary  Secondary may only transmit data in response to command from primary  Terminal-host communication  Host computer as primary  Terminals as secondary  not so common nowadays
  • 61. HDLC Transfer Modes (2)  Asynchronous Balanced Mode (ABM)  Balanced configuration  Either station may initiate transmission without receiving permission  Most widely used
  • 62. Frame Structure  All transmissions in frames  Single frame format for all data and control exchanges
  • 64. Flag Fields  Delimit frame at both ends  01111110  Receiver hunts for flag sequence to synchronize  Bit stuffing used to avoid confusion with data containing 01111110  0 inserted after every sequence of five 1s  If receiver detects five 1s it checks next bit  If 0, it is deleted  If 1 and seventh bit is 0, accept as flag
  • 66. Address Field  Identifies secondary station that sent or will receive frame  Usually 8 bits long  May be extended to multiples of 7 bits with prior agreement  leftmost bit of each octet indicates that it is the last octet (1) or not (0)
  • 67. Frame Types  Information - data to be transmitted to user  Acknowledgment is piggybacked on information frames  Supervisory – ARQ messages (RR/RNR/REJ/SREJ) when piggyback not used  Unnumbered – supplementary link control functions. For examples,  setting the modes
  • 69. Poll/Final Bit  Use depends on context. A typical use is below.  Command frame  P bit set to 1 to solicit (poll) supervisory frame from peer  Response frame  F bit set to 1 to indicate response to soliciting command
  • 70. Information Field  Only in information and some unnumbered frames  Must contain integral number of octets  Variable length
  • 71. Frame Check Sequence Field  FCS  Error detection  16 bit CRC  Optional 32 bit CRC
  • 72. HDLC Operation  Exchange of information, supervisory and unnumbered frames  Three phases  Initialization  Data transfer  Disconnect
  • 73. Initialization  Issue one of six set-mode commands  Signals other side that initialization is requested  Specifies mode (NRM, ABM, ARM)  Specifies 3- or 7-bit sequence numbers  If request accepted HDLC module on other side transmits unnumbered acknowledged (UA) frame  If request rejected, disconnected mode (DM) sent
  • 74. Data Transfer  Both sides may begin to send user data in I-frames  N(S): sequence number of outgoing I-frames  modulo 8 or 128, (3- or 7-bit)  N(R) acknowledgment for I-frames received  seq. number of I-frame expected next  S-frames are also used for flow and error control  Receive ready (RR) frame acknowledges last I-frame received  Indicating next I-frame expected  Used when there is no reverse data  Receive not ready (RNR) acknowledges, but also asks peer to suspend transmission of I-frames  When ready, send RR to restart  REJ initiates go-back-N ARQ  Indicates last I-frame received has been rejected  Retransmission is requested beginning with N(R)  Selective reject (SREJ) requests retransmission of single frame
  • 75. Disconnect  Send disconnect (DISC) frame  Remote entity must accept by replying with UA  Informs layer 3 user about the termination of connection
  • 76. Other DLC Protocols (LAPB,LAPD)  Link Access Procedure, Balanced (LAPB)  Part of X.25 (ITU-T)  Subset of HDLC - ABM (Async. Balanced Mode)  Point to point link between user and packet switching network node  HDLC frame format  Link Access Procedure, D-Channel (LAPD)  Part of ISDN (ITU-T)  ABM  Always 7-bit sequence numbers (no 3-bit)  always 16-bit CRC
  • 77. Other DLC Protocols (LLC)  Logical Link Control (LLC)  IEEE 802  For LANs (Local Area Networks)  Link control split between medium access control layer (MAC) and LLC (on top of MAC)  Different frame format  Two addresses needed (sender and receiver) – actually at MAC layer  Sender and receiver SAP addresses  Control field is same as HDLC (16-bit version for I and S frames; 8- bit for U frames)  No primary and secondary - all stations are peers  Error detection at MAC layer  32 bit CRC
  • 78. Other DLC Protocols (LLC)  LLC Services  3 alternatives  Connection Mode Services  Similar to HDLC ABM  Unacknowledged connectionless services  no connection setup  No flow-control, no error control, no acks (thus not reliable)  good to be used with TCP/IP. Why?  Acknowledged Connectionless Service  No connection setup  reliable communication
  • 79. High-level Data Link Control (HDLC) - I  Operating modes  Normal response mode (NRM) for a primary node and one or more secondary modes on a circuit (polling)  Asynchronous balanced mode (ABM) for nodes with peers (most used for efficiency with no polling in full duplex)  Asynchronous response mode (ARM) for primary and secondary nodes with same transmission right (rarely used)  Frames  Supervisory or S format: control acknowledge  Unnumbered or U format: (operation mode, start, termination)  Information or I format: (data)
  • 80. High-level Data Link Control (HDLC) - I  Flag  01111110  Bit stuffing 0 after five 1s by hardware  For synchronization  Other fields  Address field  Control field: type of frame, sequence number for information frames  Information field: multiple of 8 bits  Frame check sequence (FCS) field: error checking  Frame flow  Initialization phase, data transfer phase, and disconnect phase
  • 81. Other Data Link Control Protocols  Link access procedure, balanced (LAPB)  Full-duplex, point-to-point mode  For X.25 DTE and packet switching network  Link access procedure, D-channel (LAPD)  ISDN network  Link access procedure for frame –mode bearer service (LAPF)  High-speed packet switching network on low error rate digital circuits  Asynchronous transfer mode  Data transfer on high s-speed, digital, error free network
  • 82. High Level Data Link Control  One of the more popular data link control protocols  Similar to IBM’s SDLC but more flexible  Many data link protocols are based on HDLC – thus if you learn HDLC, you will understand many others, such as all the LAP standards 11.82
  • 83. HDLC Station Types  Primary station 11.83  Controls operation of link  Frames issued are called commands  Maintains separate logical link to each secondary station  Secondary station  Under control of primary station  Frames issued called responses  Combined station  May issue commands and responses
  • 84. HDLC Link Configurations  Unbalanced 11.84  One primary and one or more secondary stations  Supports full duplex and half duplex  Balanced  Two combined stations  Supports full duplex and half duplex
  • 85. HDLC Transfer Modes (1)  Normal Response Mode (NRM) 11.85  Unbalanced configuration  Primary initiates transfer to secondary  Secondary may only transmit data in response to command from primary  Used on multi-drop lines  Host computer as primary  Terminals as secondary
  • 86. HDLC Transfer Modes (2)  Asynchronous Balanced Mode (ABM) 11.86  Balanced configuration  Either station may initiate transmission without receiving permission  Most widely used  No polling overhead
  • 87. HDLC Transfer Modes (3)  Asynchronous Response Mode (ARM) 11.87  Unbalanced configuration  Secondary may initiate transmission without permission from primary  Primary responsible for line  Rarely used
  • 88. Frame Structure  Synchronous transmission  All transmissions in frames  Single frame format for all data and control exchanges 11.88
  • 91. Address Field  Identifies secondary station that sent or will receive frame  Usually 8 bits long  May be extended to multiples of 7 bits  LSB of each octet indicates that it is the last octet (1) or not (0)  All ones (11111111) is broadcast 11.91
  • 92. Control Field  Different for different frame type 11.92  Information - data to be transmitted to user (next layer up)  Flow and error control piggybacked on information frames  Supervisory - ARQ when piggyback not used  Unnumbered - supplementary link control  First one or two bits of control field identify frame type
  • 94. Poll/Final Bit  Use depends on context  Command frame 11.94  P bit  1 to solicit (poll) response from peer  Response frame  F bit  1 indicates response to soliciting command
  • 95. Information Field  Only in information and some unnumbered frames  Must contain integral number of octets  Variable length 11.95
  • 96. Frame Check Sequence Field  FCS  Error detection  16 bit CRC  Optional 32 bit CRC 11.96
  • 97. HDLC Operation  Exchange of information, supervisory and unnumbered frames  Three phases 11.97  Initialization  Data transfer  Disconnect
  • 98. HDLC Bit-Oriented Frame Format Information Frame Supervisory Frame Unnumbered Frame Frame Sequence # Poll/Final Next Frame Expected