D ATA L INK L AYER By Dr. Nawaporn Wisitpongphan.

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.
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.
ICSA341 Data Communications and Computer Networks 1 Data Link Control •General principles.
Data and Computer Communications Updated: 2/9/2009.
Flow and Error Control. Flow Control Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most.
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.
Chapter 7 – Data Link Control Protocols
CSIS 6251 CSIS 625 Week 6 Data Link Layer Copyright 2001, Dan Oelke For use by students of CSIS 625 for purposes of this class only.
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.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
1 Comnet 2006 Communication Networks Recitation 8 ARQ Protocols & Performance.
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.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
Semester Copyright USM EEE442 Computer Networks The Data Link / Network Layer Functions: Flow Control and Error Control En. Mohd Nazri Mahmud.
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Network Technology CSE Network Technology CSE3020 Week 6.
15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 1 Data Link Control Physical layer is only responsible for data transmission Data link.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
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.
Chapter 3 THE DATA LINK LAYER
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
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.
THE DATA LINK LAYER Chapter 3 1. H YBRID M ODEL The hybrid reference model to be used in this book. 2.
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.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
1 FIT1005 Topic 6 - Data Link Layer Reference: Chapter 7 -Stallings.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
CSCI 465 D ata Communications and Networks Lecture 10 Martin van Bommel CSCI 465 Data Communications & Networks 1.
1 Flow&Error Control R. Supakorn. 2 Flow Control Flow control refers to a set of procedure used to restrict the amount of data that the sender can send.
Telecommunications & Networking Lesson 3. ISO Open System Interconnect (OSI) Application Presentation Session Transport Network Data Link Physical Application.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
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.
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.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Data and Computer Communications Data Link Control Protocols.
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
MODULE I NETWORKING CONCEPTS.
William Stallings Data and Computer Communications 7th Edition
Data Link Layer Flow Control.
Part III Datalink Layer 10.
Chap. 4 Data link layer 2.
Instructor Mazhar Hussain
CIS 321 Data Communications & Networking
Flow Control.
Data Link Layer: Data Link Control
Chapter 10 Data Link Control
Flow and Error Control.
Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Error control.
William Stallings Data and Computer Communications
Part III Datalink Layer 10.
Chapter 12 Media Access Control (MAC)
Presentation transcript:

D ATA L INK L AYER By Dr. Nawaporn Wisitpongphan

I NTRODUCTION TO SOME RANDOM TOPIC IN C OMPUTER N ETWORK

E PIDEMIC R OUTING

O UTLINE

5 D ATA L INK C ONTROL P ROTOCOLS Data Link Control Protocols Line Discipline Line Discipline Flow Control Flow Control Error Control Error Control Who should Send now? How much data Can be sent? How can error be corrected?

6 D ATA L INK C ONTROL P ROTOCOLS Line Disciplin e Poll/S elect ENQ/ACK In half-duplex transmissions, it is essential that only one device transmit at a time. If both ends of the link put signals on the line simultaneously, they collide, leaving nothing on the line but noise. The coordination of half-duplex transmission is part of a procedure called line discipline.

ENQ/ACK ENQ/ACK coordinates which device may start a transmission and whether or not the intended recipient is ready and enabled. See fig 10.4 Using ENQ/ACK, a session can be initiated by either station on a link as long as both are of equal rank. In both half-duplex and full-duplex transmission, the initiating device establishes the session. In half duplex, the initiator then sends its data while the responder waits. The responder may take over the link when the initiator is finished or has requested a response. In full duplex, both devices can transmit simultaneously once the session has been established. How it works? Refer fig

ENQ/ACK

P OLL /S ELECT The poll/select method of line discipline works with topologies where one device is designated as a primary station and the other devices are secondary stations. Multipoint systems must coordinate several nodes, not just two. The question to be determined in these cases, therefore, is more than just, are you ready? It is also, which of the several nodes has the right to use the channel?

P OLL /S ELECT : H OW DOES IT WORK ? Whenever multipoint link consists of a primary device and multiple secondary devices using a single transmission line, all exchanges must be made through primary device. The primary device controls the link; the secondary device follow its instructions. It is up to the primary to determine which device is allowed to use the channel at a given time The primary, therefore is always the initiator of a session. If the primary wants to receive data and send data. It apply function called poll and select respectively.

A DDRESSING IN P OLL /S ELECT For point-to-point configurations, there is no need for addressing; any transmission put onto the link by one device can be intended only for the other. For the primary device in a multipoint topology to be able to identify and communicate with a specific secondary device, however, there must be an addressing convention. For this reason, every device on a link has an address that can be used for identification.

