Chapter 3 The Data Link Layer.

Slides:



Advertisements
Similar presentations
Chapter 3 The Data Link Layer.
Advertisements

The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Chapter 3 The Data Link Layer.
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.
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 Updated: 2/9/2009.
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
Chapter 7 – Data Link Control Protocols
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.
The Data Link Layer Chapter 3. Position of the data-link layer.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
The OSI Reference Model
Circuit Switching (a) Circuit switching. (b) Packet switching.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
CSC 450/550 Part 2: The Data Link Layer. CSC 450/550 Summary Part A Functions (1)Functions of the data link layer (2)Framing (3)Error control (3.1) Error.
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
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
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Chapter 3 THE DATA LINK LAYER
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
THE DATA LINK LAYER Chapter 3 1. H YBRID M ODEL The hybrid reference model to be used in this book. 2.
The data link layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
The Data Link Layer. Functions of the Data Link Layer Provide service interface to the network layer Dealing with transmission errors Error detection.
The Data Link Layer. Functions of the Data Link Layer Provide service interface to the network layer Frame delineation Dealing with transmission errors.
The Data Link Layer Chapter 3 10/28/2015www.noteshit.com1.
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.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
The Data Link Layer Chapter 3 1/21/2016www.ishuchita.com1.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Data Link Layer Chapter 3.
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.
Computer Networks NYUS FCSIT Spring 2008 Igor TRAJKOVSKI, Ph.D. Associate Professor
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
The Data Link Layer RIS 251 Dr. ir. S.S. Msanjila.
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
MODULE I NETWORKING CONCEPTS.
Chapter 9: Data Link Control
William Stallings Data and Computer Communications 7th Edition
The Data Link Layer Supplementery Slides
Data Link Layer.
Data link layer (LLC).
Chapter 3 Review on Data Link Layer
Chap. 4 Data link layer 2.
Data Link Layer.
Data Link Layer What does it do?
CIS 321 Data Communications & Networking
Chapter 3 – Part 1 The Data Link Layer.
Overview Jaringan Komputer (2)
Chapter 3 The Data Link Layer.
CS412 Introduction to Computer Networking & Telecommunication
Chapter 11 Data Link Control and Protocols.
The Data Link Layer Chapter
Objectives of Today’s Lecture
Objectives of Today’s Lecture
ملاحظة: الكلام المسطر + الرسومات ذات السهم الاحمر*مهمة للمذاكرة
William Stallings Data and Computer Communications
Chapter 9: Data Link Control
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Chapter 3 The Data Link Layer

Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control

Functions of the Data Link Layer Provide service interface to the network layer Dealing with transmission errors Regulating data flow Slow receivers not swamped by fast senders

Functions of the Data Link Layer (2) Relationship between packets and frames.

Services Provided to Network Layer (a) Virtual communication. (b) Actual communication.

Services Provided to Network Layer (2) The data link layer can be designed to offer various services: Unacknowledged connectionless service Acknowledged connectionless service Acknowledged connection-oriented service

Services Provided to Network Layer (3) Placement of the data link protocol.

Framing data link layer must use physical layer. physical layer accept a raw bit stream and attempt to deliver it to the destination. In destination, some bits may have different values and the number of bits received may be less than, equal to, or more than the number of bits transmitted. Data link layer must detect and, if necessary, correct errors. Framing: break up the bit stream into discrete frames and add checksum

Framing (2) Framing methods: Byte count Flag bytes with byte stuffing Flag bits with bit stuffing Physical layer coding violations

A character stream. (a) Without errors. (b) With one error. Framing (3) Byte count A character stream. (a) Without errors. (b) With one error.

