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

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

Data Link Layer (part 2)

Flow control: Ensuring the source sending frames does not overflow the receiver

CS 4453 Computer Networks Winter

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

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

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

Data link layer functions. 2 Computer Networks Data Communications. Framing (1) Framing (2) Parity Checking (1) Error Detection

Data Link Control Protocols

William Stallings Data and Computer Communications. Chapter 7 Data Link Control

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

4. Error correction and link control. Contents

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

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

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

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

DATA LINK LAYER UNIT 7.

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

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.

Chapter 3. The Data Link Layer

Data Link Layer. Srinidhi Varadarajan

3. Data Link Layer 3-2

Data Link Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

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

Data Link Layer. Goals of This Lecture. Engineering Questions. Outline of the Class

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

Overview. Data Link Technology. Role of the data-link layer. Role of the data-link layer. Function of the physical layer

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

TYPES OF ERRORS. Data can be corrupted during transmission. Some applications require that errors be detected and corrected.

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

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

CSE123A discussion session

The flow of data must not be allowed to overwhelm the receiver

COMPUTER NETWORKS UNIT-3

Data Link Layer. Learning Objectives. Position of the data-link layer. MCA 207, Data Communication & Networking

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

Communication Networks. Part I

CS254 Network Technologies. Lecture 2: Network Models & Error Detection and Correction. Dr Nikos Antonopoulos

CS422 Computer Networks

Data Link Control Layer, Error Detection, Error Correction, and Framing


The Data Link Layer Chapter 3

Outline. EEC-484/584 Computer Networks. Data Link Layer Design Issues. Framing. Lecture 6. Wenbing Zhao Review.

CSE 461: Framing, Error Detection and Correction

Data Link Control Protocols

Inst: Chris Davison

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

Networking Link Layer

INTERNET ARCHITECTURE & PROTOCOLS

Chapter Six. Errors, Error Detection, and Error Control. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

Data Link Layer: Overview, operations

CSC 401 Data and Computer Communications Networks

Chapter 5 Data-Link Layer: Wired Networks

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

This Lecture. BUS Computer Facilities Network Management. Line Discipline. Data Link Layer

Lecture 2 Error Detection & Correction. Types of Errors Detection Correction

Analyzation of Automatic Repeat Request (ARQ) Protocols

The Data Link Layer Chapter 3

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione. Link Layer. Fundamentals of Communication Networks

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

UNIT IV -- TRANSPORT LAYER

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

Ch. 7 Error Detection and Correction

CS 455/555 Intro to Networks and Communications. Link Layer

Outline: Connecting Many Computers

Data Link Layer (1) Networked Systems 3 Lecture 6

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

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

CSE123A discussion session

INF Data Communication Data Link Layer

Data Link Layer Overview

CSE 123: Computer Networks

Lecture / The Data Link Layer: Framing and Error Detection

This Lecture. BUS Computer Facilities Network Management. Switching Network. Simple Switching Network

Problem Set Name the 7 OSI layers and give the corresponding functionalities for each layer.

Informal Quiz #01: SOLUTIONS

Lecture 8 The Data Link Layer part I. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

Data Link Layer Overview

Chapter 7: Data Link Control. Data Link Control Protocols

Data and Computer Communications

Chapter 7: Data Link Control. CS420/520 Axel Krings Page 1

Data Link Layer Overview

Computer and Network Security

STEVEN R. BAGLEY PACKETS

Chapter 10. Circuits Switching and Packet Switching 10-1

Data Link Layer Overview

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

Chapter 6 Digital Data Communications Techniques

UNIT-II 1. Discuss the issues in the data link layer. Answer:

The Link Layer and LANs. Chapter 6: Link layer and LANs

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

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

Data Link Layer, Part 5 Sliding Window Protocols. Preface

The MAC Address Format

Packet/Frame, Error Detection How to send data efficiently & reliably?

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

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

Chapter 5 Peer-to-Peer Protocols. School of Info. Sci. & Eng. Shandong Univ..

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Transcription:

I. INTRODUCTION (a) Network Topologies (i) point-to-point communication each station (i.e., computer, telephone, etc.) directly connected to all other stations (ii) switched networks (1) circuit switched eg. telephone network fixed path established for duration of call and path dedicated to that call only, regardless of whether data is being transferred INTRO 1

one switch network: - in practice, many switches in telephone network two switch network: "trunk" = shared link many channels or calls on one "wire", typically using Time Division Multiplexing (TDM) TDM each channel uses trunk for slot of time in round robin fashion INTRO 2

