Reliable Transmission

Similar documents
Direct Link Networks (II)

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

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

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

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

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

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

LAN PROTOCOLS. Beulah A AP/CSE

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

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

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

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

Housekeeping. Fall /5 CptS/EE 555 1

Reliable Byte-Stream (TCP)

The Transport Layer Reliability

Chapter 2: Getting Connected

Computer and Network Security

Lecture 6. Reminder: Homework 2, Programming Project 2 due on Thursday. Questions? Tuesday, September 13 CS 475 Networks - Lecture 6 1

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Ethernet. Lecture 6. Outline. Ethernet - Physical Properties. Ethernet - Physical Properties. Ethernet

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

Networking Link Layer

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

CSCI-1680 Link Layer Reliability John Jannotti

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

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

CSCI-1680 Link Layer I Rodrigo Fonseca

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

Flow Control, and Congestion Control

Solutions for Chapter similar to 1 and 3

Introduction to Computer Networks. IEEE Ethernet

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

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

The Link Layer II: Ethernet

EE 122: Ethernet and

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

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

Link Layer (L2) Review

CSE 461: Multiple Access Networks. This Lecture

EECS 122, Lecture 7. Kevin Fall Jean Walrand

Transport Layer Marcos Vieira

Copyright 2010, Elsevier Inc. All rights Reserved

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

CPE 548 Exam #1 (50 pts) February 17, 2016

Data Communication & Computer Networks INFO

COMPUTER NETWORKS CS CS 55201

COMPUTER NETWORKS CS CS 55201

Outline: Connecting Many Computers

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

Shared Access Networks. Media Access Protocols. Ethernet (802.3) Ethernet cont...

Data Link Control Protocols

Link Layer: Retransmissions

Computer Network (2012 Spring) Homework Answer. Chapter2

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

Principles of Reliable Data Transfer

Local Area Networks. Aloha Slotted Aloha CSMA (non-persistent, 1-persistent, p-persistent) CSMA/CD Ethernet Token Ring

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Flow Control, and Congestion Control

6.033 Lecture 12 3/16/09. Last time: network layer -- how to deliver a packet across a network of multiple links

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CS 123: Lecture 12, LANs, and Ethernet. George Varghese. October 24, 2006

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Communication (III) Kai Huang

Data Link Layer, Part 3 Medium Access Control. Preface

Unit II. Part A (2 Marks)

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CS 716: Introduction to communication networks. - 9 th class; 19 th Aug Instructor: Sridhar Iyer IIT Bombay

CSE 461: Framing, Error Detection and Correction

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

Protocols for Multiaccess Networks

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Medium Access Protocols

STEVEN R. BAGLEY PACKETS

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

Lecture 7: Flow Control"

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

LAN. CS 4/55231 Internet Engineering. Kent State University Dept. of Computer Science

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

Link Layer and Ethernet

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

Physical and Link Layers. CS144 Review Session 6 November 6 th, 2008 Roger Liao Based on slides by Ben Nham

Data Link Layer, Part 5. Medium Access Control

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

The Link Layer and LANs: Ethernet and Swiches

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Summary of MAC protocols

Ethernet. Outline Multiple Access and Ethernet Intro Ethernet Framing CSMA/CD protocol Exponential backoff

Computer Networking Lecture 5 Data link Layer Access Control. Based on slides by Peter Steenkiste Copyright, Carnegie Mellon

CMPE 344 Computer Networks Spring Getting Connected. Reading: Peterson and Davie, 2.1,

CSE 461: Multiple Access. Homework: Chapter 2, problems 1, 8, 12, 18, 23, 24, 35, 43, 46, and 58

Links. Error Detection. Link Layer. Multiple access protocols. Nodes Links Frame. Shared channel Problem: collisions How nodes share a channel

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

CS 640 Lecture 4: 09/11/2014

Transcription:

Reliable Transmission How to fix corrupted frames. Error correcting codes too expensive Should discard frames (retransmission) Recover from Corrupt s should be done in the Link Level Data Link Networks - Part II 1 Reliable Transmission Recovery is accomplished with two mechanisms Acknowledgements (ACK) Small control frame (a frame with header only but no data) sent back indicating successful frame delivery Timeouts if the sender does not receive an ACK in a predetermined time the original frame is retransmitted. Data Link Networks - Part II 2

ARQ Algorithms The general strategy of using ACKs and timeouts to implement reliable delivery is called Automatic Repeat request (ARQ) Two ARQ algorithms: Stop-and-wait Sliding Window Data Link Networks - Part II 3 4 Scenarios for Stop-and-Wait Time Timeout Sender ACK Receiver Timeout Timeout Sender ACK ACK Receiver Problem: If there is lost/delayed ACK like in (c) and (d), sender will times-out and retransmits frame. Both (a) and (b) are fine (a) (c) The receiver believes it is the next frame. Timeout Timeout Sender ACK Receiver Timeout Timeout Sender ACK ACK Receiver What to do? A 1-bit sequence number included in the header (b) (d) Data Link Networks - Part II 4

