Oefeningen_1_TCP_EN_10_okt_07

advertisement
Communication Networks
Theoretical exercises part I a (TCP)
10-10-2007
Question 1:
In the network below, computer A is connected with a 100 meter twisted pair link
with router X. The bit rate is either 100 kbit/s, or 10 Mbit/s. Router X on his turn is
connected to router Y, through a satellite connection (distance 2 x 15000 km), or
through an optical fibre (length 2000 km). The bit rate for connection X-Y is very
high: 10 Gbit/s. Finally, router Y has a high bit rate connection of 10 Gbit/s over a
coax link of 100m with server B. A wants to upload a file to the FTP server on B, and
the receiver buffer of this server can be either 10 x MSS or 100 x MSS. The MSS=10
kbit.
Task: calculate the average bit rate for the combinations described below. Note down
the results in the last column. You can presume that server B will send 1 accumulated
ACK to A if it has received 10 (or 100) segments (corresponding to a full buffer).
S
0
00
5
1
A
100 m TP
100 kbit/s
of 10 Mbit/s
X
15
00
0
km
10 Gbit/s
km
Y
vezel : 2000 km
Link AX
100 kbit/s
10 Mbit/s
10 Mbit/s
100 kbit/s
10 Mbit/s
Link XY
Satellite
Satellite
Fibre
Satellite
Fibre
Buffer B
10 x MSS
10 x MSS
10 x MSS
100 x MSS
100 x MSS
10 Gbit/s
100 m coax
B
10 x MSS
of 100 x MSS
Bitrate (Mbit/s)
Work out a general calculation method, and use it to work out two examples:
 10 Mbit/s, fibre , 10 x MSS
 100 kbit/s, satellite, 100 x MSS
Work out the table for all other cases as well.
Remark: the propagation speed is 3 x 108 m/s in free air (satellite link), and 3 x 108
m/s in glass (optical fibre link). [Ref. Kurose and Ross, Chapter 1, part 1.6]
Communication Networks
Theoretical exercises part I a (TCP)
10-10-2007
Question 2:
Two terminals are connected with each other through a link. The link has an unlimited
bandwidth, but has a {one-way} delay of 25 msec. We set up a TCP connection and
send information from A to B. The MSS is 1 kByte. The application in A generates a
continuous data stream of 1000 kByte/sec. This is the data stream which is passed
from the application layer to the transport layer, hence 1000 MSS/sec. The receiver
buffer has a size of 4 kByte (= 4 x MSS).
Option 1: on the receiver side, the arriving segments are processed immediately.
Option 2: on the receiver side, we have to take a processing time into account (in the
application layer) of 15 msec / MSS (we can process 1 kByte (=1 MSS) of
information in 15 msec).
(a) Make a DETAILED time scheme, until a regime condition is met. Explicitly mark
the following items: W, ACK and SEQ (in the segments sent). Use a notation like
<number SEQ> and <number ACK, Window>; e.g. <3> and <4,2> (you don’t have to
mention ACK, SEQ and W each time). Clearly indicate the send window as well.
(b) Make a rough estimation on the throughput of the data transfer. Calculate the
transfer rate from the detailed regime condition, and explain if the rough estimation is
met. Explain why or why not.
Some assumptions you can make:
 We assume that an immediate ACK is used (and not a delayed accumulated
ACK).
 You don’t have to work out the TCP set-up (you can directly send a first
segment at t=0, and the MSS and receive window are now at t=0). Start with a
segment <1,4> that is arriving in A (which is the third segment of the TCP setup).
 Don’t take slow start into account (don’t work with a congestion window)!
 Receiver: if a segment arrives, and a segment can be processed at the same time,
then you can assume that the processing starts before the arriving segment is put
into the buffer. If there is no segment in the buffer, this implies that an arriving
segment can be processed immediately (and the segment never resides in the
buffer).
 Sender: if more than one segment can be sent from the “TCP sender buffer”, a
