Understanding Acknowledgements, Timeouts, and Reliable Transmission, Slides of Computer Networks

An in-depth analysis of error control and reliable transmission techniques, focusing on acknowledgements (acks) and timeouts. Topics include automatic repeat request (arq), frame transmission, sender and receiver processes, and stop and wait protocol. Discover how these mechanisms ensure reliable data transfer and handle lost frames.

Typology: Slides

2012/2013

Uploaded on 04/27/2013

banoo
banoo 🇮🇳

4.5

(4)

43 documents

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Error control / Reliable
Transmission
Acknowledgements (acks)
Timeouts
acks: a short control frame (header
without data)
timeout: sender does not receive ack
within finite time retransmit
Using acks & timeout:
-Automatic Repeat Request (ARQ)
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Understanding Acknowledgements, Timeouts, and Reliable Transmission and more Slides Computer Networks in PDF only on Docsity!

Error control / Reliable

Transmission

  • Acknowledgements (acks) • Timeouts •^

acks:

a short control frame (header

without data) • timeout:

sender does not receive ack

within finite time retransmit • Using acks & timeout: • - Automatic Repeat Request (ARQ)

Frame ack

Timeout

sender

Receiver

Services

-^ Sender Process •^

Receiver Process

-^

Service primitives – sv = Send(buf, Size, srcSAP, destSAP) – rv = Receive(buf, Size, srcSAP, destSAP)

Idle DLL send / start Tx

Sender process:

Idle

Receiving End Rx / return

DLL Recv / start Rx Receiver Process:

Sending End Tx / return

Solution

  • Slow down sender
    • insert delay in sender (device drivers forplotters, printers) -^

Use feed back from receiver^ – send only after acknowledgement is received.

Stop and Wait Protocol

  • Sender sends one frame waits for an ackbefore proceeding.
    • What if ack lost – sender hangs, thereforetimeout. – What if receiver is not able to receive: stillhangs - number of tries!

Frame 0 ack 0

Timeout

Sender

Receiver

Sender

Receiver Frame 0ack 0 Frame 0ack 0

Timeout Frame 0^ Frame 0ack 0

Timeout

Sender

Receiver

Frame 0ack 0

Timeout

Sender

Receiver Frame 0ack 0

Basically require that the sender and receiver take care of all thesesituation.Sequence number:

Header includes sequence number^ modulo 2 counters

at receiver and sender

delay * BW = volumeHow many bits fit in the pipe? Suppose frame size is

1 KB

maximum sending rate: (bits / frame) / (time / frame)

182 kbps

182 of l

ink cap

acit

y

=^

=^

×^

×

What does delay * BW tell us?

67.5 kbps

can be transmit until an ack is expected.

Program as an FSM:

FSM = { states, events, actions}

DLL Send / start TxIdle

sending Ackawait

end of Tx

TimeoutstartTx Y / return

Sender Process: What if spurious ----reply

DLL Send / start Tx^ Idle

sending

Y / return

Ack await

N / discard^. ack?

End Tx

TimeoutstartTx

MakeAFrame(buffer, s)SendToPhysLayer(s)DLLState

Sending

else

error endif Sending: if event = EndTx then

DLLState

AwaitAck

endif

AwaitAck: if event = TimeOut then

increment numTriesif numTries > MaxTries then

DLLState

Idle

DLLReturn

Fail

else

SendToPhysLayer(s)DLLState

Sendif

endifelse if event = EndRcv then

if isAck and SegNo = ExpectedNo then

DLLState

Idle

send Success to upper layer else

discard ackDLLstate

AwaitAck

endif

←^ ← ←^ ←

Problem with Duplicate frame:^ - if ack lost, sender sends frame again.- Positive Acknowledgement with Retransmission- required sequence number on frame

DLL Recv / start Rx^ Idle

Awaitframe

End Rx / start Tx (ack)

Timeout /Fail

Y

Send frame to NWL and goto Idle

new N

pmodule Sender(event – eventType)

s – framebuffer – packetDLLStack – state of DLLwhile (event) docase DLLState if:

Idle : if event = DLLSend then

getFrame from NWL (buffer)MakeAFrame(buffer, s)DLLState

sending

SendTophysLayer(s)