(2) packet switched eg. ATM networks data divided into "packets" and packets sent individually - i.e., paths used on a per packet basis and, hence, one link can carry packets from many different paths associated with different sessions (link is shared in time) - in general, switched communication requires less hardware many links replaced by few switches at the expense of increased complexity (iii) broadcast networks eg. local area networks (LANs) when one station transmits, all stations receive LAN architecture: INTRO 3

- small hardware complexity (no switches, few links) and control complexity distributed to stations rather than network (iv) hybrid combinations of (i), (ii), (iii) eg. the Internet (actually packet switching on top of different types of networks) (b) Packet Switching general view of switch or node: INTRO 4

- output queues required because if a link is busy sending a packet, other packets destined for that link must wait in a queue - input queues required because multiple packets entering a switch at once may require same switch resources (eg. links) and this may not be possible - not all switches have both input and output queues but all packets will be saved into a queue (or buffer of memory) at least once in a switch (c) Packet Format - many different packets for different protocols - typical format includes following fields: (d) Flow Control - required to ensure that a receiving node or server in a network does not have queues overflow because it is not processing packets as quickly as they arrive INTRO 5

(i) Stop-and-Wait Flow Control - transmitter sends packets and waits for short acknowledgement packet (call it an "ACK") before sending next packet - if receiver queues are filled, receiver can withhold ACK - problem: packets get delayed in network due to queuing at switches, propagation delays of electrical signals along links, and processing delay at receiver transmitted might have to wait long time for ACK before sending next packet inefficient Example: INTRO 6

INTRO 7

(ii) Sliding Window Flow Control - allows more than one packet sent at a time - uses "sequence number" of k bits, SN {0, 1,..., 2 k -1}, and increases SN by one modulo 2 k for every packet sent - up to W, where W = window size, packets can be outstanding (i.e., sent but ACK not yet received) - window slides along as packets acknowledged and new frames sent See figures. Example: INTRO 8

INTRO 9

(e) Error Control - packets travelling through networks can be (1) damaged: (2) lost: - packet arrives at destination but checksum fails eg. bit error in information field eg. packet dropped in network due to queue overflow or bit error in start flag causes packet to be undetected at destination - packets can be corrected by having receiver request retransmission of detected damaged packets or transmitter times out waiting for ACK "automatic repeat request" (ARQ) INTRO 10

(i) Stop-and-Wait ARQ - if received packet damaged, error detection techniques may allow the receive to detect error, in which case the receiver sends negative acknowledgement (NACK) to request retransmission and transmitter resends when NACK received - if receiver times out waiting for ACK due to lost packet or lost ACK, then packet resent - problem: What if ACK lost resulting in receiver getting duplicate frame? - solution: label ACKs ACK0/ACK1 indicates receiver ready for packet 0/1 "alternating bit protocol" See figure. (ii) Go-Back-N ARQ - based on sliding window flow control - basic concept: if packet i NACKed or timeout before ACK received, packet i and all subsequent packets retransmitted can result in retransmission of properly received packets inefficiency See figure must have W 2 k -1 usually, W = 2 k -1 for efficiency. INTRO 11

(iii) Selective Reject ARQ - similar to Go-Back-N except only damaged and lost packets retransmitted - more efficient than Go-Back-N but more complex at receiver because packets can be received out of order See figure must have W 2 k-1 W = 2 k-1 for efficiency (iv) "Piggybacking" ACKs - often ACKs/ NACKs are included as part of data packet even if ACK has already been sent, when packet sent, ACK will be resent Why is window size W picked to be W 2 k -1 for go-back- N and not W = 2 k, where k = number of bits in sequence number field? Consider W = 8, k = 3: say transmitter sends packet 0 and gets ACK 1 in packet then transmitter sends 8 frames: 1, 2, 3,..., 7, 0 and receives ACK 1 in packet Have all frames been acknowledged or have all frames been lost? use W = 7 to avoid Why should W 2 k-1 for selective reject? Can you answer? INTRO 12

(f) Error Detection How does the receiver detect damaged packets? (i) Parity Check - add bit to data block to ensure either: even number of 1s (even parity) odd number of 1s (odd parity) - consider adding a parity bit to an n-bit block of data parity easily implemented as XOR of bits d n-1 d n-2... d 1 d 0 p or = 0 (even parity) = 1 (odd parity) Example: - data is often stored/transmitted as 7-bit ASCII code + parity bit = 8-bit character -parity bit can be used to detect an odd number of errors but even number of errors will be undetected INTRO 13

