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

Similar documents
06/05/2008. Chapter 3. The Data Link Layer. Data Link Layer Design Issues. Services Provided to the Network Layer. Error Control Flow Control

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

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

Inst: Chris Davison

Chapter 3. The Data Link Layer

Jaringan Komputer. Data Link Layer. The Data Link Layer. Study the design principles

CS422 Computer Networks

The Data Link Layer Chapter 3

Chapter 3. The Data Link Layer

The Data Link Layer. Data Link Layer Design Issues

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

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

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

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 Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

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

DATA LINK LAYER UNIT 7.

DLL: Flow Control DLL. Simplex. Fast sender / slow receiver scenario. Various protocols used. Simplified examples implemented in C.

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

The Data Link Layer Chapter 3

INF Data Communication Data Link Layer

1.Write about the Data Link layer design issues.

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.

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao

Lesson Schedule: Class No. Portion covered per hour (An estimate)

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

C08a: Data Link Protocols

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

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

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

Data Link Layer: Overview, operations

Lecture 7: Flow Control"

Data Link Layer, Part 5 Sliding Window Protocols. Preface

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

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

Computer Networks. Data Link Layer. Design Issues. Basic Services. Notes. Paolo Costa costa. Notes. Note.

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

Introduction to Data Communications & Networking

EEC-682/782 Computer Networks I

Networking Link Layer

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

3. Data Link Layer 3-2

Sequence Number. Acknowledgment Number. Data

Data Link Control Protocols

Data Link Control. Outline. DLC functions

Chapter 3 The Data Link Layer

Data Link Layer. Srinidhi Varadarajan

The Transport Layer Reliability

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

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

TCP : Fundamentals of Computer Networks Bill Nace


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

CSE 461: Framing, Error Detection and Correction

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

CSE 123: Computer Networks

EEC-484/584 Computer Networks

TCP/IP-2. Transmission control protocol:

Outline. CS5984 Mobile Computing

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

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

EEC-484/584 Computer Networks

Lecture 11 Overview. Last Lecture. This Lecture. Next Lecture. Medium Access Control. Flow and error control Source: Sections , 23.

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

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

4. Error correction and link control. Contents

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

COMPUTER NETWORKS UNIT-3

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

Hamming codes can also correct burst of errors by using iterleaving

CSE123A discussion session

Analyzation of Automatic Repeat Request (ARQ) Protocols

Chapter 11 Data Link Control 11.1

CSCI-1680 Link Layer I Rodrigo Fonseca

Data Link Layer (1) Networked Systems 3 Lecture 6

Computer Networking : Principles, Protocols and Practice

Chapter 11 Data Link Control 11.1

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

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

INTERNET ARCHITECTURE & PROTOCOLS

Data Link Layer Lecture 7

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

CMPE150 Midterm Solutions

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

NWEN 243. Networked Applications. Layer 4 TCP and UDP

Peer-to-Peer Protocols and Data Link Layer. Chapter 5 from Communication Networks Leon-Gracia and Widjaja

UNIT IV -- TRANSPORT LAYER

Chapter 11 Data Link Control 11.1

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

Telecommunication Protocols Laboratory Course

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

CSCI-1680 Link Layer Reliability John Jannotti

TCP: Flow and Error Control

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

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

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

Chapter 3: Transport Layer Part A

Data Link Control Protocols

Transcription:

EEC-484/584 Computer Networks Lecture 6 wenbing@ieee.org (Lecture nodes are based on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall) Outline Review Data Link Layer Design Issues Error Detection and Correction Data link layer Elementary Data Link Protocols Sliding Window Protocols 2 Data Link Layer Design Issues 3 Framing 4 Services Provided to the Network Layer Point-to-point, source-to-destination, wirelike How does DL layer form frames? Framing: Physical bit stream divided up into frames Error Control Acks and nacks Flow Control Sender may transmit frames faster than receiver can receive them Throttle sender so sends no faster than receiver can receive them Insert time gaps between frames Character count Flag bytes with byte stuffing Starting and ending flags, with bit stuffing Physical layer coding violations 1

