Formula Sheets: Transport Layer | Computer Networks - Computer Science Engineering (CSE) PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


T r ansp ort La y er F orm ula Sheet
T ransp ort La y er Services
• Multiplexing/Dem ultiplexing : Maps so c k ets to p orts,N
so c k ets
= 2
16
(p ort n um b er limit).
• TCP Services : Reliable, connection-orien ted, flo w con trol, congestion con trol.
• UDP Services : Unreliable, connectionless,T
UDP
<T
TCP
due to minimal o v erhead.
TCP Segmen t Structure
• Segmen t Size : L
segmen t
= H +D , where H is header size (20-60 b ytes), D is data size (up to
65495 b ytes).
• Maxim um Segmen t Size (MSS) : MSS = MTU -(H
TCP
+H
IP
) , where MTU is maxim um
transmission unit,H
IP
= 20 b ytes (IPv4).
• Sequence Num b er : 32 bits, wraps around after 2
32
b ytes.
• A c kno wledgmen t Num b er : Next exp ected b yte,ACK
n
=SEQ
last
+L
data
.
Connection Managemen t
• TCP Three-W a y Handshak e:
– Setup Time: T
setup
=RTT +T
pro c
, whereRTT is round-trip time,T
pro c
is pro cessing time.
– Steps: SYN, SYN-A CK, A CK.
• TCP Connection T ermination (F our-W a y Close) :
– Close Time: T
close
= 2·RTT +T
pro c
(FIN, A CK, FIN, A CK).
– TIME-W AIT Duration: T
w ait
= 2·MSL , whereMSL is maxim um segmen t lifetime (t ypically
30-120s).
Flo w Con trol
• Receiv e Windo w : W
recv
=B
a v ailable
, whereB
a v ailable
is free buffer space.
• A dv ertised Windo w : W
adv
= min(W
recv
,W
cong
) , whereW
cong
is congestion windo w.
• Effectiv e Windo w : W
eff
=W
adv
-(SEQ
sen t
-ACK
receiv ed
) .
• Silly Windo w Syndrome A v oidance :
– Sender: Send only ifL
segmen t
=MSS orW
adv
=MSS .
– Receiv er: A dv ertiseW
recv
= min(
B max
2
,MSS) .
TCP Congestion Con trol
• Congestion Windo w : W
cong
, initialized to 1 MSS.
• Slo w Start : W
cong
=W
cong
+MSS p er A CK, exp onen tial gro wth un tilW
threshold
.
• Congestion A v oidance : W
cong
=W
cong
+
MSS
2
W cong
p er R TT (linear gro wth).
• F ast Retransmit : T riggered after 3 duplicate A CKs,W
cong
=
W cong
2
,W
threshold
=W
cong
.
• Timeout : W
cong
= 1·MSS ,W
threshold
=
W cong
2
.
• Throughput : S ˜
W cong·MSS
RTT
.
1
Page 2


