This Lecture. BUS Computer Facilities Network Management. Line Discipline. Data Link Layer

Similar documents
William Stallings Data and Computer Communications. Chapter 7 Data Link Control

Data link layer functions. 2 Computer Networks Data Communications. Framing (1) Framing (2) Parity Checking (1) Error Detection

Data Link Control Protocols

Data and Computer Communications

Chapter 7: Data Link Control. CS420/520 Axel Krings Page 1

Chapter 7: Data Link Control. Data Link Control Protocols


Data Link Layer (part 2)

INTERNET ARCHITECTURE & PROTOCOLS

Flow control: Ensuring the source sending frames does not overflow the receiver

4. Error correction and link control. Contents

3. Data Link Layer 3-2

DATA LINK CONTROL PROTOCOLS

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

Data Link Control Protocols

Data Link Control. Claude Rigault ENST Claude Rigault, ENST 11/3/2002. Data Link control 1

Data Link Layer (cont.) ( h h h ) (Sicherungsschicht) HDLC - 1.

(Sicherungsschicht) Chapter 5 (part 2) [Wa0001] HDLC - 1.

I. INTRODUCTION. each station (i.e., computer, telephone, etc.) directly connected to all other stations

Telecom Systems Chae Y. Lee. Contents. Flow Control Error Detection/Correction Link Control (Error Control) Link Performance (Utility)

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

Chapter 5 Peer-to-Peer Protocols. School of Info. Sci. & Eng. Shandong Univ..

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

Chapter 3. The Data Link Layer

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

Chapter 6 Digital Data Communications Techniques

User Datagram Protocol

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

10.1 REVIEW QUESTIONS

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione. Link Layer. Fundamentals of Communication Networks

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

Data Link Layer, Part 4. Exemplary Protocols

Data Link Layer: Overview, operations

The data link layer has a number of specific functions it can carry out. These functions include. Figure 2-1. Relationship between packets and frames.

Chapter 5 Peer-to-Peer Protocols and Data Link Layer

CEG3185 TUT6. Prepared by Zhenxia Zhang Revisited by Jiying Zhao

The flow of data must not be allowed to overwhelm the receiver

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

DATA LINK LAYER UNIT 7.

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

Data Link Layer. Learning Objectives. Position of the data-link layer. MCA 207, Data Communication & Networking

Outline. EEC-484/584 Computer Networks. Data Link Layer Design Issues. Framing. Lecture 6. Wenbing Zhao Review.

DATA LINK LAYER: NEED

The University of Sydney AUSTRALIA. Advanced Communication Networks

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

Chapter 11 Data Link Control 11.1

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

TYPES OF ERRORS. Data can be corrupted during transmission. Some applications require that errors be detected and corrected.

ES623 Networked Embedded Systems

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