(ii) Cyclic Redundancy Check (CRC) - adds r-bit frame check sequence (FCS) to n-bit data sequence with r < n - let T = (n+r)-bit frame M = n-bit message (i.e., first n bits of T) F = r-bit FCS (i.e., last r bits of T) P = special r+1 bit pattern used to generate FCS - consider arithmetic based on bit-wise modulo-2 addition uses bit-wise XOR (i.e., no carry or borrow) for addition and subtraction - FCS chosen so that T/P has no remainder - let T = 2 r M F M shifted left by r bits INTRO 14

How to choose F so that T/P has no remainder? Let 2 r M/P = Q R/P where R = remainder and must be r bits and set F = R Is T now divisible by P? T/P = (2 r M R) / P = (Q R/P) R/P = Q yes, divisible by P - let Γ represent the received vector such that Γ = T E where E = error vector with ones representing positions of bit errors eg. - error detection process: (1) at transmitter, divide 2 r M by P and use remainder as FCS (2) at receiver, divide Γ by P and if remainder of Γ/P = 0 then assume no error if remainder of Γ/P 0 then assume error INTRO 15

Example: INTRO 16

- often binary strings represented as polynomials eg. 1 1 0 0 1 x 4 + x 3 + 1 and polynomials with special properties define a CRC scheme - standard FCS exist such as "CRC-32" and "CRC-16" CRC-16: P(x) = x 16 + x 15 + x 2 + 1 - in general, 1st and last terms of P(x) must be non-zero and for a properly selected P(x) it can be shown that the following errors are detectable: (1) all single bit error patterns (2) all double bit error patterns (3) any odd number of errors, as long as P(x) has a factor of x + 1 (4) all burst errors with length less than FCS length (5) most larger burst errors - transmitter and receiver can use shift register to perform division by P(x) INTRO 17

- let input = 10110010011011 step c 5 c 4 c 3 c 2 c 1 c 0 c 5 +c 4 c 5 +c 3 c 5 +c 2 c 5 +input input c 5 ' c 4 ' c 3 ' c 0 ' 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 1 1 3 0 0 0 1 0 1 0 0 1 1 1 4 0 0 1 0 1 1 0 1 0 0 0 5 0 1 0 1 1 0 1 0 1 0 0 6 1 0 1 1 0 0 1 0 0 0 1 7 1 0 0 0 0 0 1 1 1 1 0 8 1 1 1 0 0 1 0 0 1 1 0 9 0 0 1 0 1 1 0 1 0 1 1 10 0 1 0 1 1 1 1 0 1 1 1 11 1 0 1 1 1 1 1 0 0 1 0 12 1 0 0 1 1 1 1 1 0 0 1 13 1 1 0 1 1 0 0 1 0 0 1 14 0 1 0 1 0 0 1 0 1 0 0 15 1 0 1 0 0 0 1 0 1 1 0 16 1 0 1 0 0 1 1 0 1 1 0 17 1 0 1 0 1 1 1 0 1 1 0 18 1 0 1 1 1 1 1 0 0 1 0 19 1 0 0 1 1 1 1 1 0 1 0 20 1 1 0 1 1 1 FCS INTRO 18

(g) Error Detection Calculations - typical channel model: bit errors occur randomly and independently and occur with probability of P e P e is called "bit error rate" (i) Parity Check Consider an n-bit character which has a parity bit added to it. Some things can be calculated: - probability of no errors in a character: - probability of one bit error in a character: INTRO 19

- probability of k bit errors in a character: - probability that error is detected: - probability that a character has undetected errors: Note that P(1) > P(2) >... so parity makes sense, since single bit errors most likely and these will be detected. Now consider a "packet" constructed of m n-bit characters where each character has a parity bit added to it. - probability of no errors in packet: INTRO 20

- probability packet has errors but that no errors are detected: - probability that packet has a detected error: INTRO 21

(ii) CRC Consider packet format: and assume CRC capable of detecting 1, 2, or 3 bit errors (in practice, CRCs detect more error patterns that this!) - probability of no errors: - probability of missed packet: INTRO 22

- probability that received packet must be retransmitted: - probability that errors are undetected in packet: - expected number of retransmissions assuming ACKs, NACKs not corrupted and assume P U << P R and P M << P R INTRO 23

(h) Communication Architectures - typical communication protocols are layered to (1) logically partition functionality (2) encourage development of standards - example 3 layer model for file transfer: INTRO 24

Application layer: - file transfer commands, file data Transport layer: header: Network layer: header: - ensures both ends are active and ready to communicate - ensures reliable delivery of data - destination application address - sequence number - CRC - interfaces to network for connection setup, etc. - destination computer address - network facilities request (eg. quality of service, priority) Open Systems Interface (OSI) Model: 7 layer framework for communication protocols See figures. INTRO 25