Reliable transmission

Slides:



Advertisements
Similar presentations
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Advertisements

2.5 Reliable Transmission
CSCI-1680 Link Layer Reliability Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
1 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
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.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Mediation Direct Link Networks.
Spring 2002CS 4611 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
Distributed systems Module 1 -Basic networking Teaching unit 1 – LAN standards Ernesto Damiani University of Bozen-Bolzano Lesson 4 – Ethernet frame.
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Spring 2003CS 4611 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
CSCI-1680 Link Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.3: Reliable Transmission Dr. Nghi.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 16.
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.
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
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.
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.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
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
1 Ethernet History –developed by Xerox PARC in mid-1970s –roots in Aloha packet-radio network –standardized by Xerox, DEC, and Intel in 1978 –similar to.
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Media Direct Link Networks.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
Computer Networking Lecture 16 – Reliable Transport.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
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
Data Link Networks Hardware Building Blocks Nodes & Links CS380
Data Link Layer Flow Control.
Getting Connected (Chapter 2 Part 3)
B. R. Chandavarkar CSE Dept., NITK Surathkal
2. Getting connected (part 2)
Advanced Computer Networks
Ethernet Outline Multiple Access and Ethernet Intro Ethernet Framing
Chap. 4 Data link layer 2.
Transport Layer: Sliding Window Reliability
Data Link Layer What does it do?
ECE 4450:427/527 - Computer Networks Spring 2017
SW: Sender Assign sequence number to each frame (SeqNum)
Data Link Layer: Data Link Control
COMP/ELEC 429/556 Introduction to Computer Networks
CSS432 Point-to-Point Links Textbook Ch2.1 – 2.5
CSCI-1680 Link Layer Reliability
Getting Connected (Chapter 2 Part 3)
Point-to-Point Links Outline Encoding Framing Error Detection
CSS432 (Link Level Protocols) Reliable Transmission Textbook Ch 2.5
Advanced Computer Networks
Error Detection Neil Tang 9/26/2008
Getting Connected (Chapter 2 Part 3)
The Transport Layer Reliability
Hardware Building Blocks
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:

Reliable transmission Outline Error detection Reliable transmission 2-Dec-18 4/598N: Computer Networks

Error Detection

Cyclic Redundancy Check Add k bits of redundant data to an n-bit message want k << n e.g., k = 32 and n = 12,000 (1500 bytes) Represent n-bit message as n-1 degree polynomial e.g., MSG=10011010 as M(x) = x7 + x4 + x3 + x1 Let k be the degree of some divisor polynomial e.g., C(x) = x3 + x2 + 1 2-Dec-18 4/598N: Computer Networks

Transmit polynomial P(x) that is evenly divisible by C(x) CRC (cont) Transmit polynomial P(x) that is evenly divisible by C(x) shift left k bits, i.e., M(x).xk subtract remainder of M(x).xk/C(x) from M(x).xk 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) 2-Dec-18 4/598N: Computer Networks

Any odd number of errors, as long as C(x) contains the factor (x + 1) Selecting C(x) All single-bit errors, as long as the xk and x0 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.6 on page 102 for common C(x) 2-Dec-18 4/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. 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); 2-Dec-18 4/598N: Computer Networks

Reliable Transmission

Acknowledgements and Timeouts ACK – Control frame sent back to peers saying that it successfully received an earlier frame If no ack without reasonable time, timeout and retransmit packet Automatic Repeat Request - ARQ 2-Dec-18 4/598N: Computer Networks

Acknowledgements & Timeouts Sender Receiver Sender Receiver Frame Frame imeout imeout ime T T ACK T ACK Frame imeout T ACK (a) (c) Sender Receiver Sender Receiver Frame Frame imeout imeout T T ACK Frame Frame imeout imeout T ACK T ACK (b) (d) 2-Dec-18 4/598N: Computer Networks

Problem: keeping the pipe full Example 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 Sender Receiver 2-Dec-18 4/598N: Computer Networks

Allow multiple outstanding (un-ACKed) frames Sliding Window Allow multiple outstanding (un-ACKed) frames Upper bound on un-ACKed frames, called window Sender Receiver T ime … 2-Dec-18 4/598N: Computer Networks

Assign sequence number to each frame (SeqNum) 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 LAR LFS … 2-Dec-18 4/598N: Computer Networks

Maintain three state variables SW: Receiver Maintain three state variables receive window size (RWS) largest frame acceptable (LFA) last frame received (NFE) Maintain invariant: LFA - LFR <= RWS Frame SeqNum arrives: if LFR < SeqNum < = LFA accept if SeqNum < = LFR or SeqNum > LFA discarded Send cumulative ACKs £ RWS NFE LFA … 2-Dec-18 4/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 2-Dec-18 4/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 2-Dec-18 4/598N: Computer Networks

Shared Access Networks Bus (Ethernet) Token ring (FDDI) Wireless (802.11)

Ethernet Overview History CSMA/CD Frame Format developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox, DEC, and Intel in 1978 similar to IEEE 802.3 standard CSMA/CD carrier sense multiple access collision detection Frame Format Dest addr 64 48 32 CRC Preamble Src Type Body 16 2-Dec-18 4/598N: Computer Networks

Bandwidth: 10Mbps, 100Mbps, 1Gbps Ethernet (cont) Addresses unique, 48-bit unicast address assigned to each adapter example: 8:0:e4:b1:2 broadcast: all 1s multicast: first bit is 1 Bandwidth: 10Mbps, 100Mbps, 1Gbps Length: 2500m (500m segments with 4 repeaters) Problem: Distributed algorithm that provides fair access 2-Dec-18 4/598N: Computer Networks

Transmit Algorithm If line is idle… If line is busy… send immediately upper bound message size of 1500 bytes must wait 9.6us between back-to-back frames If line is busy… wait until idle and transmit immediately called 1-persistent (special case of p-persistent) 2-Dec-18 4/598N: Computer Networks

Algorithm (cont) If collision… jam for 32 bits, then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes of data) delay and try again 1st time: 0 or 51.2us 2nd time: 0, 51.2, or 102.4us 3rd time51.2, 102.4, or 153.6us nth time: k x 51.2us, for randomly selected k=0..2n - 1 give up after several tries (usually 16) exponential backoff 2-Dec-18 4/598N: Computer Networks

Collisions A B A B A B A B 2-Dec-18 4/598N: Computer Networks