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

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

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

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

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

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

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 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

CSCI-1680 Link Layer I Rodrigo Fonseca

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

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

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

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

ECE 4450:427/527 - Computer Networks Spring 2017

Networking Link Layer

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

Data Communication & Computer Networks INFO

Housekeeping. Fall /5 CptS/EE 555 1

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

Chapter 2: Getting Connected

CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

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

Reliable Transmission

Links. CS125 - mylinks 1 1/22/14

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

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

Data Link Layer Overview

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

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

Data Link Layer Overview

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

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

Data Link Layer Overview

CSE 461: Framing, Error Detection and Correction

Data Link Layer Overview

Data Link Layer (1) Networked Systems 3 Lecture 6

CS 4453 Computer Networks Winter

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

CSCI-1680 Link Layer Reliability John Jannotti

COMP/ELEC 429/556 Introduction to Computer Networks

Chapter 8 OSI Physical Layer

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

Data Link Layer: Overview, operations

Transport Layer Marcos Vieira

Principles of Reliable Data Transfer

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

Introduction to Computer Networks. 03 Data Link Layer Introduction

Inst: Chris Davison

Goals of Today s Lecture. Adaptors Communicating

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

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

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Reliable Byte-Stream (TCP)

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

The Transport Layer Reliability

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

CSEP 561 Connections. David Wetherall

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

DATA LINK LAYER UNIT 7.

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

CSEP 561 Connections. David Wetherall

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

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

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

CS 640 Lecture 4: 09/11/2014

Computer and Network Security

Comparison of ISO-OSI and TCP/IP Suit. Functions of Data Link Layer:

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

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

Direct Link Networks (II)

infrared Disadvantage: 1. cannot use for long-range communication or outside a building due to sun s rays.

CS422 Computer Networks

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

Copyright 2010, Elsevier Inc. All rights Reserved

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

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

Solutions for Chapter similar to 1 and 3

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.

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

COMPUTER NETWORKS CS CS 55201

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors

Data Link Control Protocols

CSE 123: Computer Networks

Flow Control, and Congestion Control

Computer Networking. Lecture 4 - Coding and Error Control

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

The Data Link Layer Chapter 3

COMPUTER NETWORKS CS CS 55201

Lecture 7: Flow & Media Access Control"

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

Packet? No. SenseCarrier. Discard packet attempts < 16. attempts == 16

Reliable Transport I: Concepts and TCP Protocol

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

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

Link Layer (L2) Review

UNIT IV -- TRANSPORT LAYER

Transmission SIGNALs

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

Transcription:

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

Outline Direct link networks (Ch. 2) Encoding Framing Error detection Reliable delivery Media access control Network Adapter rev 1.01 24/2/2004 2

Hardware Building Blocks Nodes Hosts: General-purpose computers Switches: Typically special-purpose H/W Routers Links Cooper with electronic signaling Glass fibre with optical signaling Wireless with electromagnetic (radio, Infra Red, Microwave) signaling rev 1.01 24/2/2004 3

rev 1.01 24/2/2004 4

Link Cooper Based Media Cat 5 Twisted Pair 10 100 Mbps 100m Thin Net Coax 10 100 Mbps 200m Thick Net Coax 10 100 Mbps 500m rev 1.01 24/2/2004 5

Link Optical Media Multimode Fibre 100 Mbps 2Km Singlemode Fibre 100-2400 Mbps 40Km rev 1.01 24/2/2004 6

Link Comparison Of Octical Media Single mode Lower attenuation (longer distances) Lower dispersion (higher data rates) Multi mode Cheap (IF vs Laser) Easier to terminate rev 1.01 24/2/2004 7

Link Advantages of optical communication higher bandwidths superior attenuation properties immune from electromagnetic interference no crosstalk between fibers thin, lightweight, and cheap (the fiber, not the optical-electrical interfaces) rev 1.01 24/2/2004 8

Link Wireless transmission 2.4 GHz radio 11 Mbps 7Km Infrared (IR) link 1 Mbps 9 m Geosynchronous satellite 600-1000 Mbps continent rev 1.01 24/2/2004 9

Services available from carriers rev 1.01 24/2/2004 10

rev 1.01 24/2/2004 11

