Semester 1 2008-2009Copyright USM EEE442 Computer Networks The Data Link / Network Layer Functions: Flow Control and Error Control En. Mohd Nazri Mahmud.

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.
Telecommunication Technologies
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
EIE325: Telecommunication TechnologiesMaciej J. Ogorza ł ek, PolyU, EIE Telecommunication Technologies Week 8 Flow Control Error 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.
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.
Chapter 7 – Data Link Control Protocols
Computer Networks The Data Link Layer Part 3: Error Control
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.
1 Data Link Layer Lesson 6 NETS2150/ Position of the data-link layer McGraw-Hill © The McGraw-Hill Companies, Inc., 2004.
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.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
Data Communications Data Link Control. What Is Data Link Control? The Data Link layer of a model typically has the following responsibilities: 1. Creates.
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.
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.
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 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
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Data and Computer Communications Data Link Control Protocols.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
Chapter 9: Data Link Control Business Data Communications, 4e.
Data and Computer Communications Data Link Control Protocols.
William Stallings Data and Computer Communications Chapter 7 Data Link Control.
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 ...
Chapter 9: Data Link Control
William Stallings Data and Computer Communications 7th Edition
The Data Link Layer Supplementery Slides
Data Link Layer Flow Control.
Data and Computer Communications
Chap. 4 Data link layer 2.
CIS 321 Data Communications & Networking
Chapter 14: Data Link Control
Chapter 14: Data Link Control
Chapter 14: Data Link Control
Chapter 14: Data Link Control
Data and Computer Communications
Data and Computer Communications
EEC4113 Data Communication & Multimedia System Chapter 4: Flow Control by Muhazam Mustapha, August 2010.
William Stallings Data and Computer Communications
Chapter 9: Data Link Control
Protocols and the TCP/IP Suite ECE405- Computer Networks
Presentation transcript:

Semester Copyright USM EEE442 Computer Networks The Data Link / Network Layer Functions: Flow Control and Error Control En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14

Semester Copyright USM OSI v TCP/IP

Semester Copyright USM Data Link Control Protocols need layer of logic above Physical to manage exchange of data over a link –frame synchronization –flow control –error control –addressing –control and data –link management

Semester Copyright USM Flow Control ensure sending entity does not overwhelm receiving entity –by preventing buffer overflow influenced by: –transmission time time taken to emit all bits into medium –propagation time time for a bit to traverse the link packets have varying delays

Semester Copyright USM Model of Frame Transmission

Semester Copyright USM Stop and Wait source transmits frame destination receives frame and replies with acknowledgement (ACK) source waits for ACK before sending next destination can stop flow by not send ACK works well for a few large frames Stop and wait becomes inadequate if large block of data is split into small frames

Semester Copyright USM Stop and Wait Link Utilization

Semester Copyright USM Sliding Windows Flow Control allows multiple numbered frames to be in transit receiver has buffer W long transmitter sends up to W frames without ACK ACK includes number of next frame expected sequence number is bounded by size of field (k) –frames are numbered modulo 2 k –giving max window size of up to 2 k - 1 receiver can ack frames without permitting further transmission (Receive Not Ready) must send a normal acknowledge to resume if have full-duplex link, can piggyback ACks

Semester Copyright USM Sliding Window Diagram

Semester Copyright USM Sliding Window Example

Semester Copyright USM Error Control & Detection detection and correction of errors such as: –lost frames –damaged frames common techniques use: –error detection –positive acknowledgment –retransmission after timeout –negative acknowledgement & retransmission

Semester Copyright USM Error detection Parity Check CRC

Semester Copyright USM Error detection Parity Check –The simplest error detection scheme –Appends a parity bit to the end of a block of data –The value of this bit is selected so that the character has an even number of 1s (even parity) or an odd number of 1s (odd parity) –Example – transmission of a 7-bit IRA character G ( ) using odd parity will append a 1 and transmit –The receiver examines the received character and of the number of 1s is odd it assumes no error.

