18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.

Slides:



Advertisements
Similar presentations
CSCI-1680 Link Layer Reliability Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Introduction to Information Technologies
CSCI-1680 Link Layer Reliability Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Reliability & Channel Coding
Chapter 6 Errors, Error Detection, and Error Control.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Fundamentals of Computer Networks ECE 478/578 Lecture #4: Error Detection and Correction Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 12 Introduction to Computer Networks.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
The Data Link Layer Chapter 3. Position of the data-link layer.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 ITC242 – Introduction to Data Communications Week 10 Topic 16 Data link control.
The OSI Reference Model
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Mediation Direct Link Networks.
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check.
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Networking. Protocol Stack Generally speaking, sending an message is equivalent to copying a file from sender to receiver.
CSCI-1680 Link Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Principles of Reliable Data Transfer. Reliable Delivery Making sure that the packets sent by the sender are correctly and reliably received by the receiver.
William Stallings Data and Computer Communications 7th Edition
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.3: Reliable Transmission Dr. Nghi.
14-Oct-15Computer Networks1 Reliable Transmission.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CSS CSS432 Point-to-Point Links Textbook Ch2.1.2 – 2.5 Professor: Munehiro Fukuda.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Lecture 7: Reliable Packet Transmission. Cyclic Redundancy Check Add k bits of extra data (the CRC field) to an n-bit message to provide error detection.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
Lecture 6: Framing and Error Detection-Data Link Layer Functions
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 15.
27-Oct-15Computer Networks1 Outline Chapter 2: Direct Link Networks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Link Layer Dr. Mozafar Bag-Mohammadi Ilam University.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 12: Reliability Slides used with permissions.
Computer Networks Lecture 2: Data Link Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University Revised Autumn 2015 by S.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
Error Detection.
CSCI-1680 Link Layer Reliability Based partly on lecture notes by David Mazières, Phil Levis, Rodrigo Fonseca John Jannotti.
Transport Layer: Sliding Window Reliability
Univ. of TehranIntroduction to Computer Network1 An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Media Direct Link Networks.
Transmission Errors Error Detection and Correction.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Reliability Some slides used with permissions.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
Univ. of TehranIntroduction to Computer Network1 An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
Computer Networking Lecture 16 – Reliable Transport.
CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should.
Reliable Transmission
Advanced Computer Networks
CIS 321 Data Communications & Networking
Data Link Layer What does it do?
Introduction of Transport Protocols
ECE 4450:427/527 - Computer Networks Spring 2017
COMP/ELEC 429/556 Introduction to Computer Networks
CSCI-1680 Link Layer Reliability
Reliable transmission
Point-to-Point Links Outline Encoding Framing Error Detection
Introduction to Information Technologies
CSS432 (Link Level Protocols) Reliable Transmission Textbook Ch 2.5
Advanced Computer Networks
CSE 461: Framing, Error Detection and Correction
Transport Layer Outline Intro to transport UDP
Dr. Mozafar Bag-Mohammadi Ilam University
Error detection: Outline
Presentation transcript:

18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5

18-Aug-154/598N: Computer Networks Error Detection Problem of detecting errors introduced into frames Specific mechanism that introduces errors depends on the network technology - thermal, radio interference etc. Sender introduces additional error detecting codes that are based on the actual data. Receiver recomputes the code for the received data. If the computed code mis-matches the error code computed by the sender; there was an error in the transmission. Sender and receiver use the same algorithm to create these codes.

18-Aug-154/598N: Computer Networks Two dimensional parity 7 bit data, add one parity bit Compute parity of all bit positions to create a single parity byte for the entire frame Catches 1, 2, and 3 bit errors (most 4-bit errors) Parity

