Вы находитесь на странице: 1из 6

Data link protocols

The

Direct Link Networks

objective is to reliably transmit data


between two nodes
Reliable data transfer is an issue dealt at
different layers of the protocol stack

Part 3

Data link protocols


We

consider three approaches:

Unrestricted

simplex protocol
Simplex stop-and-wait protocol
Simplex protocol for a noisy channel

Unrestricted Simplex Protocol


Consider

an ideal situation
What are the assumptions here that
pertain to reliable data transfer?
State all assumptions under which the
protocol below would work

Unrestricted Simplex
Protocol

Simplex Stop-and-Wait
Drop

the infinite receive capacity


assumption
That

is the receiver has finite buffer space


and rate limited such that it is unable to keep
up with the sender

Modify

A Simplex Protocol for a Noisy Channel

the first protocol

A Simplex Protocol for a Noisy Channel


(ctd.)

A positive
acknowledgement with
retransmission
protocol.
Continued

A positive acknowledgement with retransmission protocol.

Sliding Window Protocols


Generalize

Sliding Window Protocols (2)

the protocols to:

Duplex
Piggyback

ACK
Set windows at sender and receiver to denote
valid frames
Three

variants:

One-Bit Sliding Window Protocol


A Protocol Using Go Back N
A Protocol Using Selective Repeat

A One-Bit Sliding Window


Protocol

A sliding window of size 1, with a 3-bit sequence number.


(a) Initially.
(b) After the first frame has been sent.
(c) After the first frame has been received.
(d) After the first acknowledgement has been received.

A One-Bit Sliding Window Protocol


(ctd.)

Continued

Protocol in action

Protocol in action

Performance

Pipelined protocols

example: 1 Gbps link, 15 ms e-e prop. delay, 1KB packet:


Ttransmit =

Pipelining: sender allows multiple, in-flight,


yet-to-be-acknowledged pkts
range of sequence numbers must be increased
buffering at sender and/or receiver

L (packet length in bits)


8kb/pkt
=
= 8 microsec
R (transmission rate, bps)
10**9 b/sec

sender

L/R
RTT + L / R

.008
30.008

= 0.00027

U sender: utilization fraction of time sender busy


sending
1KB pkt every 30 msec -> 33kB/sec thruput over 1
Gbps link
network protocol limits use of physical resources!

Two generic forms of pipelined protocols: goBack-N, selective repeat

Go-Back-N
Sender:

k-bit seq # in pkt header


window of up to N, consecutive unacked pkts allowed

ACK(n): ACKs all pkts up to, including seq # n - cumulative ACK


may receive duplicate ACKs
timer for each in-flight pkt
timeout(n): retransmit pkt n and all higher seq # pkts in window

Selective Repeat

buffers pkts, as needed, for eventual in-order


delivery to upper layer

sender only resends pkts for which ACK not


received

Selective repeat: sender, receiver


windows

receiver individually acknowledges all


correctly received pkts

GBN in
action

sender timer for each unACKed pkt

sender window

N consecutive seq #s
again limits seq #s of sent, unACKed pkts

Selective repeat
sender

data from above :

if next available seq # in


window, send pkt

timeout(n):

receiver

pkt n in [rcvbase, rcvbase+N-1]

resend pkt n, restart timer

ACK(n) in
[sendbase,sendbase+N]:

mark pkt n as received


if n smallest unACKed
pkt, advance window
base to next unACKed
seq #

Selective repeat in action

send ACK(n)
out-of-order: buffer
in-order: deliver (also
deliver buffered, inorder pkts), advance
window to next not-yetreceived pkt

pkt n in [rcvbase-N,rcvbase-1]

ACK(n)

otherwise:

ignore

Selective repeat:
dilemma
Example:

seq #s: 0, 1, 2, 3
window size=3
receiver sees no
difference in two
scenarios!
incorrectly passes
duplicate data as new in
(a)

Q: what relationship
between seq # size and
window size?

Вам также может понравиться