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

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

Problem Statement. Physical and Data Link Layer Overview. Five Tasks Encoding. Make two computers talk to each other

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

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 2.

CSCI-1680 Link Layer I Rodrigo Fonseca

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

Links. CS125 - mylinks 1 1/22/14

Housekeeping. Fall /5 CptS/EE 555 1

Overview. Performance metrics - Section 1.5 Direct link networks Hardware building blocks - Section 2.1 Encoding - Section 2.2 Framing - Section 2.

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

CompSci 356: Computer Network Architectures. Lecture 4: Link layer: Encoding, Framing, and Error Detection Ref. Chap 2.2, 2.3,2.4

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

CSCI-1680 Link Layer Reliability John Jannotti

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

Direct Link Networks. Nodes. Links. Outline Building Blocks Encoding

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

CSE 461: Framing, Error Detection and Correction

Data Link Layer. Srinidhi Varadarajan

Reliable Transmission

Networking Link Layer

CSE 123A Computer Networks

Direct Link Networks. Lecture - Encoding & Framing 1. Areas for Discussion. Problems

Data Link Layer Overview

Some portions courtesy Robin Kravets and Steve Lumetta

Data Link Layer Overview

Data Link Layer Overview

Data Link Layer Overview

COMPUTER NETWORKS CS CS 55201

Chapter 2: Getting Connected

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Nov 1,

COMPUTER NETWORKS CS CS 55201

ECE 4450:427/527 - Computer Networks Spring 2017

L5: Building Direct Link Networks III. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

UNIT I FUNDAMENTALS & LINK LAYER

Reliable Byte-Stream (TCP)

Copyright 2010, Elsevier Inc. All rights Reserved

Direct Link Networks. Framing. Lecture - Encoding & Framing 1. Problems. Areas for Discussion

Data Communication & Computer Networks INFO

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

CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

L3: Building Direct Link Networks I. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Administrivia. FEC vs. ARQ. Reliable Transmission FEC. Last time: Framing Error detection. FEC provides constant throughput and predictable delay

Direct Link Networks (II)

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

CS 457 Networking and the Internet. Link Layer Protocols. Problems 8/31/16. Fall 2016 Indrajit Ray

Introduction to Computer Networks. 03 Data Link Layer Introduction

End-to-End Protocols. End-to-End Protocols

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due Thursday!

Transport Layer Marcos Vieira

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

Computer and Network Security

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

Data Link Layer (1) Networked Systems 3 Lecture 6

CSE 123: Computer Networks

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

Inst: Chris Davison

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

Computer Networking. Lecture 4 - Coding and Error Control

CSE123A discussion session

The Transport Layer Reliability

Chapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Link Layer (L2) Review

From Signals to Packets Computer Networking. Link Layer: Implementation. Datalink Functions. Lecture 5 - Coding and Error Control

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

EITF25 Internet Techniques and Applications L3: Data Link layer. Stefan Höst

From Signals to Packets Computer Networking. Link Layer: Implementation. Network Delay. 06-datalink.ppt, , Fall

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

CS422 Computer Networks

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

4. Error correction and link control. Contents

PART III. Data Link Layer MGH T MGH C I 204

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

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

CompSci 356: Computer Network Architectures Lecture 5: Reliable Transmission and Multi-access links Chapter 2.4, 2.5, 2.6

DATA LINK LAYER UNIT 7.

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.

Flow Control, and Congestion Control

CS 4453 Computer Networks Winter

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

Chapter 3. The Data Link Layer

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

Where we are in the Course

Ch. 7 Error Detection and Correction

CSE 123: Computer Networks

Telematics. 5rd Tutorial - LLC vs. MAC, HDLC, Flow Control, E2E-Arguments

CS321: Computer Networks Error Detection and Correction

Data Link Protocols. High Level Data. Control Protocol. HDLC Framing ~~~~~~~~ Functions of a Data Link Protocol. Framing PDUs. Addressing Destination

Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3)

Solutions for Chapter similar to 1 and 3

UNIT I FUNDAMENTALS & LINK LAYER

CSCI 466 Midterm Networks Fall 2011

Data Link Layer: Overview, operations

CS 640 Lecture 4: 09/11/2014

Goals of Today s Lecture. Adaptors Communicating

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

TCP. Sliding Windows, Flow Control, and Congestion Control. Networks : TCP Sliding Windows 1

Transcription:

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

Encoding Signals propagate over a physical medium modulate electromagnetic waves e.g., vary voltage Encode binary data onto signals e.g., 0 as low signal and 1 as high signal known as Non-Return to zero (NRZ) Bits 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0 NRZ Fall 2004 CS 691 2

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 Fall 2004 CS 691 3

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) Fall 2004 CS 691 4

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 Fall 2004 CS 691 5

Encodings (cont) Bits 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0 NRZ Clock Manchester NRZI Fall 2004 CS 691 6

Framing Break sequence of bits into a frame Typically implemented by network adaptor Bits Node A Adaptor Adaptor Node B Frames Fall 2004 CS 691 7

Approaches Sentinel-based delineate frame with special pattern: 01111110 e.g., HDLC, SDLC, PPP 8 16 16 8 Beginning sequence Header Body CRC Ending sequence 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 Fall 2004 CS 691 8

Approaches (cont) Couter-based include payload length in header e.g., DDCMP 8 8 8 14 42 16 Count Header Body CRC problem: count field corrupted solution: catch when CRC fails Fall 2004 CS 691 9

Approaches (cont) Clock-based each frame is 125us long e.g., SONET: Synchronous Optical Network STS-n (STS-1 = 51.84 Mbps) Overhead Payload STS-1 STS-1 STS-1 9 rows 90 columns Hdr STS-3c Fall 2004 CS 691 10

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) = x 7 + x 4 + x 3 + x 1 Let k be the degree of some divisor polynomial e.g., C(x) = x 3 + x 2 + 1 Fall 2004 CS 691 11

CRC (cont) Transmit polynomial P(x) that is evenly divisible by C(x) shift left k bits, i.e., M(x)x k 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) Fall 2004 CS 691 12

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.6 on page 102 for common C(x) Fall 2004 CS 691 13

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); } Fall 2004 CS 691 14

Acknowledgements & Timeouts Sender Receiver Sender Receiver Frame Frame ACK ACK Frame ACK (a) (c) Sender Receiver Sender Receiver Frame Frame ACK Frame Frame ACK ACK (b) (d) Fall 2004 CS 691 15

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

Sliding Window Allow multiple outstanding (un-acked) frames Upper bound on Sender un-acked frames, Receiver called window Fall 2004 CS 691 17

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 < SWS LAR Advance LAR when ACK arrives Buffer up to SWS frames LFS Fall 2004 CS 691 18

SW: Receiver Maintain three state variables receive window size (RWS) largest frame acceptable (LFA) last frame received (LFR) Maintain invariant: LFA - LFR <= RWS < RWS LFR LAF Frame SeqNum arrives: if LFR < SeqNum < = LFA accept if SeqNum < = LFR or SeqNum > LFA discarded Send cumulative ACKs Fall 2004 CS 691 19

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 Fall 2004 CS 691 20

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 Fall 2004 CS 691 21