Error-Correcting Codes 5 Error-Correcting Codes 6 N-bit codeword an n-bit unit containing data and check bits (m bits of data, r bits redundant/check bits) Given any two codewords, it is possible to determine how many corresponding bits differ, using exclusive OR and counting number of 1 bits in the result Hamming distance number of bit positions in which two codewords differ In general, all 2 m possible data messages are legal, but not all 2 n possible codewords are used Given the algorithm for computing the check bits, it is possible to Construct a complete list of legal codewords Find two codewords whose Hamming distance is minimum This distance is the Hamming distance of the complete code To detect d errors, need a distance d+1 code To correct d errors, need a distance 2d+1 code Hamming Code 7 Cyclic Redundant Code 8 The bits of codeword are numbered consecutively, starting with bit 1 at the left end, bit 2 to its immediate right and so on The bits that are powers of 2 (1,2,4,8,16,etc) are check bits The rest are filled up with the m data bits Each parity bit calculates the parity for some of the bits in the code word. The position of the parity bit determines the sequence of bits that it alternately checks and skips Set a parity bit to 1 if the total number of ones in the positions it checks is odd. Set a parity bit to 0 if the total number of ones in the positions it checks is even (assuming even parity is used) Sender and receiver agree on generate polynomial G(x), with high and low order bits = 1 To compute checksum for some frame with m bits corresponding to M(x) m > deg G(x) = r Append checksum to end of frame so polynomial T(x) corresponding to checksummed frame is divisible by G(x) When receiver gets checksummed frame, divides T(x) by G(x) If remainder R(x)!= 0, then transmission error 2

Elementary Data Link Protocols 9 Elementary Data Link Protocols 10 An Unrestricted Simplex Protocol A Simplex Stop-and-Wait Protocol A Simplex Protocol for a Noisy Channel Initial assumptions Physical, data link, network layers are independent processes Sender has infinite amount of data ready to send, supplied by network layer wire-like service: reliable, source ordered delivery Packet is treated as pure data When sender accepts packet from NL, it encapsulates in a frame with a header and trailer Elementary Data Link Protocols 11 Protocol Definitions 12 Receiver waits for arrived of frame, which generates an interrupt When frame arrives at receiver, hardware computes checksum If error then DLL informed event = chksum_err Else DLL informed event = frame_arrival DLL acquires frame from physical layer, checks control info in header If ok then passes packet to NL Continued 3

Protocol Definitions 13 Protocol Definitions 14 Unrestricted Simplex Protocol 15 Unrestricted Simplex Protocol 16 Additional assumptions Processing time insignificant Infinite buffer space Communication channel never loses or damages frames Uses no sequence numbers or acks Only event type frame_arrival 4

Unrestricted Simplex Protocol 17 Unrestricted Simplex Protocol 18 Simplex Stop-and-Wait Protocol Drop assumption Receiver processing time insignificant, or, equivalently, infinite input buffer at receiver Main problem To prevent sender from overwhelming the receiver If receiver takes t time units to execute from physical layer to network layer, sender must not transmit more than one frame per time t 19 Simplex Stop-and-Wait Protocol One solution too conservative Restrict sender so transmits so slowly that even if frame undergoes max delay no buffer overflows Better solution Receiver provides feedback to sender and gives sender permission to send next frame 20 5

Simplex Stop-and-Wait Protocol 21 Simplex Stop-and-Wait Protocol 22 Sender sends frame, stop and wait for ack Alternates between sender and receiver Half-duplex Simplex Stop-and-Wait Protocol 23 Simplex Protocol for Noisy Channel 24 Drop assumption Frames not damaged or lost Assumption If frame is damaged, receiver will detect it when it computes the checksum Possible solution Receiver sends ack if receives uncorrupted frame, discards frame if damaged Sender sends frame again if doesn t receive ack before timeout 6