Stop-and-Wait with 1-bit Sequence Number Include a 1-bit sequence number (with values of 0 or 1) in the header Sequence numbers used for each frame alternate Thus, when the sender retransmits frame 0, the receiver knows that it is a second copy of frame 0 rather than the first copy of frame 1 Sender Receiver frame 0 ACK0 frame 1 ACK1 frame 0 ACK0 Time Data Link Networks - Part II 5 Stop-and-Wait with 1-bit Sequence Number Main shortcoming Only one frame is sent at a time may underutilize the link capacity not keeping the pipe full Example: 1.5Mbps link x 45ms RTT Delay x bandwidth = 67.5Kb (~8KB). Assuming frame size of 1KB, stop-and-wait uses about one-eighth of the link's capacity. Want the sender to be able to transmit up to 8 frames before having to wait for an ACK. ( Sliding Window can do that ) Data Link Networks - Part II 6

Sliding Window Idea: Allow sender to transmit multiple frames before receiving an ACK, thereby keeping the pipe full.there is an upper limit on the number of outstanding (un-acked) frames allowed. Allow multiple outstanding (un-acked) frames Time Sender Receiver Upper bound on un-acked frames, called window Data Link Networks - Part II 7 Sliding Window: 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 LFS Advance LAR when ACK arrives Buffer up to SWS frames Data Link Networks - Part II 8

Sliding Window : Receiver Maintain three state variables receive window size (RWS) largest acceptable frame(laf) last frame received (LFR) Maintain invariant: LAF - LFR <= RWS LFR RWS SeqNum arrives: if LFR < SeqNum < = LAF accept if SeqNum < = LFR or SeqNum > LAF discarded Send cumulative ACKs LAF Data Link Networks - Part II 9 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 Data Link Networks - Part II 10

Shared Access Networks Outline Ethernet (802.3) Token Ring (802.5) Wireless (802.11) Data Link Networks - Part II 11 Ethernet (802.3) Xerox Palo Alto Research Center(PARC) created Ethernet in the mid-1970 s Uses a technology called Carrier Sense, Multiple Access with Collision Detect(CSMA/CD) Multiple Access nodes send/receive data over a shared link Carrier Sense all nodes distinguish between idle/busy link Collision Detection node monitors transmission and detects collision Data Link Networks - Part II 12

Ethernet (802.3) Beginnings in an early packet radio system called Aloha developed at the University of Hawaii DEC, Intel, and Xerox defined a 10 Mbps Ethernet standard in 1978. This formed the basis of the IEEE standard called 802.3. Wider collection of physical media Faster version 100 Mbps Fast Ethernet 1000 Mbps Gigabit Ethernet Data Link Networks - Part II 13 Ethernet Physical Properties Host Adaptor Transceiver Ethernet Cable Transceiver sends/receives data and detects when the line is idle Adaptor contains all the logic for the protocol (not the transceiver) Use Manchester encoding Data Link Networks - Part II 14

Ethernet Physical Properties: Hosts Terminators Repeater Repeater Repeaters join multiple Ethernet segments forwards signals on all outgoing segments can support up to 4 repeaters Terminators avoid bounce-back Can support up to 1024 hosts Data Link Networks - Part II 15 Ethernet Hub Hubs Multiway repeater (sometimes called hub) Data Link Networks - Part II 16

Access Protocol for Ethernet Controls access to the shared Ethernet link Called the Ethernet s Media Access Control (MAC) protocol Usually implemented in hardware on the adaptor Data Link Networks - Part II 17 Ethernet Format 64 48 48 16 32 Preamble Dest Src Type Body CRC Preamble synch bits for signal alternating O s and 1 s Type demultiplexing key (which of the higher level protocols does the frame belong?) Data Link Networks - Part II 18

Ethernet Addresses Ethernet adaptors have unique addresses Burned into ROM Series of six one-byte numbers(a pair of hexadecimal digits) 8:0:2b:e4:b1:2 00001000 00000000 00101011 11100100 10110001 00000010 Each manufacturer is assigned a 24-bit prefix Example: Advanced Micro Devices has been assigned the 24-bit prefix 8:0:20 Data Link Networks - Part II 19 Ethernet Addresses Ethernet adaptors receive all frames Ethernet adaptors accept: - frames addressed to its own address - frames addressed to the broadcast address - frames addressed to a multicast address - all frames, if placed into promiscuous mode (Note: an adaptor can be programmed to run in promiscuous mode) Data Link Networks - Part II 20

Ethernet Transmission Algorithm The sender s side is where the action is If an adaptor has a frame to send and the line is idle, the frames is transmitted immediately If an adaptor has a frame to send and the line is busy, it waits for the line to go idle then transmits immediately Collision - two adaptors find the line idle do they transmit their packets which collide 96-bit transmission if adaptor detects collision (64b preamble + 32b jamming sequence) Once a collision is detected and stopped the adaptor will wait some time and try again. This time is called exponential backoff - each time it tries to transmit but fails results in doubling the delay interval between tries Data Link Networks - Part II 21 Collisions A B A B A B A B Data Link Networks - Part II 22

Experience with Ethernet Works well for 30% or less utilization otherwise network capacity is wasted Most Ethernets have fewer than 200 hosts (1024 maximum) Easy to administer, there are no: - switches - routers Easy to add new hosts Data Link Networks - Part II 23 Network Adaptor -framing - error detection - media access protocol Network Adaptors ARQ(Automatic Repeat request) algorithm is typically handled one layer up running on the host Device Driver a collection of OS routines that effectively anchor the protocol graph to the network hardware Data Link Networks - Part II 24