Semester Copyright USM Error detection Cyclic Redundancy Check –Given a k-bit block of nits, or message, the transmitter generates an n-bit sequence known as a frame check sequence (FCS) so that the resulting frame consisting of k+n bits is exactly divisible by some predetermined number –The receiver then divides the incoming frame by that number and if there is no remainder assumes there was no error

Semester Copyright USM Error detection Cyclic Redundancy Check –Let T = (k+n)-bit frame to be transmitted, with n<k M= k-bit message, the first k bits of T F- n-bit FCS, the last n bits of T P = pattern of n+1 bits, the predetermined divisor Example –M = (10 bits) –Pattern P = (6 bits) –FCS R = to be calculated(5 bits)

Semester Copyright USM Error detection Cyclic Redundancy Check Example –M = (10 bits) –Pattern P = (6 bits) –FCS R = to be calculated(5 bits ie n=5) –Operations are carried out in modulo-2 arithmetic –The message is multiplied by 2 n ie=(2 5 ) giving –The product is divided by P giving remainder or –The remainder is added to 2 n M to give T = –At the receiver the received frame is divided by P, if there is no remainder, it assumes no error. –The pattern P is chosen to be one bit longer than the desired FCS and the exact bit pattern chosen depends on the types of errors expected

Semester Copyright USM Error detection Cyclic Redundancy Check –Polynomial treatment of the CRC Express all values as polynomials in a dummy variable X with binary coefficients The coefficients correspond to the bits in the binary number For example for a message M = in polynomial form is X 9 + X 7 + X 3 + X and pattern P= as X 5 + X 4 +X Modulo-2 arithmetic is used again

Semester Copyright USM Error detection Cyclic Redundancy Check –4 versions of pattern, P are widely used –CRC-12 system is used for transmission of streams of 6-bit characters and generates a 12-bit FCS –Both CRC-16 and CRC-CCITT are popular for 8-bit characters with 16-bit FCS.

Semester Copyright USM Error detection Cyclic Redundancy Check –Digital Logic Implementation The CRC process can be implemented as individual circuit consisting of EX-OR gates and a shift register

Semester Copyright USM Error detection Cyclic Redundancy Check –Digital Logic Implementation The register contains n bits (equal to the length of the FCS) There are up to n EX-OR gates The presence or absence of a gate corresponds to the presence or absence of a term in the divisor polynomial, P(X) excluding the X n term

Semester Copyright USM Error detection Cyclic Redundancy Check –Digital Logic Implementation The process begins with the shift register cleared (all zeros) The message is then entered one bit at a time starting with the most significant bit After the last bit is processed the shift register contains the remainder (FCS) At the receiver, the same logic is used As each bit of M arrives, it is inserted into the shift register. If there have been no errors, the shift register should contain the bit pattern for R at the conclusion of M

Semester Copyright USM Error detection Cyclic Redundancy Check –Digital Logic Implementation At the receiver, the same logic is used As each bit of M arrives, it is inserted into the shift register. If there have been no errors, the shift register should contain the bit pattern for R at the conclusion of M The transmitted bits of R now begin to arrive and the effect is to zero out the register so that at the conclusion of reception, the register contains all 0s

Semester Copyright USM Error detection Cyclic Redundancy Check –Digital Logic Implementation For example for message M = and divisor P =

Semester Copyright USM Error detection

Semester Copyright USM Error Control : Automatic Repeat Request (ARQ) collective name for such error control mechanisms, including: –stop and wait –go back N –selective reject (selective retransmission)

Semester Copyright USM Stop and Wait source transmits single frame wait for ACK if received frame damaged, discard it –transmitter has timeout –if no ACK within timeout, retransmit if ACK damaged,transmitter will not recognize it –transmitter will retransmit –receive gets two copies of frame –use alternate numbering and ACK0 / ACK1

