14
CS440 Computer Networks 1 Reliable Transmission Reliable Transmission Neil Tang Neil Tang 9/29/2008 9/29/2008

Reliable Transmission Neil Tang 9/29/2008

Embed Size (px)

DESCRIPTION

Reliable Transmission Neil Tang 9/29/2008. Outline. Basic Idea Stop-and-Wait Sliding Window Concurrent Logic Channels. Basic Idea. Acknowledgement: The receiver sends a small control frame back to the sender indicating it has received an earlier frame. - PowerPoint PPT Presentation

Citation preview

Page 1: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 1

Reliable TransmissionReliable Transmission

Neil TangNeil Tang9/29/20089/29/2008

Page 2: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 2

OutlineOutline

Basic Idea

Stop-and-Wait

Sliding Window

Concurrent Logic Channels

Page 3: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 3

Basic IdeaBasic Idea Acknowledgement: The receiver sends a small control frame back to

the sender indicating it has received an earlier frame.

Timeout: If the sender does not receive an acknowledgement after a reasonable amount time, then it re-transmits the original frame.

Automatic Repeat Request (ARQ): is the general strategy of using acknowledgements and timeouts to implement the reliable transmission.

Page 4: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 4

Stop-and-WaitStop-and-Wait

Basic Idea

After transmitting one frame, the sender waits for an ACK before transmitting the next frame. If the ACK does not arrive after a certain period of time, the sender times out and re-transmits the original frame.

Page 5: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 5

Stop-and-WaitStop-and-WaitSender Receiver

Frame

ACK

Sender Receiver

Frame

ACK

Frame

ACK

Sender Receiver

Frame

ACK

Frame

ACK

Sender Receiver

Frame

Frame

ACK

(a) (c)

(b) (d)

Four Cases:

Page 6: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 6

Stop-and-WaitStop-and-Wait

Sender Receiver

Frame 0

ACK 0

Frame 1

ACK 1

Frame 0

ACK 0

Sequence Number:

Page 7: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 7

Stop-and-WaitStop-and-Wait

Weakness

Inefficient in Bandwidth Usage: only one outstanding frame on the link at one time. For example, a link: capacity = 1.5Mbps RTT = 45 ms, frame size = 1KB.

Bandwidth in use = (10008)/0.045=178Kbps=1/8 capacity

Page 8: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 8

Sliding WindowSliding Window

Basic IdeaFill the “pipe”. Specifically, if the link has a delay bandwidth product of 8KB and frame size is 1KB, the sender should transmit the 9th frame when the ACK for the first frame arrives.

Sender Receiver

Page 9: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 9

Sliding WindowSliding Window

The SenderThe sender will retransmit every frame if timeout.

SWS: upper bound on the number of outstanding (unacknowledged) frames.

LAR: the sequence number of the last ACK received.

LFS: the sequence number of the last frame sent.

LFS = SWS+ LAR

< SWS

LAR LFS

■ ■ ■ ■ ■ ■ ─

Page 10: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 10

Sliding WindowSliding Window

The ReceiverFrames with sequence numbers in the window will be buffered, otherwise, discarded. The receiver acks all the frames or the highest-numbered frame received in order.

RWS: upper bound on the number of out-of-order frames that the receiver is willing to accept.

LFR: the sequence number of the last frame received and acked.

LAF: the sequence number of the largest acceptable frame.

LAF=LFR+RWS

RWS

LFR LAF

■ ■ ■ ■ ■ ■

< ─

Page 11: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 11

Sliding WindowSliding Window

Methods to Detect Frame Loss

Negative Acknowledgement (NAK): when receiving frame (i+1) but not frame i.

Additional Acknowledgement: send an additional ACK for frame LFR to indicate a frame loss.

Page 12: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 12

Sliding WindowSliding Window

Window Size

SWS = (bandwidth*delay)/packet size

RWS=1: no buffer

RWS=SWS: buffer any frame sent but out of order

Page 13: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 13

Sliding WindowSliding Window

The Number of Sequence Numbers (SeqNum_Space)

If RWS = 1, SeqNum_Space SWS + 1

If RWS = SWS, SeqNum_Space 2SWS

Check out the demo: http://www2.rad.com/networks/2004/sliding_window/

Page 14: Reliable Transmission Neil Tang 9/29/2008

CS440 Computer Networks 14

Concurrent Logic ChannelsConcurrent Logic Channels

Basic Idea:

Multiplex several logical channels on a single link and run stop-and-wait algorithm on each channel.