T r ansp ort La y er F orm ula Sheet
T ransp ort La y er Services
• Multiplexing/Dem ultiplexing : Maps so c k ets to p orts,N
so c k ets
= 2
16
(p ort n um b er limit).
• TCP Services : Reliable, connection-orien ted, flo w con trol, congestion con trol.
• UDP Services : Unreliable, connectionless,T
UDP
<T
TCP
due to minimal o v erhead.
TCP Segmen t Structure
• Segmen t Size : L
segmen t
= H +D , where H is header size (20-60 b ytes), D is data size (up to
65495 b ytes).
• Maxim um Segmen t Size (MSS) : MSS = MTU -(H
TCP
+H
IP
) , where MTU is maxim um
transmission unit,H
IP
= 20 b ytes (IPv4).
• Sequence Num b er : 32 bits, wraps around after 2
32
b ytes.
• A c kno wledgmen t Num b er : Next exp ected b yte,ACK
n
=SEQ
last
+L
data
.
Connection Managemen t
• TCP Three-W a y Handshak e:
– Setup Time: T
setup
=RTT +T
pro c
, whereRTT is round-trip time,T
pro c
is pro cessing time.
– Steps: SYN, SYN-A CK, A CK.
• TCP Connection T ermination (F our-W a y Close) :
– Close Time: T
close
= 2·RTT +T
pro c
(FIN, A CK, FIN, A CK).
– TIME-W AIT Duration: T
w ait
= 2·MSL , whereMSL is maxim um segmen t lifetime (t ypically
30-120s).
Flo w Con trol
• Receiv e Windo w : W
recv
=B
a v ailable
, whereB
a v ailable
is free buffer space.
• A dv ertised Windo w : W
adv
= min(W
recv
,W
cong
) , whereW
cong
is congestion windo w.
• Effectiv e Windo w : W
eff
=W
adv
-(SEQ
sen t
-ACK
receiv ed
) .
• Silly Windo w Syndrome A v oidance :
– Sender: Send only ifL
segmen t
=MSS orW
adv
=MSS .
– Receiv er: A dv ertiseW
recv
= min(
B max
2
,MSS) .
TCP Congestion Con trol
• Congestion Windo w : W
cong
, initialized to 1 MSS.
• Slo w Start : W
cong
=W
cong
+MSS p er A CK, exp onen tial gro wth un tilW
threshold
.
• Congestion A v oidance : W
cong
=W
cong
+
MSS
2
W cong
p er R TT (linear gro wth).
• F ast Retransmit : T riggered after 3 duplicate A CKs,W
cong
=
W cong
2
,W
threshold
=W
cong
.
• Timeout : W
cong
= 1·MSS ,W
threshold
=
W cong
2
.
• Throughput : S ˜
W cong·MSS
RTT
.
1
TCP Timers
• Retransmission Timeout (R TO) :
RTO =RTT +4·RTT
dev
,
whereRTT is smo othed R TT,RTT
dev
is R TT deviation.
• Smo othed R TT :RTT = (1-a)·RTT +a·RTT
sample
,a˜ 0.125 .
• R TT Deviation : RTT
dev
= (1-ß)·RTT
dev
+ß·|RTT
sample
-RTT| ,ß ˜ 0.25 .
• P ersist Timer : T riggered whenW
adv
= 0 , prob es ev eryT
p ersist
˜ 1-60s .
• Keep-Aliv e Timer : T
k eep-aliv e
˜ 2 hours (default).
Congestion A v oidance Mec hanisms
• DECbit :
– Congestion Bit: Set if a v erage queue lengthQ
a vg
> 1 .
– Windo w A djustmen t: W
cong
=W
cong
·(1-d) if bit set, elseW
cong
=W
cong
+d ,d ˜ 0.1 .
• Random Early Detection (RED) :
– Drop Probabilit y: P
drop
=
?
?
?
?
?
0 ifQ
a vg
<Q
min
,
Q a vg-Q min
Q max-Q min
·P
max
ifQ
min
=Q
a vg
=Q
max
,
1 ifQ
a vg
>Q
max
.
– Q
a vg
= (1-w)·Q
a vg
+w·Q
curren t
, wherew is w eigh t (e.g., 0.002).
Qualit y of Service (QoS)
• Bandwidth : B =
D
total
T
total
, whereD
total
is data transferred.
• Latency : T
latency
=T
prop
+T
trans
+T
queue
+T
pro c
.
• Jitter : s
dela y
=
v
1
n
?
n
i=1
(d
i
-d)
2
, whered
i
is pac k et dela y ,d is mean dela y .
• P ac k et Loss Rate : P
loss
=
N
lost
N
total
.
UDP P erformance
• Header Size : H
UDP
= 8 b ytes.
• Throughput : S
UDP
=
L
data
T trans+T queue
, no retransmission o v erhead.
• Latency : T
UDP
=T
prop
+
L
pac k et
R
, whereR is data rate.
P erformance Metrics
• Round-T rip Time (R TT) :RTT = 2·T
prop
+T
trans
+T
queue
.
• Throughput : S =
L
effectiv e
RTT+T pro c
, whereL
effectiv e
excludes o v erhead.
• Go o dput : G =
L
application-data
T
total
, excludes retransmissions.
• Error Rate : P
error
= 1-(1-P
bit
)
L
, whereP
bit
is bit error rate,L is segmen t length.
2
Read More
23 videos|171 docs|81 tests
Related Searches

Semester Notes

,

MCQs

,

Formula Sheets: Transport Layer | Computer Networks - Computer Science Engineering (CSE)

,

Sample Paper

,

Extra Questions

,

mock tests for examination

,

ppt

,

video lectures

,

Exam

,

Previous Year Questions with Solutions

,

Important questions

,

Free

,

Objective type Questions

,

practice quizzes

,

Formula Sheets: Transport Layer | Computer Networks - Computer Science Engineering (CSE)

,

study material

,

Summary

,

shortcuts and tricks

,

Viva Questions

,

Formula Sheets: Transport Layer | Computer Networks - Computer Science Engineering (CSE)

,

past year papers

,

pdf

;