Direct Link Networks (II)

Similar documents
Reliable Transmission

The Transport Layer Reliability

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

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

Flow Control, and Congestion Control

LAN PROTOCOLS. Beulah A AP/CSE

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

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

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

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

Housekeeping. Fall /5 CptS/EE 555 1

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

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

Flow Control, and Congestion Control

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Ethernet. Introduction. CSE 3213 Fall 2011

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

Lecture 7: Flow Control"

Computer and Network Security

CSCI-1680 Link Layer Reliability John Jannotti

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

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Transport Layer Marcos Vieira

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

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Networking Link Layer

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

Link Layer and Ethernet

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

Principles of Reliable Data Transfer

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

Lecture 6: Example LAN: Ethernet

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

Link Layer and Ethernet

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

CSMA/CD (Collision Detection)

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

CSE 461: Multiple Access Networks. This Lecture

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

Reliable Byte-Stream (TCP)

Data Link Layer, Part 5. Medium Access Control

Link Layer (L2) Review

EE 122: Ethernet and

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

CSCI-1680 Link Layer I Rodrigo Fonseca

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

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

Data Link Control Protocols

Introduction to Computer Networks. IEEE Ethernet

Data Link Layer, Part 3 Medium Access Control. Preface

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

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

Communication (III) Kai Huang

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

Data and Computer Communications. Chapter 11 Local Area Network

Chapter 2: Getting Connected

Data Communication & Computer Networks INFO

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Data Link Layer -2- Network Access

Protocols for Multiaccess Networks

CPE 448/548 Exam #1 (100 pts) February 14, Name Class: 448

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

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

Outline: Connecting Many Computers

Data Link Layer -2- Network Access

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

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

ECE697AA Lecture 3. Today s lecture

Introductory to Computer Networks Local Area Networks. Lecture 16 Fall Isfahan University of technology Dr.

ECE 333: Introduction to Communication Networks Fall Lecture 19: Medium Access Control VII

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

Multiple Access Protocols

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

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

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

Solutions for Chapter similar to 1 and 3

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

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

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

Part3. Local Area Networks (LAN)

1999, Scott F. Midkiff

Chapter 8 LAN Topologies

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

Lecture 7: Flow & Media Access Control"

CMPE 257: Wireless and Mobile Networking

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Midterm Review EECS 122. University of California Berkeley

Computer Networks Principles LAN - Ethernet

Data and Computer Communications

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

Media Access Control. Networked Systems (H) Lecture 5

Computer Network (2012 Spring) Homework Answer. Chapter2

Computer Networks. Medium Access Sublayer (Part I)

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Transcription:

Direct Link Networks (II) Computer Networking Lecture 03 HKU SPACE Community College January 30, 2012 HKU SPACE CC CN Lecture 03 1/25

Outline Reliable Link Service Stop-and-Wait Sliding Window Media Access Control Ethernet HKU SPACE CC CN Lecture 03 2/25

Reliable Transmission To correct errors occurred in a transmission, reliable transmission methods is desirable. We can achieve reliable transmission through two fundamental building blocks: acknowledgments (ACK) and timeouts. For acknowledgments, there are two methods, i.e., positive and negative. To make it work, acknowledgment is accompanied with a timeout mechanism, that is, either the receiver or the sender will set a timer, whenever there is a timeout, retransmission occurs. HKU SPACE CC CN Lecture 03 3/25

Reliable Transmission (Cont d) Using positive ACK and timeouts to implement reliable delivery is called automatic repeat request (ARQ). In ARQ, sender assigns a sequence number to each frame. After send out a frame, sender keeps the sent frame in its buffer until it receives the ACK for that frame from receiver. Then the sender deletes the frame from its buffer. Common ARQs are Stop-and-Wait Sliding window In some cases, ACK can be accumulative, e.g., receiving an ACK for frame 4 implies frames 1-3 are correctly received. HKU SPACE CC CN Lecture 03 4/25

Stop-and-Wait Stop-and-wait is the simplest ARQ algorithm. After transmitting a frame, the sender waits for an ACK before transmitting a new frame. If the ACK does not arrive after a certain period of time, the senders times out and retransmits the original frame. To avoid receiving duplicate copies of a frame, one-bit sequence number will be used in the header for a stop-and-wait protocol. Sequence numbers 0 and 1 will be used alternatively. HKU SPACE CC CN Lecture 03 5/25

Stop-and-Wait (Cont d) Figure: Four different scenarios for the stop-and-wait algorithm. HKU SPACE CC CN Lecture 03 6/25

Stop-and-Wait (Cont d) Stop-and-wait is simple to implement, on both sender and receiver sides. However, stop-and-wait only achieves a very low throughput, especially in a high-speed link. Because the maximum number of unacknowledged frames is one, it does not keep the pipe full. In the best case, only one frame can be sent in a round-trip time. When errors occur, an additional number of round-trip times is required. HKU SPACE CC CN Lecture 03 7/25

Sliding Window In sliding window protocol, the maximum number of unacknowledged frames may be more than one. A sender may continue to send frames even when acknowledgments for previously sent frames are not received. Both sender and receiver need to keep track of the states of the frames, (sent, received, acked, and unacked,) such that the pipe is just full and the sender is able to retransmit a frame when error occurs. The size of a so-called window determines the maximum number of unacked frames allowed on the sender side. HKU SPACE CC CN Lecture 03 8/25

Sliding Window (Cont d) Figure: Timeline for the sliding window algorithm. HKU SPACE CC CN Lecture 03 9/25