Your favorite blog : (popularly known as VIJAY JOTANI S BLOG..now in facebook.join ON FB VIJAY

CS422 Computer Networks

Institute of Computer Technology - Vienna University of Technology. L02 - Protocol Principles

Transmission SIGNALs

Transport Protocols & TCP TCP

HDLC PROTOCOL. Michel GARDIE

Protocol Principles. Framing, FCS and ARQ 2005/03/11. (C) Herbert Haas

Appendix. Pioneering Protocols

CONNECTION-ORIENTED & CONNECTIONLESS NETWORKS

INF4/MSc Computer Networking. Lectures 3-4 Transport layer protocols TCP/UDP automatic repeat request

Outline. CS5984 Mobile Computing

Transport Protocols and TCP: Review

Data Link Protocols DATA LINK PROTOCOLS. Asynchronous Protocols. Types of Data Link Protocols XMODEM. Asynchronous Protocols.

Chapter 11 Data Link Control 11.1

Inst: Chris Davison

Telecommunication Protocols Laboratory Course

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

networks2.pdf September 8,

INTERNATIONAL TELECOMMUNICATION UNION. SERIES X: DATA NETWORKS AND OPEN SYSTEM COMMUNICATION Public data networks Interfaces

Lecture 6: Reliable Transmission. CSE 123: Computer Networks Alex Snoeren (guest lecture) Alex Sn

Lecture / The Data Link Layer: Framing and Error Detection

CSE 461: Framing, Error Detection and Correction

Lecture 7: Flow Control"

CHAPTER 15 LOCAL AREA NETWORKS ANSWERS TO QUESTIONS

The Data Link Layer Chapter 3

HDLC (High level Data Link Control)

Line Protocol Basics. HDLC (High level Data Link Control) Agenda. Additional Issues

TCP : Fundamentals of Computer Networks Bill Nace

Jaringan Komputer. Data Link Layer. The Data Link Layer. Study the design principles

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Chapter 5 Data-Link Layer: Wired Networks

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Chapter 5: The Data Link Layer. Chapter 5 Link Layer and LANs. Ethernet. Link Layer. Star topology. Ethernet Frame Structure.

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

Lecture 7: Flow & Media Access Control"

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Data Link Layer, Part 5 Sliding Window Protocols. Preface

INTERNATIONAL TELECOMMUNICATION UNION. SERIES X: DATA COMMUNICATION NETWORKS: SERVICES AND FACILITIES, INTERFACES Interfaces

Chapter Six. Errors, Error Detection, and Error Control. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

User Datagram Protocol (UDP):

INTERNATIONAL TELECOMMUNICATION UNION. SERIES Q: DIGITAL SUBSCRIBER SIGNALLING SYSTEM No. 1 (DSS 1), DATA LINK LAYER

Sequence Number. Acknowledgment Number. Data

Links. CS125 - mylinks 1 1/22/14

Transcription:

This Lecture US35 - Computer Facilities Network Management Synchronisation and interfacing insufficient by themselves. Need to provide: Flow control - allow the receiver to regulate the flow of data. Error detection - generate and test error-detecting codes over the data. Error control - retransmit damaged and lost frames. Faculty of Information Technology Monash University pplication Presentation Session Transport Network Link Physical Line discipline Flow control Error control Faculty of Information Technology 2 Faculty of Information Technology Link Layer Line Discipline esponsible for the transfer data over the communication channel: Line discipline: Who is currently allowed to transmit data, as well as initiation, maintenance and termination of a sustained data exchange. Frame synchronisation: Delineate the start and end of a block of data (frame). Flow control: must not send frames faster than the receiver can process. Error control: Errors introduced by the transmission system should be corrected. ddressing: Differentiate multiple receivers on a multipoint line (e.g. LN). Control and data on same link: Distinguish between control and data information. 3 Faculty of Information Technology nswers the question: Who should send now? Station Station Secondary Secondary Secondary C Primary Establishment ENQ SEL Select transfer Poll NK Termination EOT Poll Poll Poll NK ENQ/ line discipline Poll/select discipline 4 Faculty of Information Technology

Frame synchronisation Flow Control The issue of bit synchronisation was discussed previously: Use a separate clock line (short distance only). Embed the clock signal in the data (Manchester encoding). Guarantee transitions in the data stream (8ZS, HD3). Still require an indication of the start and end of a block of bits (frame). Use preamble and postamble: e.g. series of SYN (hex 6) characters. e.g. block of patterns ending in. estricts the amount of data that can be sent before receiving an acknowledgement. Ensuring the sending entity does not overwhelm the receiving entity: Preventing buffer overflow at the receiver. Transmission time: taken to emit all bits into medium (proportional to frame length). Propagation time: for a bit to traverse the link from source to destination. 8 bit flag Control fields Field Control fields 8 bit flag 5 Faculty of Information Technology 6 Faculty of Information Technology Model of Frame Transmission Stop-and-Wait Flow Control Source Destination Source Destination Sender eceiver Frame Frame Frame 2 Frame 3 Frame 4 Frame 5 Frame Frame 2 Frame 3 Frame 4 Frame 5 (a) Error free transmission Frame 2 Frame 3 Frame 4 Frame 5 (b) Transmission with losses and errors Frame Frame 3 Garbled frame Frame 5 7 Faculty of Information Technology Transmits a frame Wait until it receives before sending the next frame Source transmits frame. Sends back an acknowledgement to the frame just received 8 Faculty of Information Technology Destination receives frame and replies with acknowledgement. Source waits for before sending next frame. Destination can stop flow by not sending an. Works well when a message is sent in a few large frames.

Fragmentation Stop-and-Wait Link Utilisation Large block of data may be split into small frames. Limited buffer size at the receiver. Frame errors are less likely and are detected sooner (when whole frame received). On error, retransmission of smaller frames is needed. For multipoint, prevents one station occupying medium for long periods. Stop-and-wait provides inefficient link utilisation when: Fragmentation is used. Very high data rates. Very long distance between sender and receiver. 9 Faculty of Information Technology t T t T Frame t + a T t + T t + T t + a T t + + a T t + + a T t + + 2a T t + + 2a T (a) a < (b) a > Stop and Wait Link Utilization (transmission time = ; propagation time = a) Faculty of Information Technology Sliding-Window Flow Control Sliding-Window Diagram Improve efficiency greatly by allowing multiple numbered frames to be in transit at a time. Frames already transmitted Frames buffered until acknowledged Window of frames that may be transmitted eceiver has a buffer W frames long. can send up to W frames without an. includes the number of the next frame expected: Indicates that the receiver is ready for the next W frames from the specified number. Multiple frames may be acknowledged at one time (withhold ). Sequence number bounded by size of field used to transmit it (k-bits). Frames are numbered modulo 2 k (e.g. for k = 3:...,5,6,7,,,2,...). Therefore, receiver has a window size, W, up to 2 k. Faculty of Information Technology *** 2 3 4 5 6 7 4 5 6 7 *** Frame sequence number Last frame acknowledged Frames already received Last frame transmitted Window shrinks from trailing edge as frames are sent Window of frames that may be accepted Window expands from leading edge as s are received *** 2 3 4 5 6 7 4 5 6 7 *** Last frame acknowledged Last frame received Sender eceiver Window shrinks from trailing edge as frames are received Window expands from leading edge as s are sent 2 Faculty of Information Technology

Sliding-Window Example Sliding-Window Example Window size is 3 frames, station - sender, station - receiver. efore any transmission has occurred, window sizes on each station is 3 frames. sends frame F and it is received by. s window is reduced to 2 as soon as F leaves. s window is reduced to 2 only after F arrives at. F 3 Faculty of Information Technology sends F, there is no from yet. F sends F2, still no. F2 sends acknowledgement of receiving up to frame 2 (3 frames) and receives this. s window expands back to 3 frames as soon as 3 leaves. s window size expands back to 3 when 3 physically arrives at. 3 4 Faculty of Information Technology Sliding-Window Example More Sliding-Window Example sends F3, and immediately sends an acknowledgement of F3. Source System Destination System s window shrinks to 2 frames after receiving F3 and expands back to 3 frames when is sent. 4 5 6 7 4 5 6 7 4 5 6 7 4 5 6 7 F F s window will remain the same until has physically arrived at. 4 5 6 7 4 5 6 7 F2 4 5 6 7 4 5 6 7 In the meantime, continues to send frames and sends F. 3 4 5 6 7 4 5 6 7 F3 4 5 6 7 4 5 6 7 F3 F F4 F5 4 5 6 7 4 5 6 7 5 Faculty of Information Technology 4 5 6 7 4 5 6 7 4 4 5 6 7 4 5 6 7 4 5 6 7 4 5 6 7 6 Faculty of Information Technology F6

Sliding-Window Enhancements Error Detection eceiver can acknowledge frames without permitting further transmission: Use a eceive Not eady (N). Must send a normal acknowledge to resume transmission. If full duplex transmission, use piggybacking: frames include a field for an acknowledgement sequence number. If there is no data to send, use an acknowledgement frame. If there is data but no acknowledgement to send, send the last acknowledgement number again, or have an valid flag (TCP). 7 Faculty of Information Technology dditional bits are added by the transmitter for an error detection code. This code is calculated as a function of the other transmitted bits. The receiver performs the same calculation and compares with the code. Generating function edundancy check and edundancy check ccept eceiver eject Checking function 8 Faculty of Information Technology Parity Check Cyclic edundancy Check (CC) Each character character code + parity bit. The value of the parity bit is such that the character has an even (even parity) or an odd (odd parity) number of ones. For example: T = with even parity =, and odd parity =. n even number of bit errors goes undetected. Even parity generator eceiver Checking function: Is total number of s even? 9 Faculty of Information Technology For a block of k bits, the transmitter generates an n-bit sequence. Transmit k + n bits which is exactly divisible by some number. eceive divides frame by that number: If no remainder, assume no error. For math, see Stallings Chapter 7.... n bits Divisor n+ bits emainder CC n bits 2 Faculty of Information Technology CC eceiver Divisor emainder CC Zero, accept Non zero, reject

Error Control Error Control Techniques Mechanisms to: Detect errors. Correct errors. Two types of error: Lost frames: Frame fails to arrive at destination (receiver missed it). Damaged frames: recognised frame that contains bits in error. 2 Faculty of Information Technology Error Control Techniques... Error detection Parity bit, CC cknowledgement Positive () - receiver sends a positive for an error-free frame. Negative (EJ) - destination sends a negative for errored frames. The source retransmits such frames. etransmission after timeout etransmit frames that have not been acknowledged in a predetermined period of time. Collectively, the above mechanisms are referred as automatic repeat request (Q), for which there are three techniques: stop-and-wait, go-back-n, and selective-reject. 22 Faculty of Information Technology Stop-and-Wait Q Go-ack-N Q ased on the stop-and-wait flow control. Source transmits a single frame and waits for an. If received frame is damaged, discard it: has a timeout. If no received within timeout, retransmit. If damaged, transmitter will not recognise it. will timeout and retransmit. eceiver gets two copies of the same frame. Number frames and, and use and. Discard successive frames with the same number. Pros and cons: Simple but inefficient. PDU trans mission time Propagation time out interval PDU lost; retransmits out interval lost; retransmits 23 Faculty of Information Technology frame frame frame trans mission time discards duplicate PDU ased on sliding-window flow control (most commonly used). If there is no error, as usual with the next frame expected. Use the window to control the number of outstanding frames. If an error in a frame, reply with rejection: Discard that frame and all the future frames until the error frame is received correctly. must go back and retransmit that frame and all subsequent frames. Damaged Frame: eceiver detects error in frame i. eceiver sends reject i. gets reject i. retransmits frame i and all subsequent. 24 Faculty of Information Technology

Go-ack-N: Examples Go-ack-N: Lost Frame 2 3 4 5 3 4 5 3 NK 3 Damaged data frame eceiver E, D D D 2 3 4 NK 2 2 3 4 Lost data frame 25 Faculty of Information Technology eceiver Lost D D out Lost 2 2 3 Lost eceiver Lost : Frame i is lost. sends i +. eceiver gets frame i + out of sequence eceiver sends reject i. goes back to frame i and retransmits. Lost frame 2: Frame i is lost and no additional frame is sent. eceiver gets nothing and returns neither an acknowledgement nor a rejection. times out and sends an acknowledgement frame with the P bit set to. eceiver interprets this as a command which it acknowledges with the number of the next frame it expects (frame i). then retransmits frame i. 26 Faculty of Information Technology Go-ack-N: Damaged cknowledgement or ejection Selective-eject Q Damaged cknowledgement: eceiver gets frame i and sends an acknowledgement (i+) which is lost. cknowledgements are cumulative, so the next acknowledgement (i + n) may arrive before the transmitter times out on frame i. If the transmitter times out, it sends an acknowledgement with the P bit set as before. This can be repeated a number of times before a reset procedure is initiated. Damaged ejection: s for lost frame 2. 4, 5, and 6 retransmitted out frame frame 2 frame 4 frame 3 frame 5 frame 6 frame 4 frame 5 frame 7 frame 6 2 4 EJ 4 5 frame (P bit = ) frame 2 7 discarded by receiver lso called selective retransmission. Only rejected frames, or frames that time out are retransmitted. Subsequent frames are accepted by the receiver and buffered. Minimises retransmission. eceiver must maintain large enough buffer: wait until errored frame is retransmitted. More complex logic in receiver (reorder frames) and transmitter (send frames out of sequence). Selective-reject Q less common than go-back-n Q due to the added complexity. 4 retransmitted out frame frame 2 frame 4 frame 6 frame 3 frame 7 frame 5 frame 4 frame 2 4 SEJ 4 7 frame 2 (P bit = ) 3 frame 3 frame 4 buffered by receiver Go back N Q 27 Faculty of Information Technology Selective reject Q 28 Faculty of Information Technology

High Level Link Control (HDLC) Flag Fields ISO 339, ISO 4335. Widely used and basis for many other DLC protocols including LP and LPD. Frame Structure: Synchronous transmission using frames. Single frame format for all data and control exchanges. Flag 8 bits ddress 8 extendable Control Information 29 Faculty of Information Technology FCS 8 or 6 variable 6 or 32 8 Flag Delimit frame at both ends. Unique pattern:. Single flag may be used to close one frame and open another. eceiver hunts for the flag sequence to synchronise to the start of a frame. it stuffing used to avoid confusion with data containing : inserted after every sequence of five s. If the receiver detects five s it checks the next bit. If it is, it is deleted. If it is and seventh bit is, accept as a flag. If sixth and seventh bits are, the sender is indicating an abort condition. 3 Faculty of Information Technology it Stuffing Example ddress Field Original Pattern: fter bit stuffing Identifies secondary station that sent or will receive frame. Not required for point-to-point links but always included. Usually 8 bits long. May be extended to multiples of 7 bits: LS of each octet indicates that it is the last octet () or not (). ll ones () indicates broadcast. 2 3 4 5 6 7 8 9 2 3 4 5 6 8n *** 3 Faculty of Information Technology 32 Faculty of Information Technology

Control Field Control Field Diagram Three different formats for different frame types: Information - data to be transmitted to user (next layer up). Flow and error control piggybacked on the information frames. Supervisory - Q when piggyback is not used. Unnumbered - supplementary link control. First one or two bits of the control field identify the frame type. Poll/final bit: Its use depends on the context. Command frame (P bit): to solicit (poll) response from peer. esponse frame (F bit): indicates response to soliciting command. 33 Faculty of Information Technology I: Information S: Supervisory U: Unnumbered 2 3 4 5 6 7 8 8 bit control field format N(S) S M P/F P/F P/F 34 Faculty of Information Technology N() N() Information N(S) P/F N() M N(S) = Send sequence number N() = eceive sequence number S = Supervisory function bits M = Unnumbered function bits P/F = Poll/final bit 2 3 4 5 6 7 8 9 2 3 4 5 6 Supervisory S P/F N() 6 bit control field format Information Field HDLC Operation Only in information and some unnumbered frames. Must contain integral number of octets. Variable length to some system defined maximum. Frame Check Sequence Field (FCS) Error detection. Normal code is 6 bit CC-CCITT. Optional 32 bit CC-32. Exchange of information, supervisory and unnumbered frames. Three phases: Initialisation: send a set mode command. transfer: using I-frames and sequence numbers (N(S) and N()) for error and flow control. Disconnect: either module can initiate a disconnect. out SM SM U * * * DISC U (a) Link setup and disconnect I, 4, I, 3, I, 5, EJ, 4 I, 4, I, 5, I, 6, N(S) N() I,, I,, I,, I, 2, I,, 3 I, 3, 2 I, 2, 4 I, 3, 4, 4 (b) Two way data exchange out I, 3, I, 2,,, P, 3, F I, 3,, 4, 3 I, 3, N, 4,, P N, 4, F,, P, 4, F I, 4, (c) usy condition 35 Faculty of Information Technology (d) eject recovery (e) out recovery 36 Faculty of Information Technology

Further eading Stallings, W. and Computer Communications, Prentice Hall. Chapter 7. Forouzan,. Communications and Networking, McGraw-Hill. Chapters 9, and. 37 Faculty of Information Technology