Encoding (line coding) problems with signal transmission attenuation: signal power absorbed by medium dispersion: a discrete signal spreads in space noise: random background signals Problem is how are 0 s and 1 s detected at receiving node in a robust fashion rev 1.01 24/2/2004 12

Encoding Taxonomy Digital data, digital signal codes which represent bits our focus many strategies! Analog data, digital signal sampling to represent voltages Digital data, analog signal modulation to represent bits Analog data, analog signal modulation to represent voltages rev 1.01 24/2/2004 13

Non-Return to Zero (NRZ) 0 low signal; 1 high signal Poor clock synchronization when there is a long string of 1 s or 0 s rev 1.01 24/2/2004 14

NRZ-Inverted (NRZI) 1 make transition; 0 stay at the current level Addresses clock synchronization problem for long strings of 1 s still out of luck on consecutive strings of 0 s rev 1.01 24/2/2004 15

rev 1.01 24/2/2004 16

Manchester Encoding Each bit contains a transition 0 high-to-low transition 1 low-to-high transition Enables effective clock recovery at receiver Used by 802.3-10 Mbps Ethernet rev 1.01 24/2/2004 17

Manchester Encoding contd. Disadvantage: needs a clock that is twice as fast as the transmission rate 1 1 0 1 0 1 0 0 1 Manchester Clock rev 1.01 24/2/2004 18

4B/5B Encoding Tries to address inefficiencies in Manchester Idea is to insert extra bits in bit stream to break up long strings of 0 s or 1 s Every 4 bits of data are encoded in 5 bit code (see text for details) at most one leading 0 at most two trailing 0 s therefore never more than three consecutive 0 s Uses NRZI to put bits on wire reason why code focused on zeros rev 1.01 24/2/2004 19

Framing Blocks of data (not just sequences of bits) are exchanged across links --- frames Problem: how to tell where a frame begins and where it ends rev 1.01 24/2/2004 20

Character-Based Framing Special characters (tags) are used to indicate idle fill (ASCII SYN), start of text (STX) and end of text (ETX) Used by PPP (point-to-point protocol) Problem: what if tag characters occur in packet data rev 1.01 24/2/2004 21

Character-Based Framing contd. Solution: Insert extra escape characters when a tag appears in data field rev 1.01 24/2/2004 22

Bit-Oriented Framing Each frame begins with a start and end bit sequence (flag) 01111110 = 01 6 0 is the usual flag Example: HDLC (high-level data link protocol) Problem: what if flag appears in body rev 1.01 24/2/2004 23

Bit Stuffing Sender: inserts a 0 after five consecutive 1s Receiver: when it sees five 1s makes decision based on next two bits if next bit 0 (this is a stuffed bit), remove it if next bit 1, look at next bit if 0 this is end of frame (receiver has seen 01111110) if 1 this is an error, discard frame (receiver has seen 01111111) rev 1.01 24/2/2004 24

Bit Stuffing Example rev 1.01 24/2/2004 25

Framing with Length Fields Detecting the end of the frame done by sending length information (e.g. number of bytes in the frame) in the header Used by DECNET s DDCMP Q: Is a flag still needed at the start of the frame? rev 1.01 24/2/2004 26

Digital transmission over analog modulation to represent bits amplitude (AM) frequency (FM) phase/phase shift combinations of these rev 1.01 24/2/2004 27

rev 1.01 24/2/2004 28

rev 1.01 24/2/2004 29

rev 1.01 24/2/2004 30

Error Detection Bit errors can be introduced in packets This problem has been studied for a long time Error detection (and correction) codes Cyclic redundancy check (CRC) is a common error detection method Basic idea of any scheme is to add redundant data A primary goal is to send minimal amount of redundant data Another goal is to make generation of code fast rev 1.01 24/2/2004 31

Error Detection We use error-detecting codes to help detect errors Example code: Consider the function that duplicates each bit in the message E.g. the message 1011001 would be mapped to the code 11001111000011, and then transmitted to the sender. The receiver knows that bits come in pairs. If the two bits in a pair are different, it declares that there was a bit error. rev 1.01 24/2/2004 32

Parity Parity added to make @ 1s even/odd If parity is wrong 0 1 1 1 0 1 0 1 1 ERROR If parity is right NO ERROR (or an even number of errors has occurred) rev 1.01 24/2/2004 33

Two-Dimensional Parity Q: If an error is detected in this scheme, is it also correctable? rev 1.01 24/2/2004 34