Semester Copyright USM Stop and Wait see example with both types of errors pros and cons –simple –inefficient

Semester Copyright USM Go Back N based on sliding window if no error, ACK as usual use window to control number of outstanding frames if error, reply with rejection –discard that frame and all future frames until error frame received correctly –transmitter must go back and retransmit that frame and all subsequent frames

Semester Copyright USM Go Back N - Handling Damaged Frame –error in frame i so receiver rejects frame i –transmitter retransmits frames from i Lost Frame –frame i lost and either transmitter sends i+1 and receiver gets frame i+1 out of seq and rejects frame i or transmitter times out and send ACK with P bit set which receiver responds to with ACK i –transmitter then retransmits frames from i

Semester Copyright USM Go Back N - Handling Damaged Acknowledgement –receiver gets frame i, sends ack (i+1) which is lost –acks are cumulative, so next ack (i+n) may arrive before transmitter times out on frame i –if transmitter times out, it sends ack with P bit set –can be repeated a number of times before a reset procedure is initiated Damaged Rejection –reject for damaged frame is lost –handled as for lost frame when transmitter times out

Semester Copyright USM Selective Reject also called selective retransmission only rejected frames are retransmitted subsequent frames are accepted by the receiver and buffered minimizes retransmission receiver must maintain large enough buffer more complex logic in transmitter hence less widely used useful for satellite links with long propagation delays

Semester Copyright USM Go Back N vs Selective Reject

Semester Copyright USM Data Link Control Protocol: High Level Data Link Control (HDLC) an important data link control protocol specified as ISO 33009, ISO 4335 station types: –Primary - controls operation of link –Secondary - under control of primary station –Combined - issues commands and responses link configurations –Unbalanced - 1 primary, multiple secondary –Balanced - 2 combined stations

Semester Copyright USM HDLC Transfer Modes Normal Response Mode (NRM) –unbalanced config, primary initiates transfer –used on multi-drop lines, eg host + terminals Asynchronous Balanced Mode (ABM) –balanced config, either station initiates transmission, has no polling overhead, widely used Asynchronous Response Mode (ARM) –unbalanced config, secondary may initiate transmit without permission from primary, rarely used

Semester Copyright USM HDLC Frame Structure synchronous transmission of frames single frame format used

Semester Copyright USM Flag Fields and Bit Stuffing delimit frame at both ends with seq receiver hunts for flag sequence to synchronize bit stuffing used to avoid confusion with data containing flag seq –0 inserted after every sequence of five 1s –if receiver detects five 1s it checks next bit –if next bit is 0, it is deleted (was stuffed bit) –if next bit is 1 and seventh bit is 0, accept as flag –if sixth and seventh bits 1, sender is indicating abort

Semester Copyright USM Address Field identifies secondary station that sent or will receive frame usually 8 bits long may be extended to multiples of 7 bits –LSB indicates if is the last octet (1) or not (0) all ones address is broadcast

Semester Copyright USM Control Field different for different frame type –Information - data 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 1-2 bits of control field identify frame type

Semester Copyright USM Control Field use of Poll/Final bit depends on context in command frame is P bit set to1 to solicit (poll) response from peer in response frame is F bit set to 1 to indicate response to soliciting command seq number usually 3 bits –can extend to 8 bits as shown below

Semester Copyright USM Information & FCS Fields Information Field –in information and some unnumbered frames –must contain integral number of octets –variable length Frame Check Sequence Field (FCS) –used for error detection –either 16 bit CRC or 32 bit CRC

Semester Copyright USM HDLC Operation consists of exchange of information, supervisory and unnumbered frames have three phases –initialization by either side, set mode & seq –data transfer with flow and error control using both I & S-frames (RR, RNR, REJ, SREJ) –disconnect when ready or fault noted

Semester Copyright USM HDLC Operation Example

Semester Copyright USM HDLC Operation Example