POLL The polling function is used by the primary device to solicit transmission from the secondary devices. As noted, the secondaries are not allowed to transmit data unless asked (don’t call us-we’ll call you). By keeping all control with the primary, the multipoint system guarantees that only one transmission can occur at a time, thereby ensuring against signal collision. When the primary is ready to receive data, it must ask (poll) each device in turn if it has anything to send. When the first secondary is approached, it responds either with a NAK frame if it has nothing to send or with data (in the form of a data frame) if it does.

POLL (C ONT ) There are two possibilities for terminating the exchange: either the secondary sends all its data, finishing with an EOT frame Or the primary says, “time’s up” which of these occurs depends on the protocol and the length of the message. Once a secondary has finished transmitting, the primary can poll the remaining devices

14 P OLL

S ELECT The select mode is used whenever the primary device has something to send. But first, it must ensure that the target device is prepared to receive. So the primary must alert the secondary to the upcoming transmission and wait for an acknowledgment of the secondary’s ready status. Before sending data, the primary, the primary creates and transmits a select (SEL) frame, one field of which includes the address of the intended secondary. If the secondary is awake and running, it returns an ACK frame to the primary. The primary then sends one or more data frames each addressed to the intended secondary.

16 S ELECT

17 D ATA L INK C ONTROL P ROTOCOLS Data Link Control Protocols Line Discipline Line Discipline Flow Control Flow Control Error Control Error Control Who should Send now? How much data Can be sent? How can error be corrected?

18 F LOW C ONTROL / S TOP & W AIT Flow Control Sliding Window Stop-and-Wait Send 1 frame at a time Send several frames at a time

19 S TOP - AND -W AIT F LOW C ONTROL Procedure 1. Source transmits frame 2. Destination receives frame and replies with acknowledgement (ACK) 3. Source waits for ACK before sending the next frame 4. 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

20 S TOP - AND -W AIT F LOW C ONTROL

21 S TOP - AND -W AIT L INK U TILIZATION Transmission Time is normalized to 1, Propagation Delay is expressed as ‘a’

22 F LOW C ONTROL / S LIDING W INDOW Flow Control Sliding Window Stop-and-Wait Send 1 frame at a time Send several frames at a time

S LIDING -W INDOWS F LOW C ONTROL Allows multiple frames to be in transit Receiver has buffer for W frames Transmitter sends up to W frames once without ACK from receiver ACK includes sequence 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

S LIDING -W INDOWS F LOW C ONTROL Receiver can ACK frames without permitting further transmission (Receive Not Ready) Must send a normal acknowledgment to resume data transmission Can use Piggyback ACKs in Full Duplex Links Send data and ACK together in 1 frame If a station has only ACK to send (No data) : Send a separate ACK frame (RR/RNR) If a station has only data to send (No new ACK) : Send a repeat (as previous) ACK frame 24

25 S LIDING -W INDOW D IAGRAM

26 S LIDING -W INDOW E XAMPLE

27 D ATA L INK C ONTROL P ROTOCOLS Data Link Control Protocols Line Discipline Line Discipline Flow Control Flow Control Error Control Error Control Who should Send now? How much data Can be sent? How can error be corrected?

E RROR C ONTROL Detection and correction of errors such as: Lost frames Damaged frames Common techniques use: Error detection : CRC Positive acknowledgment Retransmission after timeout Negative acknowledgement & retransmission 28

29 A UTOMATIC R EPEAT R EQUEST (ARQ) Collective name for such error control mechanisms, including: Stop-and-Wait Go-back-N Selective-Reject (selective retransmission)

S TOP - AND -W AIT ARQ Based on Stop-and-Wait Flow Control Source transmits single frame & wait for ACK If received frame damaged, discard it Transmitter has timeout If no ACK within timeout, retransmit If ACK is damaged, transmitter will not recognize it Transmitter will retransmit Receive gets two copies of frame - Discard Use alternate numbering and ACK0 / ACK1 30

31 S TOP - AND -W AIT ARQ Possible Transmission Errors Data Lost ACK Lost Pros Simple Cons inefficient

G O -B ACK -N ARQ Based on Sliding-Window Flow Control 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 32

G O -B ACK -N – H ANDLING E RROR 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 sequence 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 33

G O -B ACK -N - H ANDLING 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 34

S ELECTIVE -R EJECT ARQ 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 35

36 G O B ACK N VS. S ELECTIVE R EJECT

PREVIEW OF THE N EXT C LASS

38 E VOLUTION OF C ONTENTION P ROTOCOLS Developed in the 1970s for a packet radio network Aloha Slotted Aloha Improvement: Start transmission only at fixed times (slots) CSMA CSMA = Carrier Sense Multiple Access Improvement: Start transmission only if no transmission is ongoing CD = Collision Detection Improvement: Stop ongoing transmission if a collision is detected (e.g. Ethernet) CSMA/CD