Point-to-Point Links Outline Encoding Framing Error Detection

Slides:



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

Lecture 3, 1Spring 2003, COM1337/3501CCN: Direct Link Networks Direct Link Networks Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie,
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.
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 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.
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
William Stallings Data and Computer Communications 7th Edition
14-Oct-15Computer Networks1 Reliable Transmission.
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.
CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
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.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
1 CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
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.
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
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.
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.
Coding and Error Control
CS4470 Computer Networking Protocols
Reliable Transmission
Getting Connected (Chapter 2 Part 1)
Data Link Networks Hardware Building Blocks Nodes & Links CS380
Data Link Layer Flow Control.
B. R. Chandavarkar CSE Dept., NITK Surathkal
Advanced Computer Networks
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
CSS432 Point-to-Point Links Textbook Ch2.1 – 2.5
CSCI-1680 Link Layer Reliability
2. Getting connected (part 1)
Reliable transmission
Ion Stoica September 6, 2001 EE 122: Lecture 4 Ion Stoica September 6, 2001.
CSS432 (Link Level Protocols) Reliable Transmission Textbook Ch 2.5
Advanced Computer Networks
Error Detection Neil Tang 9/26/2008
Fundamentals of Computer Networks
CSCI-1680 Link Layer I Rodrigo Fonseca
Getting Connected (Chapter 2 Part 3)
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
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Point-to-Point Links Outline Encoding Framing Error Detection Sliding Window Algorithm

The Electromagnetic Wave Spectrum

Encoding Signals propagate over a physical medium modulate electromagnetic waves: x = A sin(wt+θ ) e.g., FSK, BPSK, QPSK, QAM-32, Encode binary data onto signals e.g., 0 as low signal and 1 as high signal known as Non-Return to zero (NRZ)

Problem: Consecutive 1s or 0s Low signal (0) may be interpreted as no signal High signal (1) leads to baseline wander Unable to recover clock

Alternative Encodings Non-return to Zero Inverted (NRZI) make a transition from current signal to encode a one; stay at current signal to encode a zero solves the problem of consecutive ones Manchester transmit XOR of the NRZ encoded data and the clock only 50% efficient (bit rate = 1/2 baud rate)

Encodings (cont) 4B/5B every 4 bits of data encoded in a 5-bit code 5-bit codes selected to have no more than one leading 0 and no more than two trailing 0s thus, never get more than three consecutive 0s resulting 5-bit codes are transmitted using NRZI achieves 80% efficiency

Encodings (cont)

Framing Break sequence of bits into a frame Typically implemented by network adaptor

Approaches Sentinel-based delineate frame with special pattern: 01111110 e.g., HDLC, SDLC, PPP problem: special pattern appears in the payload solution: bit stuffing sender: insert 0 after five consecutive 1s receiver: delete 0 that follows five consecutive 1s

Approaches (cont) Couter-based include payload length in header e.g., DDCMP problem: count field corrupted solution: catch when CRC fails

Approaches (cont) Clock-based each frame is 125us long e.g., SONET: Synchronous Optical Network STS-n (STS-1 = 51.84 Mbps)

Parity Check

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

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)

CRC (cont)

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)

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);

Reliable Transmission Stop-and-Wait ARQ (Automatic Repeat Request): ACK + Timeout Successful Tx (a) Retransmission (b) Duplicates, need sequence number (c) (d) A reasonable choice of timeout is 2RTT, considering other factors such as processing delay, queuing delay, etc.

Stop-and-Wait Efficiency Problem Sender Receiver Problem: keeping the pipe full Example 1.5Mbps link x 45ms RTT = 67.5Kb (8KB) 1KB frames implies 1/8th link utilization

Sliding Window Allow multiple outstanding (un-ACKed) frames Upper bound on un-ACKed frames, called window

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 ■ ■ ■ ─

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 < = LFR or SeqNum > LFA discarded Send cumulative ACKs RWS LFR LAF ■ ■ ■ < ─

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

Sliding Window Protocol: Functions Sliding window protocol serves three different funcitions Reliable transmission In-sequence delivery Flow control (ACK can also indicate the current receiver window size) Design issue: Is integrating three functions into a single mechanism (SWP) a wise design decision? What if one needs only one or two of the three functions?

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