1 Prof. Sang-Jo Yoo 7. Data Link Control. Prof. Sang-Jo Yoo 2 Data Link Layer Functions  Frame Synchronization  Flow Control  Control rate of transmission.

Slides:



Advertisements
Similar presentations
William Stallings Data and Computer Communications 7th Edition
Advertisements

CH. 7 Data Link Control. Requirements & Objectives of Data Link Control Frame Synchronization Flow Control Error Control Addressing Control and Data on.
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Data Link Protocols(HDLC & PPP). Data Link Protocols The set of specifications used to implement the DLL. DLL Protocols Synchronous Protocols Character-oriented.
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.
Chapter 14: Data Link Control
William Stallings Data and Computer Communications 7th Edition
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 7 – Data Link Control Protocols.
Data and Computer Communications Updated: 2/9/2009.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Data Link Control Slide 1 Data Link Control Chapter 7.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 7 – Data Link Control Protocols.
Piggybacking A method to combine a data frame with ACK. Station A and B both have data to send. Instead of sending separately, station A sends a data frame.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
Data Link Control Protocols Data link control protocol Provides a layer of control between systems on a transmission medium referred to as data link. DLC.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
Chapter 9: Data Link Control Business Data Communications, 4e.
Semester EEE449 Computer Networks The Data Link Layer En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room.
Semester Copyright USM EEE442 Computer Networks The Data Link / Network Layer Functions: Flow Control and Error Control En. Mohd Nazri Mahmud.
Data Communications Data Link Control. What Is Data Link Control? The Data Link layer of a model typically has the following responsibilities: 1. Creates.
Example Data Link Protocols Quick review Reference Models? Layers? Flow Control? Bit stuffing? Connection Oriented? Synchronous transmission?
HDLC and PPP. The Data Link Layer in the Internet A home personal computer acting as an internet host. Technology like Ethernet cannot provide “high-level”
MODULE I NETWORKING CONCEPTS.
Network Technology CSE Network Technology CSE3020 Week 6.
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols.
Data Link Control Protocols
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
William Stallings Data and Computer Communications 7th Edition
Data and Computer Communications Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data and Computer Communications, Ninth Edition.
Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Control and Protocols.
-1- 網路概論 Class 4 – Data Link Control Part II 授課老師 楊人順 2001/10/16-17.
1 Kyung Hee University Data Link Protocols. 2 Kyung Hee University 11 장 Data Link Control and Protocols 11.1 Flow and Error Control 11.2 Stop-and-Wait.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
Chapter 11 Data Link Protocols A data link protocol is a set of specifications used to implement the data link layer [A protocol is the set of rules or.
Chapter 11 Data Link Control
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols need layer of logic above Physical to manage exchange.
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
DATA LINK CONTROL PROTOCOLS. 2 Introduction Data link control layer – often abbreviated simply to data link layer – is concerned with the transfer of.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
FIT – Monash University High-Level Data Link Control
Telecommunications & Networking Lesson 3. ISO Open System Interconnect (OSI) Application Presentation Session Transport Network Data Link Physical Application.
Chapter 11 Data Link Control and Protocols Flow and Error Control Flow Control Error Control.
Data and Computer Communications Data Link Control Protocols.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 9: Data Link Control Business Data Communications, 4e.
Data and Computer Communications Data Link Control Protocols.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols 1.
Data Communications Data Link Layer.
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
Coding and Error Control
2.10 Flow and Error Control Before that ...
High level Data Link Layer Protocol - HDLC
HDLC and PPP.
Chapter 9: Data Link Control
William Stallings Data and Computer Communications 7th Edition
The Data Link Layer Supplementery Slides
Chapter 11 Data Link Control and Protocols
Chap. 4 Data link layer 2.
Chapter 14: Data Link Control
William Stallings Data and Computer Communications
Chapter 9: Data Link Control
Protocols and the TCP/IP Suite ECE405- Computer Networks
Presentation transcript:

1 Prof. Sang-Jo Yoo 7. Data Link Control

Prof. Sang-Jo Yoo 2 Data Link Layer Functions  Frame Synchronization  Flow Control  Control rate of transmission to prevent over-run  Error Control  Correct transmission errors ( by retransmission )  Addressing  When many nodes share transmission link  Link Management  Initiation, maintenance, and termination of connections

Prof. Sang-Jo Yoo 3 Flow Control  Definition  Technique for controlling data rate so that sender does not over-run receiver  Method  Stop-and-Wait  Sliding-Window

Prof. Sang-Jo Yoo 4 Flow Control Stop-and-Wait  “Stop-and-Wait” flow control  Sender sends a frame  Receiver receives frame & acknowledge it  Sender waits to receive “ack” before sending next frame.(If receiver is not ready to receive another frame it holds back the ack)  Efficient for large blocks  Many small bocks are used, because  Receiver buffer limits  Error control  Fair sharing of medium.

Prof. Sang-Jo Yoo 5 Flow Control Stop-and-Wait The effect of a utilization 1<a1>a

Prof. Sang-Jo Yoo 6 Flow Control Sliding-Window  “Sliding-Widow” flow control  Pipeline transmission of successive frames  Transmit up to “N” frames if necessary without receiving acks  Wait for acks when “N” unacked frames in transit  Acknowledge multiple frames  For duplex transmission each station needs a sending widow & receiving widow

Prof. Sang-Jo Yoo 7 Flow Control Sliding-Window

Prof. Sang-Jo Yoo 8 Flow Control Sliding-Window Examples of a sliding-window protocol

Prof. Sang-Jo Yoo 9 Error Detection  Basic principle  Transmitter : For a given bit stream M, additional bits( called error-detecting code ) are calculated as a function of M and appended to the end of M  Receiver : For each incoming frame, perform the same calculation and compares the two results. A detected error occurs iff there is a mismatch

Prof. Sang-Jo Yoo 10 Error Detection  Two common techniques  Parity checks  Cyclic redundancy checks ( CRC )  Parity check  One extra “parity” bit is added to each word  Odd parity : bit added so as to make # of 1 odd  Even parity : bit added so as to make # of 1 even   Can detect 1 bit inversion.  Single parity is very effective with white noise, but not very robust with noise bursts

Prof. Sang-Jo Yoo 11 Error Detection  Cyclic redundancy checks  Powerful error detection method, easily implemented  Message(M) to be transmitted is appended with extra frame checksum bits(F), so that bit pattern transmitted(T) is perfectly divisible by a special “generator” pattern(P)  As destination, divide received message by the same P. If remainder is nonzero then error is occurred  Let  T = (k+n) bit frame to be transmitted, n<k  M = k bit message, the first k bits of T  F = n bit FCS, the last n bits of T  P = n+1 bits, generator pattern ( predetermined divisor )  Use modulo-2 arithmetic : no carries/borrows, add=subtract=xor

Prof. Sang-Jo Yoo 12 Error Detection  Method  Extend M with n ‘0’s to the right ( =2 n M )  Divide extended message by P to get R ( 2 n M/P = Q+R/P )  Add R to extended message to form T ( T= 2 n M+R )  Transmit T  At receiver, divide T by P. If non-zero remainder, then error

Prof. Sang-Jo Yoo 13 Error Detection  Example  M=110011, P=11001, R=4bits  Append 4 zeros to M, we get  Divide /11001  Append remainder  T=

Prof. Sang-Jo Yoo 14 Error Detection  We can view CRC generation in terms of polynomial arithmetic  Any bit pattern = polynomial in dummy variable X  e.g. M= M(X)=X 5 +X 4 +X+1  CRC generation in terms of polynomial  Append n ‘0’s :  Modulo 2 division :  Transmit :  At receiver :  Commonly used polynomials, P(X)  CRC-16 :  CRC-CCITT :  CRC-32 :

Prof. Sang-Jo Yoo 15 Error Detection  Following errors can be detectable:  All single-bit errors  All double-bit errors, as long as P(X) has at least three 1s.  Any odd number of errors, as long as P(X) contains a factor (X+1)  Any burst errors for which the length of the burst is less than the length of the FCS  Most larger burst errors.

Prof. Sang-Jo Yoo 16 Error Detection  Implementation  Implemented by a circuit consisting of exclusive-or gates and a shift register  The shift register contain n bits ( length of FCS )  There are up to n exclusive-or gates  The presence or absence of a gate corresponds to the presence or absence of a term in P(X)

Prof. Sang-Jo Yoo 17 Error Detection Circuits with shift registers for dividing by the polynomial X 5 +X 4 + X 2 +1

Prof. Sang-Jo Yoo 18 Error Control  Error control techniques  Forward error control  Forward error correction ( FEC )  Error recovery by correction at the receiver  Backward error control  Automatic repeat request ( ARQ )  Error recovery by retransmission  Error  Lost frame  Damaged frame

Prof. Sang-Jo Yoo 19 Error Control  Bases of ARQ  Error detection  Positive ACK  Retransmission after timeout  Negative ACK. and retransmission

Prof. Sang-Jo Yoo 20 Error Control  Class of ARQ  Stop-and-Wait ARQ  Continuous ARQ (sliding window flow control)  Go-Back-N ARQ  Selective-reject ARQ  Stop-and-Wait ARQ  Sender transmits message frame  Receiver checks received frame for errors ; sends ACK/NAK  Sender wait for ACK/NAK  NAK : Retransmission  ACK : Next Frame  Simple and minimum buffer requirement, but inefficient

Prof. Sang-Jo Yoo 21 Error Control  Frame/ACK could be lost : Uses a timeout mechanism  Possibility of duplication : Number of frames  Only need a 1-bit frame number alternating 1 and 0

Prof. Sang-Jo Yoo 22 Error Control  Go-back-N ARQ  If the receiver detects an error on a frame, it sends a NAK for that frame.  The receiver will discard all future frames until the frame in error is correctly received  The sender, when it receives a NAK or timeout, must retransmit the frame in error plus all succeeding frames.  Sender must maintain a copy of each unacknowledged frame

Prof. Sang-Jo Yoo 23 Error Control

Prof. Sang-Jo Yoo 24 Error Control  Selective-Reject ARQ  The only frames retransmitted are those that receive a NAK or which timeout  Can save retransmission, but requires more buffer space and complicated logic  Maximum window size ( with n-bit sequence number )  Go-back-N : 2 n -1  Selective-reject : 2 n-1

Prof. Sang-Jo Yoo 25 Error Control  Why 2 n -1 instead of in 2 n Go-back-N ? SR ACK1 Question: Did all eight frames arrive successfully, or did all eight frames get lost (or errors)? In both cases the receiver would send ACK1.

Prof. Sang-Jo Yoo 26 Error Control  Why 2 n-1 instead of 2 n -1 in selective-reject? SR 0 1 ACK1   6  0 ACK2 ACK7 Retransmission frame 0 At this point receiver has already advanced its window to accept frames 7, 0, 1, 2, 3, 4, 5. Thus it assumes that frame 7 has been lost and that this is a new frame 0, so it accepts.  There should be no overlap between the sender and receiver windows.  Max window size  2 n /

27 Prof. Sang-Jo Yoo HDLC and Other Data Link Layer Protocols

Prof. Sang-Jo Yoo 28 Contents  Review - Data Link Layer Functions  HDLC (High-level Data Link Control)  Basic Characteristics  Frame Structures  Operations  Other Data Link Layer Protocols  LAPB  LAPD  LLC  Frame Relay  ATM

Prof. Sang-Jo Yoo 29 Review - Data Link Layer Functions(1)  Protocol View  Link layer protocol must provide the following functions to the upper layer. (1) Initial setup of the link (2) ordered exchange of data blocks (3) orderly release of the link Calling stationCalled station User Software User Software Link Layer Link Layer CONNECT.request CONNECT.confirm CONNECT.indication DATA.request DATA.indication DATA.request DISCONNECT.indication DISCONNECT.request DISCONNECT.confirm (1) (2) (3)

Prof. Sang-Jo Yoo 30 Review - Data Link Layer Functions(2)  Functional View  Frame Synchronization  Flow Control  Stop-and-Wait  Sliding-Window  Error Control  Forward error control Forward Error Correction (FEC) : error correction at the receiver  Backward error control Automatic Repeat Request (ARQ) :error recovery by retransmission  Addressing  Link Management

Prof. Sang-Jo Yoo 31 HDLC - Basic Characteristics (1)  HDLC : High-Level Data Link Control  data link protocol  Widely used, and basis for many other data link control protocols  Connections can be point-to-multipoint or point-to-point  Can be used in half-duplex or full-duplex  Three types of stations  Primary station - (Mainframe) Controls the operation of the link  Secondary station - (Terminal) Respond to a primary station  Combined station - Can be both a primary and a secondary  Commands and Responses  commands : the frames sent by primary to secondary  responses : the frames sent by secondary to primary

Prof. Sang-Jo Yoo 32 HDLC - Basic Characteristics (2)  Two link configurations  Unbalanced configuration - One primary and one or more secondary stations  Balanced configurations - Two combined stations  Three data transfer modes  Normal Response Mode (NRM)  Unbalanced config. Primary station always dictates who sends and receives  used on multidrop lines (computer polls each terminal for input)  Asynchronous Balanced Mode (ABM)  Either of the two combined stations may initiate transmission  efficient use of point-to-point link without polling overhead  Asynchronous Response Mode (ARM)  Unbalanced config. Secondary station can send at any given time, but only one secondary can be active at a time

Prof. Sang-Jo Yoo 33 HDLC - Frame Structure (1)  Frame format  Synchronous or Asynchronous transmission?

Prof. Sang-Jo Yoo 34 HDLC - Frame Structure (1)  Flag field  8 bits ( ), for frame sync.  “Bit stuffing” is used for data transparency : whenever five 1’s are transmitted, extra zero is inserted  frame split or merge by a 1-bit error

Prof. Sang-Jo Yoo 35 HDLC - Frame Structure (2)  Address field  8 bits. If needed longer address, the LSB can be set to zero and the address field is then assumed to be 8 bits longer.  Not needed for point-to-point links but included for uniformity  All 1’s indicates a broadcast frame

Prof. Sang-Jo Yoo 36 HDLC - Frame Structure (3)  Control field  8 bits. If the 1st bit is 0, then “information frame”, Otherwise, 10 indicates “supervisory frame” and 11 indicates “unnumbered frame”.

Prof. Sang-Jo Yoo 37 HDLC - Frame Structure (4)  P/F  Poll/Final  In command frames: P bit  If P=1, to solicit a response frame from the peer HDLC entity.  In response frames: F bit  If F=1, to indicate the response frame transmitted as a result of a soliciting command.

Prof. Sang-Jo Yoo 38 HDLC - Frame Structure (5)  Control field (Cont’d)  Information frame  two 3 bits sequence numbers, P/F bit  sequence number can be extended to 7  used to send data  Supervisory frame: bits 3 and 4 determine types  00: “Receive Ready”. Used to ACK  01: “Reject”. Essentially a NACK in Go-back-N  10: “Receive Not Ready”. Indicates busy condition  11: “Selective Reject”. Request for a single frame retransmission  Bit 5 is P/F. Bits 6,7,8 are sequence number  Unnumbered frame:  More control functions. Has a variety of purposes, but most often used for establishing the link setup and disconnect.  Sets up the data transfer mode, sequence number size. Also used to reset the link and other miscellaneous stuff.

Prof. Sang-Jo Yoo 39 HDLC - Frame Structure (6)  Information Field  must consist of an integral number of octets  up to some system-defined maximum  Frame Check Sequence(FCS) Field  For the remaining bits of the frame, exclusive of flags  normal : 16-bit CRC CCITT  optional : CRC-32, if the frame length or the line reliability dictates this choice

Prof. Sang-Jo Yoo 40 HDLC - Operation (1)  Three-Phases  Initialization  Link setup command and ack response  Set mode by U-frames such as SABM/E, SNRM/E, SARM/E  Ack by UA  Data Transfer  Data transfer by I-frame  Flow and error control by I and S-frames  Disconnect  Link release by DISC command and UA response

Prof. Sang-Jo Yoo 41 HDLC - Operation (2)  Commands and Responses Name C/R Description I (Information) C/R Exchange user data S (Supervisory) C/R RR(Receive Ready) Positive ack; ready to receive I-frame RNR(Receive Not Ready) Positive ack; not ready to receive REJ(Reject) Negative ack; go back N SREJ(Selective Reject) Negative ack; selective reject

Prof. Sang-Jo Yoo 42 Name C/R Description U (Unnumbered) SNRM/SNRME C Set mode SARM/SARME C Set mode SABM/SABME C Set mode SIM(Set Initialization Mode) C Initialize link control functions in addressed station DISC(Disconnect) C Terminate logical link connection UA(Unnumbered Ack) R Ack for the set mode commands DM(Disconnected Mode) C Terminate logical link connection RD(Request Disconnect) R Request for DISC command RIM(Request Initialization Mode) R Request for SIM command UI(Unnumbered Information) C/R Used to exchange control information UP(Unnumbered Poll) C Used to solicit control information RSET(Reset) CUsed for recovery; resets N(R), N(S) XID(Exchange Identification) C/R Used to request/report status TEST C/R Exchange identical information fields for testing FRMR(Frame Reject) R Reports receipt of unacceptable frame

Prof. Sang-Jo Yoo 43 HDLC - Operation (3)  Examples of operation

Prof. Sang-Jo Yoo 44 HDLC - Operation (4)

Prof. Sang-Jo Yoo 45 Other Data Link Control Protocols (1)  LAPB (Link Access Procedure, Balanced)  by ITU-T as part of X.25 packet-switching network-interface standard  subset of HDLC that provides only ABM  LAPD (Link Access Procedure, D-Channel)  by ITU-T as part of set of recommendations on ISDN  D-channel : logical channel at the user-ISDN interface  restricted to ABM  7-bit sequence number, 16-bit CRC, 16-bit address field

Prof. Sang-Jo Yoo 46 Other Data Link Control Protocols (2)  LLC (Logical Link Control)  a part of the IEEE 802 family of standards of controlling operation over a LAN.  Link control functions are divided between to layers:  MAC(medium access control) layer  LLC(logical link control) layer  Frame Relay  provide a streamlined capability for use over high-speed packet-switched networks; based on HDLC  ATM (Asynchronous Transfer Mode)  new frame format called cell