Beruflich Dokumente
Kultur Dokumente
• flow control specifies how much data the Sender can transmit before Sender waits for ACK after each frame transmission:
receiving permission to continue from the Receiver
• error control allows the Receiver to tell the Sender about frames damaged
or lost during transmission, and coordinates the re-transmission of those ACK can be a frame
frames by the Sender by itself, or a control
• since flow control provides the Receiver’s acknowledgement (ACK) of field in data frames
correctly-received frames, it is closely linked to error control going from Receiver to
Sender ((“piggybacking”)
piggybacking )
• basic idea of flow control: even if frames are received error-free, the
Receiver will be forced to drop some of them if the Sender transmits faster Note: wait times may
than the Receiver can pprocess them ⇒ signal g the Sender to slow down to a vary for
f diff
differentt frame
f
rate acceptable to the Receiver transmissions, as is the
• this signal can be explicit or implicit (e.g. delay sending ACK to Sender)
case here ⇒ can talk
• basic idea of error control: ACK every correctly-received frame and about average wait time
negatively acknowledge (NAK) each incorrectly-received frame
• Sender keeps copies of un-ACKed Frames to re-transmit if required
• want: packets (inside frames) passed to Receiver’s Network layer in order Ad
Advantage:
t simplicity.
i li it Disadvantage:
Di d t inefficiency
i ffi i (wait
( it times).
ti )
1 2
Note: neither Sender nor Receiver has this kind of “global picture”…
5 6
7
Automatic Repeat Request (ARQ)
Number Everything
Schemes
• Send frames and find out is they are in error by using error • Have to number the frame that is sent.
detection schemes • If the frame CRC is received okay then send an Acknowledgement
• Then if correct release to higher layers, if in error then get the (ACK) back to the transmitter.
transmitter to retransmit it again. • If the CRC has a remainder then we can send back to the
• The most common error detection schemes are based on the use of transmitter a Negative ACK or NACK.
y
Polynomial Codes,, which involves the computation
p of Cyclic
y • If we miss a frame then the timer kicks in.
Redundancy Check, CRC. • The sequence numbers are put in the control field which also tells
• This will tell is the frame is good or not, at least to many more us which type
yp of frame we have.
orders of reliability than the frame error probability. • N(S) sent frame number
• N(R)
( ) next requested
q frame
T = TRANSF+ ti
Ts time ffor propagation
ti + receiver
i processing
i +
reverse transmit + propagation + transmitter processing Terrestrial high speed link
g speed
• A high p ATM link with link speed
p of 620 Mb/s,, the frame
length, TRANSF = 0.7 us. If same length of cable, a > > 1
The hope is that before we run out of numbers to put in the frames we
will have an ACK.
ACK
The size of the link can be given by the ratio of round trip time to Satellite low speed link
TRANSF which is denoted by a • Satellites are g
generally
y about 36,000 km's above earth.
a = (Ts)/ TRANSF Propagation delay is 120 ms up and the same down, a = 6
Error Control: ARQ (Automatic Repeat Request) schemes Stop-and-wait ARQ
ARQ, damaged data frame
• if error(s) detected in received Frame, return NAK to Sender also known as ABP
(Alternating Bit Protocol)
• NAK can be explicit or implicit (Sender
(Sender’ss Timeout timer expires)
• Sender keeps a copy of each un-ACKed Frame to re-transmit if required
• ACK received by Sender for Frame ⇒ discard copy
• NAK received by Sender for Frame ⇒ decide how to re-transmit Frame Frame OK
0
• Sender starts Timeout timer for each Frame when it is transmitted
• appropriate
i t Timeout
Ti t value
l = the
th expected
t d delay
d l for
f Sender
S d to t receive
i Frame OK
ACK for the Frame (in practice, set Timeout slightly larger than this…) 1
Stop-and-wait ARQ
ARQ, lost data frame Stop-and-wait ARQ,
ARQ lost ACK
0
0
Frame OK
15 16
Stop-and-wait ARQ: Performance Analysis
• parameters: Sender Receiver
• Frame transmission time at Sender is TRANSF
• ACK/NAK transmission time at Receiver is TRANSA
• if ACKs are piggybacked ⇒ TRANSF = TRANSA, assuming Frames TRANSF
have equal (average) lengths in both directions
• link propagation delay is PROP PROP
• Frame processing time at Sender or Receiver is PROC
• probability
b bilit off F
Frame error iin S
Sender-Receiver
d R i direction
di ti is i p PROC
• probability of Frame error in Receiver-Sender direction is q ACK TRANSA
• Sender times out after TIMEOUT PROP
• assume Senderd hhas an endless
dl supply l of Networkk layer
l packets
k to transmit,
i so idle
idl
time at Sender is 0 PROC
Sender knows
• error-free
error free packet delivery takes TS = TRANSF + TRANSA + 2*(PROP + PROC) Frame was
and occurs with probability (1-p)*(1-q) received
correctly
• errored deliveryy takes TF and occurs with pprobability
y r = pp+(1-p)*q
( p) q
r = 1-(probability of error-free delivery), as expected time time
17 18
TRANSF TRANSF
PROP
lost
PROC
NAK TRANSA TIMEOUT
PROP
PROC
Sender knows Sender knows
Frame must be Frame must be
re-transmitted re-transmitted
TF = TS here TF = TRANSF
+ TIMEOUT here
time time time time
19 20
Stop-and-wait ARQ: Performance Analysis (cont
(cont.))
Sender • average number of Frame transmissions to successfully deliver 1 packet to
Receiver
Receiver is E = 1/(probability of error
error-free
free delivery) = 1/[(1
1/[(1-p)*(1-q)]
p) (1 q)] = 1/[1
1/[1-r]
r]
• therefore average packet delay in ARQ scheme is D = (E-1)*TF + TS
TRANSF
• therefore average packet throughput = 1/D and efficiency = TRANSF/D
• remember: efficiency is the fraction of the time new packets are delivered
a = 101
Log (BER)
Go-back-n ARQ
ARQ, damaged data frame Go-back-n ARQ
ARQ, lost data frame
NAK 3 means
re-transmit
Frame 3 (also
tells Sender that
all Frames before
Frame 3 were
received correctly)
Go-back-n ARQ
ARQ, lost ACK Go-back-n ARQ: Performance Analysis
• parameters: same as before
• assume optimum choice of TIMEOUT = TRANSA + 22*(PROP (PROP + PROC)
• assume Window is large enough that Sender can transmit continuously if there
are no transmission errors
• can show average packet delay is D = [TRANSF + r*TIMEOUT] / (1-r)
where r = p+(1-p)*q as before
• therefore
th f average packet
k t throughput
th h t = (1-r)
(1 ) / [TRANSF + r*TIMEOUT]
*TIMEOUT] andd
efficiency = [(1-r)*TRANSF] / [TRANSF + r*TIMEOUT]
• note that as r → 0, efficiency of Go-back-n
Go back n → 1 (or 100%): this shows that Go
Go-
} copies
discarded
back-n is capable of continuously delivering packets in the absence of errors
• under these conditions, you can show that the efficiency of Stop-and-wait
ACK 3 ARQ is [(1-r)*TRANSF] / [TRANSF + TIMEOUT]
• Stop-and-wait ARQ efficiency → TRANSF / [TRANSF + TIMEOUT] as
r → 0:
0 thi
this shows
h the
th built-in
b ilt i inefficiency
i ffi i off the
th Stop-and-wait
St d it approachh
27 28
Selective Repeat
Selective repeat ARQ,
ARQ damaged data frame
• Why go back and retransmit all the frames? Some might be good may be (slightly) more efficient
than Go-back-n ARQ, Q but also
• Only retransmit the bad frames! much more complicated…
• Improvement over Go Back N
• Att i th
Attains the theoretical
th ti l maximum
i throughput
th h t
• Out of order frames so must reorder them
• M
More complex
l transmitter
t itt andd receiver
i so only
l use when
h needed
d d error in
i
Frame 2
stored at
Packet Length
g 10,000
, bits
Stop
p and Wait
Log (BER)
Mathematical Analysis
Optimum
O ti Frame
F Length
L th v’s
’ BER
• If there are l bits of information in the frame and l’ bits of for 6 Byte header
overhead.
p = 1 - ( 1 - pb )( l + l’ )
High-level Data Link Control (HDLC) protocol High-level Data Link Control (HDLC) protocol: Modes
• mode = relationship between 2 communicating devices;
HDLC standardised
by ISO in 1979 describes who controls the link
now accepted by most • NRM = Normal Response Mode
other standards bodies
• ARM = Asynchronous
y Response
p Mode
(ITU T ANSI,
(ITU-T, ANSI …))
X.25 packet-switching networks • ABM = Asynchronous Balanced Mode
use a subset of HDLC called
LAPB (Li
(Link
kAAccess PProcedure,
d
Balanced) – e.g. in ISDN
3 types
yp of end-stations:
• Primary – sends commands
• Secondary – can only respond Any Either
to Primary’s commands
• Combined – can both command • in
i ARM,
ARM a secondary
d may iinitiate
iti t a transmission
t i i if the
th link
li k is
i idle,
idl but
b t the
th
and respond transmission must still be sent to the Primary for relaying to another secondary
as in NRM: only difference is that secondary needs permission from the
3 types of configuration Pi
Primary in
i NRM,
NRM but
b t doesn’t
d ’t needd permission
i i from
f the
th Primary
Pi in
i ARM
(Note: no balanced multipoint)
35 36
High-level Data Link Control (HDLC) protocol: Frames High-level Data Link Control (HDLC) protocol: Frames
Frame format: in back-to-back Frame transmissions, the end-flag of one
3 types
yp of Frames are Frame can be used as the start-flag
f g off the next Frame
defined (what is it about
the number 3?!?!):
• II-Frame
Frame – transports user
data and control info.
about user data (e.g. ACK) flag flag
• S-Frame
S Frame – supervisory
Frame, only used for Control field: ARQ is Go-back-7 (or Go-back-127 in “extended mode”)
transporting control info. N(S), N(R) 3 bits long
• U-Frame
UF – unnumbered
b d ⇒ window size = 7;
Frame, reserved for in “extended mode”,
system management N(S), N(R) 7 bits long
(managing the link itself) ⇒window size = 127
FCS = Frame Check
Sequence (or Checksum):
2-byte or 4-byte CRC
37 38
Datalink layer in the Internet PPP Example: user wants to send Network layer data
point-to-point links – 2 main possibilities:
• Serial Line IP (SLIP): defined in 1988
simple, character-oriented transmission: IP packet + framing flag negotiate options for establishing
the link (using LCP packets)
no error detection; no user authentication; only supports IP; doesn’t
support dynamic IP address assignment using
i some authentication
h i i protocoll
• Point-to-Point Protocol (PPP): defined in 1994 (e.g. user sends username & password)
character-oriented transmission: HDLC-like framing (similar to X.25),
Link Control Protocol (LCP),
(LCP) Network Control Protocol (NCP) negotiate options for Network
layer activity , then send data
supports: error detection; user authentication; multiple network (using NCP packets)
protocols e.g. IP, IPX, CLNP; dynamic IP address assignment