Professional Documents
Culture Documents
• In this section:
– Protocol efficiency:
– Effective data rates
– Utilization
– Stop and wait flow control efficiency
– ARQ flow control efficiency
1
Protocol Efficiency
• Can be measured in various ways
• One measure: effective data rate (EDR)
• Parameters:
– R: bit rate, in bits per second
– S: signal speed in transmission medium, in metres per
second
– D: distance to send, in metres
– T: time to create one frame, in seconds
– TF: frame, TA: acknowledgement
– F: frame size, in bits
– N: number of user data bits in a frame, in bits
– A: number of bits in an acknowledgement, in bits
2
Effective Data Rate calculation
• For an unrestricted protocol (i.e. no flow control,
or acknowledgements), the effective data rate
(EDR) is
N
EDR =
F time needed for one frame
T+
R
3
Example, for Stop-and-Wait
• Suppose:
– N = 160 bits, D = 200 ,A = 40 bits, TF = 1.5x10 s,
-6
N
=
D F+A
2 + TF + TA +
S R
160b
=
200m −6 −6 200b + 40b
2 + 1.5 × 10 s + 0.5 × 10 s +
2 ×108 m / s 1.0 ×107 b / s
≈ 5.7 ×106 b / s
WN
EDR =
D F
2 + TF +
• Srate: number
Actual efficiency depends on error R of frames re-transmitted,
etc.
5
Utilization
• Objective: obtain a measure of efficiency that is
independent of the transmission speed of the
medium.
• Simplifying assumptions:
– TF, TA are negligible
– A is much smaller than F, so that F+A ≈ F
6
Maximum Utilization (1)
• Time to send one frame and receive an acknowledgement is
D F
2 +
S R
• If the window size is W, the time to send W frames is
D F
W2 +
S R
• Actual time spent transmitting bits is
F
W
R
• Utilization (U) is the ratio of the actual time transmitting,
over the time needed to send and receive an
acknowledgement. The maximum utilization is
F
W
R 1
=
D F DR
W2 + 2 +1
S R FS 7
Maximum Utilization (2)
• Simplify by using the ratio of propagation time (D/S) to
transmission time (F/R)
DR
• Let a =
FS
– This is a pure ratio (i.e. no units).
– Another way of viewing the value a is that if one
normalizes the frame transmission time to 1, the “length”
of the link in bits is a frames.
9
Actual Utilization
• Example: Error free sliding window protocol.
– Send W frames, receive one acknowledgement.
– Case 2: W < 2a + 1
– A exhausts the window at time W, and
cannot send frames until time 2a+1.
Frame W W–a+2 W–a+1
A Ack B
Frame W a+2
A Ack B
10
Normalized Utilization
• For error-free sliding window:
1 W ≥ 2a + 1
U = W < 2a + 1
W
2a + 1
11
Utilization in the presence of errors
• Suppose that the probability of an error in a
frame is P.
1− P
• Stop and wait: U=
2a + 1
1− P W ≥ 2a + 1
• Selective Reject: U =
W (1 − P ) W < 2a + 1
2a + 1
1− P
W ≥ 2a + 1
1 + 2aP
• Go-back-N: U =
W (1 − P ) W < 2a + 1
( 2a + 1)(1 − P + WP ) 12
Utilization for P = 0.001
a 13
Logical Link Control (LLC)
• In the IEEE 802 series of standards for local area networks
(LANs), LLC is above the medium access control layer (MAC)
14
High-level Data Link Control (HDLC)
• Original source: IBM’s synchronous data link
control (SDLC)
15
HDLC Basics
• Stations:
– Primary: sends data, controls the link with
commands
– Secondary: receives data, responds to control
messages
– Combined: can issue both commands and responses
• Link configuration:
– Unbalanced: one primary station, one or more
secondary stations
– Balanced: two combined stations
16
HDLC Basics
• Data transfer modes (not a complete set; these are most
common)
– Normal response mode (NRM):
– Used with unbalanced configuration
– Primary initiates data transfer; secondary can only
reply
– Asynchronous balanced mode (ABM):
– Used with balanced configurations
– Either side may send data at any time
• Address modes
– Regular: sequence numbers have 3 bits
– Extended: sequence numbers have 7 bits
17
HDLC overall frame format
octets
1 variable 1 or 2 variable 2 or 4
ITU-T versions
of the CRC are used
bits 1 7
F address
• F bit:
– if 1, this is the final octet of the address
– if 0, another address octet follows
19
HDLC control field types
• Information (I-frames)
– Carries upper level data
– Also includes ARQ sequence numbers for sending and
receiving
20
I-frame control field
bits 1 3 1 3
regular
0 NS P/F NR mode
bits 1 7 1 7
extended
0 NS P/F NS mode
21
S-Frame Control field
bits 1 1 2 1 3
regular
1 0 S P/F NR
mode
• S field
– RR: receive ready (bits: 00)
– Positive acknowledgement, ready for I frame
– Used when no reverse data; otherwise NR sent in an I-frame
– RNR: receive not ready (bits 10)
– Positive acknowledgement, not ready to receive
– REJ: reject (bits 01)
– Negative acknowledgement, go-back-N ARQ method
– SREJ: selective reject (bits: 11)
– Negative acknowledgement, selective reject ARQ method
22
S-Frame Control field
bits 1 1 2 4 1 7
extended
1 0 S 0000 P/F NR
mode
23
U-frame control field
bits 1 2 1 3
1 1 M1 P/F M2
• SNRM: set normal response mode (M1 = 00, M2 = 001)
• SABM: set asynchronous balanced mode (M1 = 11, M2 = 100)
• SABME: set asynchronous balanced mode, extended (M1 = 11, M2 =
110)
• DISC: disconnect (M1=00, M2=010)
• UA: un-numbered acknowledgement (M1 = 00, M2 = 110)
• RSET: resets send and receive sequence numbers (M1 = 11, M2=001)
• FRMR: frame reject (M1 = 10, M2=001)
• (see Forouzan, Table 11.1, p. 286)
24
HDLC operation
• One of the messages SNRM, SABM, SABME, … is used
to set up the link initially.
– Sets the mode, and the length of sequence numbers
• UA is used as a positive acknowledgment for U-frames
• After setting up the link, data transfer can occur.
• The DISC message is used to terminate the connection.
• If a damaged U-frame is received, FRMR is sent as a
reply.
25
Connection
A B
SABM
UA
DISC
UA
26
Sample Two-Way Data Exchange
NR
NS
A B
Frame type
I,0,0
I,0,1
I,1,1 NR Sequence
numbers:
I,2,1 next message
expected
I,1,3
S,RR,2
Frame type
Message
NR 27
Go-Back-N ARQ
A B
I,0,0
I,1,0
I,2,0
S,REJ,1
I,1,0
I,2,0
I,3,0
28
Selective Reject ARQ
A B
I,0,0
I,1,0
I,2,0
S,SREJ,1
I,1,0
I,3,0
29
Receiver Busy
A B
I,3,0
S,RNR, 4
S,RR,0,P
S,RNR,4,F
S,RR,0,P
S,RR,4,F
I,4,0
30
Timeout
A B
I,0,0
I,1,0
I,0,0
I,1,0
S,RR,2
31