PPP (Point-to-Point Protocol) Framing (4) Flag bytes with byte stuffing (a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after stuffing. PPP (Point-to-Point Protocol)

Framing (5) Flag bits with bit stuffing Bit stuffing Each frame begins and ends with a special bit pattern, 01111110 HDLC (High level Data Link Control) protocol Bit stuffing (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in receiver’s memory after destuffing.

Error Control reliable delivery Using feedback Ack (Acknowledgements) NAck (Negative Acknowledgements) Timer sequence numbers

Flow Control feedback-based flow control rate-based flow control ‘‘You may send me n frames now, but after they have been sent, do not send any more until I have told you to continue.’’

Error Detection and Correction Type of errors Single bit Burst Error-Correcting Codes FEC (Forward Error Correction) Error-Detecting Codes For highly reliable links, such as fiber

Error-Correcting Codes n-bit Codeword: n = m + r Code rate: m/n Hamming Distance: To reliably detect d errors, you need a distance d + 1 code to correct d errors, you need a distance 2d + 1 code

Error-Correcting Codes Example: 0000000000, 0000011111, 1111100000, and 1111111111 Hamming distance ??? Correct and detect ??? 0000000111 is Received. What was original frame? we want to design a code with m message bits and r check bits that will allow all single errors to be corrected.

Error-Correcting Codes Hamming code

Error-Correcting Codes Use of a Hamming code to correct burst errors.

Error-Correcting Codes Convolutional code are specified in terms of their rate and constraint length Are used as part of the GSM mobile phone system, in satellite communications, and in 802.11. the NASA convolutional code of r = 1/2 and k = 7

Error-Detecting Codes Parity Checksums Cyclic Redundancy Checks (CRCs)

Error-Detecting Codes Parity Problem with burst error Using rectangular matrix n bits wide and k bits high Interleaving A burst of length n + 1 will pass undetected

Error-Detecting Codes Checksums groups of parity bits

Error-Detecting Codes CRC Calculation of the polynomial code checksum.

Error-Detecting Codes CRC All single-bit errors will be detected. By making x + 1 a factor of G(x), we can catch all errors with an odd number of inverted bits. a polynomial code with r check bits will detect all burst errors of length ≤ r Use in Ethernet detects all bursts of length 32 or less detects all bursts affecting an odd number of bits

Elementary Data Link Protocols An Unrestricted Simplex Protocol Error-free Unrestricted buffers Without delay A Simplex Stop-and-Wait Protocol Flow control protocol Acknowledgement Data traffic Simplex Half duplex

Elementary Data Link Protocols A Simplex Protocol for a Noisy Channel Frames may be either damaged or lost completely Using Ack Using timer Using Sequence number How many bits are required ????? PAR (Positive Acknowledgment with Retransmission) ARQ (Automatic Repeat reQuest)

Link Utilization

Link Utilization Example: 50-kbps satellite channel with a 500-msec round-trip propagation delay Size of frames : 1000-bit The time which first frame has been completely sent: The time which first frame fully arrived: The time which first acknowledgement arrived back: t = 20 msec t = 270 msec t = 520 Sender was blocked 500/520 or 96% of the time. In other words, only 4% of the available bandwidth was used Solution : Pipelining

Sliding Window Protocols A sliding window of size 1, with a 3-bit sequence number. (a) Initially. (b) After the first frame has been sent. (c) After the first frame has been received. (d) After the first acknowledgement has been received.

Sliding Window Protocols (2)

Sliding Window Enhancements Receiver can acknowledge frames without permitting further transmission (Receive Not Ready) Must send a normal acknowledge to resume If duplex, use piggybacking If no data to send, use acknowledgement frame If data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP) bandwidth-delay product of the link : BD

Go Back N Based on sliding window If no error, ACK as usual with next frame expected Use window to control number of outstanding frames If error, reply with NACK Discard that frame and all future frames until error frame received correctly Transmitter must go back and retransmit that frame and all subsequent frames

Go Back N - Damaged Frame Receiver detects error in frame i Receiver sends NACK-i Transmitter gets NACK-i Transmitter retransmits frame i and all subsequent

Go Back N - Lost Frame (1) Frame i lost Transmitter sends i+1 Receiver gets frame i+1 out of sequence Receiver send NACK i Transmitter goes back to frame i and retransmits

Go Back N - Lost Frame (2) Frame i lost and no additional frame sent Receiver gets nothing and returns neither acknowledgement nor NACK Transmitter times out and sends acknowledgement frame with P bit set to 1 Receiver interprets this as command which it acknowledges with the number of the next frame it expects (frame i ) Transmitter then retransmits frame i

Go Back N - Damaged Acknowledgement Receiver gets frame i and send acknowledgement (i+1) which is lost Acknowledgements are cumulative, so next acknowledgement (i+n) may arrive before transmitter times out on frame i If transmitter times out, it sends acknowledgement with P bit set as before This can be repeated a number of times before a reset procedure is initiated

Go Back N - Damaged NACK ?

Go Back N - Diagram RR : Ready Receive Ack REJ : Reject Nack

Go Back N The maximum number of frames that may be outstanding at any instant is not the same as the size of the sequence number space The sender sends frames 0 through 7. A piggybacked acknowledgement for 7 comes back to the sender. The sender sends another eight frames, again with sequence numbers 0 through 7. Now another piggybacked acknowledgement for frame 7 comes in. Did all eight frames belonging to the second batch arrive successfully, or did all eight get lost?

Selective Repeat Also called Selective Reject or 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

Selective Repeat - Diagram

? Selective Repeat Limitation of windows size: For K-bit sequence number ?

Example Data Link Protocols HDLC – High-Level Data Link Control The Data Link Layer in the Internet

High-Level Data Link Control Bit-oriented Using bit stuffing techniques for redundancy Address use for detecting command/response in P2P line Sending just flags -> idle P2P line

High-Level Data Link Control (2) Control field of (a) An information frame. (b) A supervisory frame. (c) An unnumbered frame.

High-Level Data Link Control (3) Information frame Using sliding window with 3-bit Seq number Next : Use for piggybacking P/F : Poll/Final

High-Level Data Link Control (4) Supervisory frame Type 0 : Receive Ready (RR) Type 1 : Reject Next : First Frame which has received with error Type 2 : Receive Not Ready (RNR) Next : First Frame which has received with error. Stop sending Send RR or Reject for start Type 3 : Selective Reject

High-Level Data Link Control (5) Unnumbered frame Use for control Use for Sending data in Unreliable connection-less services 5 bit for Type DIS Connect (DISC) Set Normal Response Mode (SNRM) FRaMe Reject (FRMR) : Checksum is OK Number of bit is less than 32 Wrong Ack …

The Data Link Layer in the Internet A home personal computer acting as an internet host.

PPP – Point to Point Protocol PPP Features Separate packets (Framing), error detection Link Control Protocol (LCP) bringing lines up, testing them, negotiating options, and bringing them down again gracefully when they are no longer needed. Network Control Protocol (NCP) negotiate network-layer options in a way that is independent of the network layer protocol to be used

PPP – Point to Point Protocol PPP and HDLC PPP is character oriented PPP uses byte stuffing

PPP – Point to Point Protocol 11111111 is broadcast Control field indicates an unnumbered frame LCP can omit Address and Control Protocol field Codes starting with a 0 : IPv4, IPv6, IPX, AppleTalk, … Codes starting with a 1 : PPP configuration protocols (LCP, NCP) default length of Payload is 1500 bytes Padding may follow the payload if it is needed

PPP – Point to Point Protocol (2) A simplified phase diagram for bring a line up and down.

ADSL and ATM ?