segment can be sent every 5 msec.
 Sender: assume that the “TCP sender buffer” is infinite (i.e. the application in A
can keep on passing 1000 kByte/sec of information to the TCP layer).
Communication Networks
Theoretical exercises part I a (TCP)
5
10
15
20
25
30
35
40
45
50
55
60
65
70
Question 3:
A variation on question 2, option 1:
one way delay = 25 msec
MSS = 1 kByte
application at sender bit rate = 1000 kByte/s = 1000 MSS/sec
Receiver buffer = 4 kByte = 4 MSS
immediate acknowledgments
sender sends every 5 msec one MSS (if allowed)
receiver immediate processing
!!! slow start !!!
show congestion window
start with segment <1,4> (last segment of 3-way handshake protocol)
Again, answer both part (a) and (b).
10-10-2007
Communication Networks
Theoretical exercises part I a (TCP)
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
10-10-2007
Communication Networks
Theoretical exercises part I b (TCP)
10-10-2007
Question 4:
Two terminals are connected with each other through a link. The link has an unlimited
bandwidth, but has a {one-way} delay of 25 msec. We set up a TCP connection and
send information from A to B. The MSS is 1 kByte. The application in A generates a
continuous data stream of 1000 kByte/sec. This is the data stream which is passed
from the application layer to the transport layer, hence 1000 MSS/sec. The receiver
buffer has a size of 4 kByte (= 4 x MSS). On the receiver side, we have to take a
processing time into account (in the application layer) of 15 msec / MSS (we can
process 1 kByte (=1 MSS) of information in 15 msec).
(a) Make a DETAILED time scheme, until a regime condition is met. Explicitly mark
the following items: W, ACK and SEQ (in the segments sent). Use a notation like
<number SEQ> and <number ACK, Window>; e.g. <3> and <4,2> (you don’t have to
mention ACK, SEQ and W each time). Clearly indicate the send window and
congestion window.
(b) Make a rough estimation on the throughput of the data transfer. Calculate the
transfer rate from the detailed regime condition, and explain if the rough estimation is
met. Explain why or why not.
Some assumptions you can make:
 We assume that a delayed accumulated ACK of 20 msec is used. When two
segments have arrived, an ACK will be sent immediately.
 You don’t have to work out the TCP set-up (you can directly send a first
segment at t=0, and the MSS and receive window are now at t=0). Start with a
segment <1,4> that is arriving in A (which is the third segment of the TCP setup).
 Take slow start into account (work out the congestion window)!
 Receiver: if a segment arrives, and a segment can be processed at the same time,
then you can assume that the processing starts before the arriving segment is put
into the buffer. If there is no segment in the buffer, this implies that an arriving
segment can be processed immediately (and the segment never resides in the
buffer). When the (delayed) ACK is sent at the same time, you can presume that
the processing happens before the ACK is sent.
 Sender: if more than one segment can be sent from the “TCP sender buffer”, a
segment can be sent every 5 msec.
 Sender: assume that the “TCP sender buffer” is infinite (i.e. the application in A
can keep on passing 1000 kByte/sec of information to the TCP layer).
Communication Networks
Theoretical exercises part I b (TCP)
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
10-10-2007
Communication Networks
Theoretical exercises part I b (TCP)
10-10-2007
Question 5 (not for MTI):
We have the following situation:
 File transfer from an FTP server to an FTP client : total number of bits : O bits
(multiple of the MSS), O = 8 kbit [also consider a big file of 8 Mbit]
 MSS = S bits (1 kbit)
 Transmission rate: R bit/s (1 Mbit/s)
 RTT = 2 x Propagation delay (RTT= 4 ms)
 Only take the congestion window into account (receiver window is big enough),
and the congestion window is fixed to W (which is again a multiple of the
MSS). Hence the congestion window expressed in bits is W.S
 No packet loss
 Don’t take overhead of other protocol headers into account
 ACK and SYN messages have no transmission delay
 Include the TCP connection set-up
 Immediate Ack
Calculate the time needed to send the file (latency), and the average bit rate. Take the
following two cases into account:
(a) W.S/R >RTT + S/R [use W=6]
(b) W.S/R < RTT + S/R [use W=2]
Work out a general formula (in function of O, S, R, RTT and W) and apply it to the
example (O=8 kbit of 8 Mbit, S=1 kbit, R= 1 Mbit/s RTT=4 ms, , W= 2 of 6)
[Ref. Kurose en Ross]
Question 6 (not for MTI):
We have the following situation:
 File transfer from an FTP server to an FTP client : total number of bits : O bits
(multiple of the MSS), O = 11 kbit
 MSS = S bits (1 kbit)
 Transmission rate: R bit/s (1 Mbit/s)
 RTT = 2 x Propagation delay (RTT= 4 ms)
 Only take the congestion window into account (receiver window is big enough),
and the congestion window is fixed to W (which is again a multiple of the
MSS). Hence the congestion window expressed in bits is W.S
 Take slow start into account
 No packet loss
 Don’t take overhead of other protocol headers into account
 ACK and SYN messages have no transmission delay
 Include the TCP connection set-up
 Immediate Ack
Calculate the time needed to send the file (latency), and the average bit rate.
Work out a general formula (in function of O, S, R, RTT and W).
[Ref. Kurose en Ross]
Download