Two-Dimensional Parity 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 1 1 1 One error Example Three errors 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 1 1 1 Arrows indicate failed check bits 1 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 Two errors Four errors rev 1.01 24/2/2004 35

Internet Checksum Used by IP, TCP, UDP,... Method Break message as a sequence of 16-bit integers Add these integers using 16-bit one s complement arithmetic Take the one s complement of the result Resulting 16-bit number is the checksum It s simple to implement Reason why it s used despite relatively weak detection capability rev 1.01 24/2/2004 36

Reliable Transmission Big Q: How do we send a packet reliably when it can be lost and/or corrupted in the network? Mechanisms Acknowledgements Timeouts Simplest reliable protocol: Stop and Wait send a packet stop and wait until an ACK arrives from the receiver retransmit if timeout occurs before ACK arrives rev 1.01 24/2/2004 37

Stop and Wait rev 1.01 24/2/2004 38

Recovering from Errors rev 1.01 24/2/2004 39

Reliable Transmission How does the receiver recognize a duplicate transmission (e.g. in the case of a lost ACK)? Solution: Put sequence number in packet Performance No pipeline effect Example For a l.5 Mbps link with 45 ms RTT Bandwidth-delay product = 67.5 Kb (8KB) 1KB packets imply 1/8th link utilization Solution: Sliding Window Protocols rev 1.01 24/2/2004 40

How do we keep the pipe full? Send multiple packets without waiting for the first to be ACKed Upper bound on un-acked packets, called Sender Receiver window Time rev 1.01 24/2/2004 41

Sliding Windows: Sender State Packets sent and ACKed (LAR = last ACK received) Packets sent but not ACKed (buffer for SWS packets) Packets not yet sent (LFS = last packet sent) Keep LFS - LAR SWS SWS LAR LFS Advance LAR when ACK arrives rev 1.01 24/2/2004 42

State Sliding Windows: Receiver Packets received and ACKed (NFE = next frame expected, LFR = last packet received) Packets received out of order (buffer for RWS packets) Packets not yet received (LFA = last frame acceptable) Keep LFA - LFR RWS RWS LFR LFA rev 1.01 24/2/2004 43

What if we lose a packet? Selective repeat/ack (SACK) Receiver sends ACK for each packet in window On timeout, sender resends only the missing packet Proposed for TCP Go back N with buffering out-of-order packets (TCP) Receiver ACKs got up through packet k If multiple packets are received, only one ACK is needed On timeout, sender restarts from k + 1 Different from traditional Go back N rev 1.01 24/2/2004 44

Traditional Go back N window size 4 Go back N with buffering window size 4 rev 1.01 24/2/2004 45

Sender Algorithm Send full window, set timeout On ACK If it increases LAR (packets sent and ACKed) send remaining packets in window On timeout Resend all outstanding packets starting from LAR + 1 (first packet not yet ACKed) rev 1.01 24/2/2004 46

Receiver Algorithm On packet arrival If packet is the NFE (next frame expected) Else Send ACK Increase NFE Deliver packet(s) to the upper layer (could fill hole in buffer) Send ACK Discard if < NFE or > LFA rev 1.01 24/2/2004 47

How to determine timeouts? Problem: If timeout too small, useless retransmits If timeout too large, low utilization (pipe not full) Solution: On direct link, timeout 2 x PROP Trickier to estimate at transport layer RTT varies with congestion, route changes, etc. rev 1.01 24/2/2004 48

Sequence Number Space Recall seq # (SeqNum) cannot grow arbitrarily SWS MaxSeqNum - 1 is not sufficient Suppose 3-bit SeqNum field (0 7) SWS = RWS = 7 sender transmits packets 0..6 arrive successfully, but ACKs lost sender retransmits 0..6 receiver expecting 7, 0..5, but receives the original incarnation of 0..5 SWS (MaxSeqNum + 1)/2 is correct rule rev 1.01 24/2/2004 49

Sliding Window Summary Sliding window is best known algorithm in networking First role is to enable reliable delivery of packets Timeouts and acknowledgements Second role is to enable in order delivery of packets Receiver doesn t pass data up to app until it has packets in order Third role is to enable flow control Prevents sender from overflowing receiver s buffer rev 1.01 24/2/2004 50