18-Aug-154/598N: Computer Networks Internet Checksum Algorithm View message as a sequence of 16-bit integers; sum using 16-bit ones-complement arithmetic; take ones-complement of the result. Simple, last line of defense (e2e argument) u_short cksum(u_short *buf, int count) { register u_long sum = 0; while (count--){ sum += *buf++; if (sum & 0xFFFF0000){ /* carry occurred, so wrap around */ sum &= 0xFFFF; sum++; } return ~(sum & 0xFFFF); }

18-Aug-154/598N: Computer Networks Cyclic Redundancy Check Theoretical foundation lies in finite fields Offers stronger protection Represent n-bit message as n-1 degree polynomial –e.g., MSG= as M(x) = x 7 + x 4 + x 3 + x 1 Let k be the degree of some divisor polynomial –e.g., C(x) = x 3 + x (k = 3 here) C(x) is chosen apriori Add k bits of redundant data to an n-bit message –want k << n –e.g., in Ethernet, k = 32 and n = 12,000 (1500 bytes) –Transmitted message is P(x)

18-Aug-154/598N: Computer Networks CRC (cont) Transmit polynomial P(x) that is evenly divisible by C(x) –shift left k bits, i.e., M(x).x k –Divide by C(x) and find the remainder –subtract remainder of M(x).x k /C(x) from M(x).x k Receiver polynomial P(x) + E(x) –E(x) = 0 implies no errors Divide (P(x) + E(x)) by C(x); remainder zero if: –E(x) was zero (no error), or –E(x) is exactly divisible by C(x)

18-Aug-154/598N: Computer Networks Selecting C(x) All single-bit errors, as long as the x k and x 0 terms have non-zero coefficients. All double-bit errors, as long as C(x) contains a factor with at least three terms Any odd number of errors, as long as C(x) contains the factor (x + 1) Any ‘burst’ error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits. Most burst errors of larger than k bits can also be detected See Table 2.5 on page 96 for common C(x)

18-Aug-154/598N: Computer Networks CRC polynomials CRC-8: x 8 +x 2 +x 1 +1 CRC-10: x 10 +x 9 +x 5 +x 4 +x 1 +1 CRC-12: x 12 +x 11 +x 3 +x 2 +1 CRC-16: x 16 +x 15 +x 2 +1 CRC-CCITT: x 16 +x 12 +x 5 +1 CRC-32: x 32 +x 26 +x 23 +x 22 + x 16 +x 12 +x 11 +x 10 +x 8 x 7 +x 5 +x 4 +x 2 +1 Ethernet uses CRC-32 HDLC: CRC-CCITT ATM: CRC-8, CRC-10, and CRC-32

18-Aug-154/598N: Computer Networks Reliable Transmission When corrupt frames are received and discarded, want the network to recover from these errors Two fundamental mechanisms: –Acknowledgement: A control message sent back to the sender to notify correct receipt –Timeout: If sender does not receive and Ack after timeout interval, it should retransmit the original frame This general strategy is called ARQ: Automatic Repeat Request

18-Aug-154/598N: Computer Networks Acknowledgements & Timeouts SenderReceiver Frame ACK T imeout T ime SenderReceiver Frame ACK T imeout Frame ACK T imeout SenderReceiver Frame ACK T imeout Frame ACK T imeout SenderReceiver Frame T imeout Frame ACK T imeout (a)(c) (b)(d)

18-Aug-154/598N: Computer Networks Stop-and-Wait Problem: keeping the pipe full –(bandwidth delay product) Example –1.5Mbps link x 45ms RTT = 67.5Kb (8KB) –1 KB frames imples 1/8th link utilization SenderReceiver

18-Aug-154/598N: Computer Networks Sliding Window Allow multiple outstanding (un-ACKed) frames Upper bound on un-ACKed frames, called window SenderReceiver T ime … …

18-Aug-154/598N: Computer Networks SW: Sender Assign sequence number to each frame (SeqNum) Maintain three state variables: –send window size (SWS) –last acknowledgment received (LAR) –last frame sent (LFS) Maintain invariant: LFS - LAR <= SWS Advance LAR when ACK arrives Buffer up to SWS frames  SWS LARLFS ……

18-Aug-154/598N: Computer Networks SW: Receiver Maintain three state variables –receive window size (RWS) –largest frame acceptable (LFA) –last frame received (LFR) Maintain invariant: LFA - LFR <= RWS Frame SeqNum arrives: –if LFR < SeqNum < = LFA accept –if SeqNum LFA discarded Send cumulative ACKs  RWS LFR LFA ……

18-Aug-154/598N: Computer Networks Acknowledgements Negative acknowledgment (NAK) –When receiver receives frame which has a sequence number higher than the next frame expected, receiver proactively informs the sender to resend the missing frame Selective ACK –Acknowledge frames that it has received, not just the last frame received

18-Aug-154/598N: Computer Networks Sequence Number Space SeqNum field is finite; sequence numbers wrap around Sequence number space must be larger then number of outstanding frames SWS <= MaxSeqNum-1 is not sufficient –suppose 3-bit SeqNum field (0..7) –SWS=RWS=7 –sender transmit frames 0..6 –arrive successfully, but ACKs lost –sender retransmits 0..6 –receiver expecting 7, 0..5, but receives second incarnation of 0..5 SWS < (MaxSeqNum+1)/2 is correct rule Intuitively, SeqNum “slides” between two halves of sequence number space

18-Aug-154/598N: Computer Networks Concurrent Logical Channels Multiplex 8 logical channels over a single link Run stop-and-wait on each logical channel Maintain three state bits per channel –channel busy –current sequence number out –next sequence number in Header: 3-bit channel num, 1-bit sequence num –4-bits total –same as sliding window protocol Separates reliability from order