Sliding Window - Sender Side The sender assigns a sequence number, starting from 1, to each frame. The sender maintains three variables: send window size (SWS): the upper bound of unacked frames that the sender can transmit. last acknowledgment received (LAR): the maximum sequence number has been already acknowledged by the receiver. last frame sent (LFS): the maximum sequence number has been already sent by the sender. We should always have LFS LAR LFS = LAR: All frames sent have been acknowledged. LFS > LAR: LFS - LAR frames are yet to be acknowledged. To make the algorithm work, the sender must make sure LFS - LAR SWS. HKU SPACE CC CN Lecture 03 10/25

Sliding Window - Sender Side (Cont d) When LFS - LAR = SWS, the window is said to be full, and no more new frames can be sent before the (LAR+1)th frame is acknowledged. LFS is initialized to 0, and is incremented by 1 after each frame is sent. LAR is also initialized to 0, and is increased according to the new sequence number(s) acknowledged by the receiver. The sender associates a timer with each frame transmitted, and it retransmits the frame when the associated timer expires before an ACK is received. The sender backups up to SWS frames in case a retransmission is needed. HKU SPACE CC CN Lecture 03 11/25

Sliding Window - Sender Side (Cont d) Figure: Sliding window algorithm. HKU SPACE CC CN Lecture 03 12/25

Sliding Window - Receiver Side The receiver maintains three state variables: receive window size (RWS): the maximum number of out-of-order frames that the receiver is willing to accept. largest acceptable frame (LAF): the maximum sequence number that is acceptable. last frame received (LFR): the sequence number of the last received frame. The receiver also maintains an invariant: LAF - LFR RWS. When a frame with sequence number SeqNum arrives: if LFR < SeqNum LAF, then the frame is accepted. if SeqNum LFR or SeqNum > LAF, the frame is discarded. When a frame is acknowledgeable, the receiver sends an ACK, which is also cumulative. When RWS=1, the receiver will not buffer out-of-order frames. When RWS=SWS, the receiver can buffer any frames the sender sent out. HKU SPACE CC CN Lecture 03 13/25

Sliding Window - Sequence Number Space SeqNum field is finite and will be wrapped around to reuse. Sequence number space must be larger than the number of outstanding frames. SWS MaxSeqNum -1 is not sufficient. A sufficient rule of the sequence number is SWS < (MaxSeqNum+1)/2. Intuitively, SeqNum slides between two halves of the sequence number space. HKU SPACE CC CN Lecture 03 14/25

To provide reliable service. Three Usages of ARQs To provide in-order service: the original order of the frames is preserved even when out-of-order frames are received. To provide flow control: prevent the sender from flooding the receiver; the sender may vary the value of the SWS by taking into account of the state of the receive buffer. HKU SPACE CC CN Lecture 03 15/25

Media Access Control How do multiple hosts share a single transmission medium efficiently? Different solutions result different LAN technologies. Ethernet (bus, star) Token ring, FDDI (ring) Wireless: Bluetooth, WiFi, WiMAX, Cell Phone ATM, Fast Ethernet, Gigabit Ethernet HKU SPACE CC CN Lecture 03 16/25

Ethernet Overview History developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox, DEC, and Intel in 1978 absorbed by IEEE 802.3 standard 100-Mbps and 1000-Mbps version are now available, but probably used in switched networks. CSMA/CD carrier sense multiple access collision detection HKU SPACE CC CN Lecture 03 17/25

Properties of Ethernet Hosts are connected to the cable (10base2/5/T) through network adapters. All the logic of the Ethernet protocol is implemented in the adapter. Constrains of the Ethernet: the maximum length of a segment the maximum number of repeaters between two hosts the maximum number of host the minimum bytes of a Ethernet frame: 64 bytes (header + 46 bytes of data) HKU SPACE CC CN Lecture 03 18/25

Properties of Ethernet (Cont d) Figure: Ethernet transceiver and adapter. HKU SPACE CC CN Lecture 03 19/25

Properties of Ethernet (Cont d) Figure: Ethernet repeater. HKU SPACE CC CN Lecture 03 20/25

Properties of Ethernet (Cont d) Figure: Ethernet hub. HKU SPACE CC CN Lecture 03 21/25

Properties of Ethernet (Cont d) Each adapter card is uniquely identified by a 48-bit (physical or MAC) address, e.g., 00-50-DA-26-CD-EE. An Ethernet adapter receives all frames and accepts frames addressed to its own address; broadcast frames; multicast frames, if it is in the group; all frames, if it is in promiscuous mode. Figure: Ethernet frame format. HKU SPACE CC CN Lecture 03 22/25

MAC of Ethernet Any adapter is able to distinguish a busy link from an idle link. If line is idle: send immediately upper bound message size of 1500 bytes must wait 9.6µs between back-to-back frames If line is busy: wait until idle and transmit immediately called 1-persistent (special case of p-persistent) Each adapter is able to detect frame collisions. If collision: jam for 32 bits, then stop transmitting frame delay and try again by using truncated exponential backoff 1st time: 0 or 51.2µs 2nd time: 0, 51.2, 102.4, or 153.6µs 3rd time: 0, 51.2, 102.4, 153.6,..., or k 51.2µs, k =0..7 nth time: k 51.2µs, for a random k =0..2 n 1, up to 1023. give up after several tries (usually 16) HKU SPACE CC CN Lecture 03 23/25

MAC of Ethernet (Cont d) Figure: Worst-case scenario. HKU SPACE CC CN Lecture 03 24/25

Acknowledgments Part of this slide set is referenced, prepared or/and extracted from the books: Computer Networks - A Systems Approach and the book Routing in the Internet. Also, some images and information are sourced from the Internet. This set of slides is for teaching purpose only. HKU SPACE CC CN Lecture 03 25/25