Oefeningen_1_TCP_deel_1_10_okt_07

advertisement
Communicatienetwerken
Oefeningenreeks 1
Hoofdstuk : Transport Laag
Woensdag 10 oktober 2007
1
VRAAG 1
S
A
100 m TP
100 kbit/s
of 10 Mbit/s
X
10 Gbit/s
vezel : 2000 km
Y
10 Gbit/s
100 m coax
B
10 x MSS
of 100 x MSS
A = FTP client, B = FTP server
Upload from A to B of a large file
MSS = 10 kbit
Receiver buffer : 10 or 100 x MSS
1 acc. Ack. from B to A if 10 or 100 MSS received
2
VRAAG 1 : delay ?
64 kbit/s
(transmission delay = 125 msec)
100 m
(propagation delay = 0)
See also Chapter 1 (part 1.6)
10 Gbit/s
(transmission delay = 0)
70.000 km (GEO satellite)
(propagation delay = 250 msec)
first bit
125 msec
last bit
use faster
access
line
Speed of light : 3 x 108 m/s
==> propagation delay
==> 0.7 x 108 (m)/3 x 108 m/s
use shorter
route
(transatlantic
Packet of 1 kByte (=8 kbit) over 64 kbit/s
fiber)
==> transmission delay
==> 8 (kbit) / 64 (kbit/s) = 125 msec
= 0.233 s (@250 msec)
propagation delay = delay due to wave (e.g. light) propagation speed
(3.108 m/s in air, 2.108 m/s in fiber)
3
transmission delay = time between first and last bit sent
VRAAG 1 : voorbeeld
A
B
100 m TP
10 Mbit/s
X
10 Gbit/s
Y
100 m coax
10 Gbit/s
10 x MSS
vezel : 2000 km
10 x MSS gives 1 Ack => transfer of 100 kbit
How long does it take ?
(1) 10 MSS from A to B :
A to X : propagation delay = 0, transmission delay = 100 (kb) / 10 (Mb/s) = 0.01 s
X to Y : propagation delay = 2 x 106 / 2 x 108 (m/s) = 0.01 s, trans. delay = 0
Y to B : prop. delay & trans. delay = 0 (short distance, very high bitrate)
(2) Ack from B to A :
ONLY propagation delay important (because ACK segment is very short)
Y to X gives 0.01 s
Total : 0.01 + 0.01 + 0.01 = 0.03 s for 100 kb gives : 100 / 0.03 kb/s = 3.33 Mb/s
4
VRAAG 1 : voorbeeld
A
B
100 m TP
10 Mbit/s
X
10 Gbit/s
Y
100 m coax
10 Gbit/s
10 x MSS
vezel : 2000 km
0.01 s
Acc.Ack.
5
VRAAG 1 : uitkomst andere stukken
Link AX
Link XY
Buffer B
Bitrate (Mbit/s)
100 kbit/s
Satelliet
10 x MSS
83 kbit/s
10 Mbit/s
Satelliet
10 x MSS
0.48 Mbit/s
10 Mbit/s
Vezel
10 x MSS
3.3 Mb/s
100 kbit/s
Satelliet
100 x MSS 98 kbit/s
10 Mbit/s
Vezel
100 x MSS 8.3 Mbit/s
6
VRAAG 2
• one way delay = 25 msec
• MSS = 1 kB
• application at sender bitrate = 1000 kByte/s = 1000 MSS/sec
• Receiver buffer = 4 kB = 4 MSS
• immediate acknowledgments
• sender sends every 5 msec one MSS (if allowed)
• receiver OPTION 1 : immediate processing
• receiver OPTION 2 : 15 msec processing / kB
(but first kB treated immediately, when receiver buffer empty;
and : if application process is ready, it will first take a new segment
before any action is taken at the TCP layer {e.g. send an ACK} )
• no congestion control, no slow start, no TCP set-up
-1- Make a detailed timing diagram (show Ack, Seq number, Rec. window, send window)
-2- Compare throughput with simplified theoretical limit
7
VRAAG 2 : OPTION 1
SW
<ACK, Window> b.v.: <1,4>
<SEQ> b.v.: <1>
SW = Send Window
4 ==>
3 ==>
2 ==>
1 ==>
3
2
1
0
0=>1=>0
0=>1=>0
0=>1=>0
0=>1=>0
<1,4>
5 msec steps
<1>
<2>
<3>
<4>
<2,4>
<3,4>
<4,4>
<5,4>
<5>
<6>
<7>
<8>
etc.
50 msectime at receiver !
NO processing
Theory : 4 kB/50 msec = 640 kbit/s
Detail : 4 kB/50 msec = 640 kbit/s
8
VRAAG 2 : OPTION 2
<ACK, Window> b.v.: <1,4>
<SEQ> b.v.: <1>
SW = Send Window
5 msec steps
<1,4>
4 ==>
3 ==>
2 ==>
1 ==>
3
2
1
0
<1>
<2>
<3>
<4>
One ACK but also rec.window reduced
by one ==> no segment can be sent !
<2,4>
<3,3>
<4,2>
<5,2>
<5>
0=>1=>0
processing time at receiver :15 msec !
First process <2> and then send ACK for <4>
==> receive window remains 2
0=>1=>0
<6>
One ACK and rec.window
NOT reduced ==> segment can be sent !
<6,3>
0=>2=>1
1==>0
<7,3>
<7>
<8>
0=>1=>0
<9>
50 msec
<8,4>
<9,3>
<10,3>
<10>
<11>
0=>2=>1
1==>0
0=>1=>0
<12>
etc.
Theory : 4 kB/50 msec = 640 kbit/s
Detail (steady state): 3 kB / 50 msec = 480 kbit/s
9
VRAAG 3
• one way delay = 25 msec
• MSS = 1 kB
• application at sender bitrate = 1000 kByte/s = 1000 MSS/sec
• Receiver buffer = 4 kB = 4 MSS
• immediate acknowledgments
• sender sends every 5 msec one MSS (if allowed)
• receiver immediate processing
• slow start (congestion control)
Make a detailed timing diagram (show Ack, Seq number, Adv. Rec. window,
send window and congestion window)
10
VRAAG 3
<1,4>
<ACK, Window> b.v.: <1,4>
<SEQ> b.v.: <1>
SW = Send Window
CW = Congestion Window
1 ==> 0, CW= 1
<1>
<2,4>
0=>2=>1, CW= 2
1=>0, CW= 2
<2>
<3>
<3,4>
<4,4>
0=>2=>1, CW= 3
1=>3=>2, CW= 4
2==>1, CW= 4
1==>0, CW= 4
<4>
<5>
<6>
<7>
<5,4>
<6,4>
<7,4>
<8,4>
0=>1=>0, CW= 5
0=>1=>0, CW= 6
0=>1=>0, CW= 7
0=>1=>0, CW= 8
etc.
11
Download