Simplex Protocol for Noisy Channel Problem Receiver receives uncorrupted frame, sends ack Sender times out before receiving ack, sends frame again Receiver receives second copy uncorrupted has duplicate copies Solution Use sequence numbers: 1 bit suffices 25 Simplex Protocol for Noisy Channel Further considerations Timeout must be long enough so sender does not send duplicate when ack is on its way Timeout must allow Frame to get to receiver Receiver to process frame Ack to get to sender 26 Simplex Protocol for Noisy Channel 27 Simplex Protocol for Noisy Channel 28 Acks need to be matched against frames Sender remembers next_frame_to_send Receiver remembers frame_expected Protocols in which the sender waits for a positive acknowledgement before advancing to the next data item are often called Positive acknowledgement with retransmission (PAR), or, Automatic Repeat request (ARQ) 7

Simplex Protocol for Noisy Channel 29 A Simplex Protocol for a Noisy Channel 30 31 32 Sliding Window Protocols Sliding Window Protocols A One-Bit Sliding Window Protocol A Protocol Using Go Back n A Protocol Using Selective Repeat Efficiency improvements Use same circuit for data in both direction: full-duplex Interleave data and ack frames Use kind field to distinguish them B piggybacks its ack for A s frame onto B s next frame Savings of header in separate ack frame If B sends data frames infrequently, use timeout to determine when B should send ack in separate ack frame 8

Sliding Window Protocols 33 Sliding Window Protocols 34 Each frame contains sequence number in ranges 0..2 n -1 Sending window list of consecutive sequence numbers of frames that sender is permitted to send When new packet arrives from NL, it is given next highest sequence number, and upper edge of window is incremented When ack arrives from receiver, lower edge of window is incremented Within sending window, frame sent but not acked Sender must keep those frames for possible retransmission If max window size = w, need w buffers Sliding Window Protocols Receiving window list of consecutive sequence numbers of frames that receiver is permitted to accept When frame with (seq num = lower edge of window) arrives Frame is passed to NL Ack is generated Window slid down by 1 (remains same size as was initially) 35 Sliding Window Protocols A sliding window of size 1, with a 3-bit sequence number (a) Initially (b) After first frame sent (c) After first frame received (d) After first ack received 36 9

One-Bit Sliding Window Protocol Sender transmits frame, waits for ack before sending next frame next_frame_to_send which frame sender is trying to send frame_expected which frame receiver is expecting Sender initially Gets packet from NL Constructs frame Sends frame 37 One-Bit Sliding Window Protocol Receiver on arrival of frame Checks if it is duplicate If expected frame Passes frame to NL Slides its window up Sends ack back to sender indicating last uncorrupted frame it received 38 One-Bit Sliding Window Protocol 39 One-Bit Sliding Window Protocol Sender on receipt of ack If ack agrees with seq num of frame it is trying to send Gets next packet frame NL Constructs frame Sends frame Continued 10

One-Bit Sliding Window Protocol One-Bit Sliding Window Protocol No duplicate, no omissions, no deadlock, but inefficient 42 Two scenarios for protocol 4. (a) Normal case. (b) Abnormal case. The notation is (seq, ack, packet number) An asterisk indicates where a network layer accepts a packet Sliding Window Protocols Drop assumption Transmission time is negligible from sending till receiving ack Problem: sender blocks till receives acks (does not send another frame) Solution: pipelining Allow sender to send up to w frames before blocking 43 Sliding Window Protocols Problem: if frame in middle is lost or damaged, what to do with the frames following it Solution: two strategies Go Back n - all the frames following it are discarded Selective repeat nack the lost/damaged frame and retransmit that frame 44 11

Pipelining and Error Recovery 45 Go Back n 46 Go back n: Effect of an error when receiver s window size is 1 Drop assumption NL has infinite supply of packets network_layer_ready event added MAX SEQ frames outstanding at any instant Needs multiple timers, one per outstanding frame Sender Stores all frames in output buffer Must get acks in order in which frames are sent Selective repeat: Effect of an error when receiver s win. size is large Go Back n 47 Go Back n 48 Receiver Discards all frames following lost or damaged frame Works well If transmission errors rare and few retransmissions If lot of traffic in both directions a b c c a b 0 MAX_SEQ b c a 12

Go Back n 49 Go Back n Continued Go Back n 51 Go Back n 52 Continued Continued 13

Go Back n 53 Simulation of Multiple Timers in Software 54 14