















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Frame ack
Timeout
sender
Receiver
Services
-^ Sender Process •^
-^
Idle DLL send / start Tx
Sender process:
Idle
Receiving End Rx / return
DLL Recv / start Rx Receiver Process:
Sending End Tx / return
Solution
Stop and Wait Protocol
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
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
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)