CPSC 441: Computer Communications (Winter 2005)

advertisement
CPSC 441: Computer Communications (Winter 2005)
Assignment 4 – solution key
A. Mahanti
Department of Computer Science
University of Calgary
1. TCP Tahoe. Consider transmission of segments, numbered 0 through 35, using the
TCP Tahoe congestion control algorithm. Give a detailed sketch of the algorithm
assuming that the first transmission of segment 10 is lost.
Your detailed sketch of the working of the algorithm should be in terms of
“rounds”. A round begins with back-to-back transmission of W segments, where W is
the current TCP congestion window size, and ends when an acknowledgement is
received for one of these back-to-back transmissions. Note that the duration of a
round equals the RTT. For each round, you should list the segments transmitted, the
acknowledgements received, the congestion window size, the slow start threshold
parameter, and invocation of Fast Retransmit/Fast Recovery events (if any). Also,
indicate when slow start is exited or entered.
Assume that the segments/acknowledgements transmitted, if not lost, are always
received in the order they were sent. Also assume that the flow starts in slow start
with a congestion window of one with the slow start threshold parameter initially set
to a very large number (i.e., initially, slow start is exited only when a segment loss is
detected).
Refer to your textbook (pages 547-550 in the Tanenbaum book; pages 264-270 in
the Kurose & Ross textbook) for a discussion of the TCP congestion control
algorithm. (6 marks)
Solution:
The evolution of TCP Tahoe in units of rounds under the assumption that the TCP
receiver buffers packets received out of order, and acknowledges these out of order
packets when the missing packets are received, is shown below. For example, in the
table given below, the receiver awaits reception of packet 5, but buffers packets 11-20
that the sender sent. When packet 10 finally arrives (after it is retransmitted), the
receiver sends an acknowledgement that indicates that it has correctly received all
packets up to and including sequence number 20.
Following are the notations used in the table: SS: Slow Start; FR: Fast Retransmit;
CA: Congestion Avoidance (4 points: SS, CA, Fast Retransmit, and SSTHRESH).
Round
Segments
Transmitted
ACKS
Received
0
1
2
3
None
0
1,2
3,4,5,6
1
2
4
8
Infinite
Infinite
Infinite
Infinite
SS
SS
SS
SS
7,8,9
11
Infinite
SS
4b
4c
5a
0
1,2
3,4,5,6
7,8,9,10 (lost)
11,12,13,14
15,16,17,
18,19,20
10
None
None
1
1
1
floor(11/2)=5
5
5
FR
SS
SS
5b
6
7a
7b
21,22
23,24,25,26
27,28
29,30,31
911,912,913
914
915,916,917,
918,919,920
20
21,22
23
24,25,26
5
5
5
5
SS
SS
8a
8b
32,33,34
35
27,28
29,30,31
9
No more
packets to
transmit
32,33,34,35
2
4
5
3
5
5
6
3
6
6
1
7
7
4a
W
SSTHRESH
Mode
SS (enter CA)
CA
5
5
CA
CA
5
CA
2. Wireless. Suppose that an 802.11b station is configured to always reserve the channel
with the RTS/CTS sequence. Suppose that this station wants to transmit 1000 bytes of
data, and all other stations are idle at this time. As a function of SIFS and DIFS,
ignoring propagation delay, and assuming no bit errors, calculate the time required to
transmit the frame and receive the acknowledgement. (3 marks)
Solution:
You need to compute the following:
DIFS + <RTS> + SIFS + <CTS> + <FRAME> + SIFS + <ACK>
Note the correction: We only need one DIFS period.
3. Network Layer Routing. Consider the network shown below. With the indicated
link costs, use Dijkstra’s link-state routing algorithm to compute the shortest path
from z to all network nodes. (6 marks)
u
u
1
u
v
9
2
15
z
2
x
10
1
y
Solution
Iteration
0
1
2
3
4
N’
{z}
{z, x}
{z,x,y}
{z,x,y,u}
{z,x,y,u, v}
D(u),p(u)
infinity
4,x
4,x
___
___
D(v),p(v)
9, z
9,z
5,u
5,u
___
D(x),p(x)
2,x
___
___
___
___
D(y),p(y)
10,z
3,x
___
___
___
4. ALOHA. Show that the maximum efficiency of pure ALOHA is 1/(2e). (4 marks)
Solution
There are two ways to solving this problem.
Approach 1: (see Kurose & Ross problems 6 & 7 for reference)
E(p) = Np(1-p)^(2(N-1))
Next, compute E’(p) = N(1-p)^(2(N-3)) ((1-p) – p2(N-1))
Set E’(p) to zero to compute p* (the value of p that maximizes E(p))
You should get p* = 1/(2N-1)
Now compute E(p*) and take limit N->infinity
If you solve the function using a tool such as Mathematica, you will get 1/(2e) as the
answer.
Approach 2: Use the approach used in class, assuming arrival process to be Poisson. You
can also read pages 251-255 of the Tanenbaum book.
5. Ethernet. The Ethernet frame structure includes a 7-byte preamble. Why? (2 marks)
Solution
The preamble is used to “wake-up” the receiving adapter and to synchronize clocks. (see
page 458 of the Kurose & Ross textbook for details).
6. CSMA. Outline the similarities and differences between the multiple access protocols
used by IEEE 802.11b and Ethernet. (5 marks)
Solution
Let us look at the similarities first. The obvious one are – both are multiple access
protocols and they sense the channel before transmitting (and refrain from transmitting if
the channel is “deemed” to be busy). The other similarity concerns the random back-offs.
CSMA/CD employs exponential back-off after aborting a transmission. CSMA/CA
employs random back-off when the channel is sensed to be busy. Both protocols do not
have any notion of “slots” (as is used in Slotted ALOHA).
The main differences are as follows. First, CSMA/CA uses “collision avoidance”
techniques, while CSMA/CD utilizes “collision detection” techniques. Second,
CSMA/CA employs link layer retransmissions because of the relatively high error rates
of the wireless channels (compared to the wired channels in which Ethernet operates).
Third, under CSMA/CA it is possible to delay transmission even if the channel is sensed
to be idle because of the “random back-off” timer countdown. Fourth, 802.11b includes a
nice channel reservation mechanism.
Note to markers: Note that students may come up with many of the intricate
similarities/differences between the protocols, so please employ caution/judgment while
grading 
7. Integrated Services. The Integrated Services (IntServ) architecture is being
developed by the IETF to provide quality of service to individual application
sessions. Briefly discuss the salient features of this architecture. (4 marks)
Solution:
The salient features are
 Per flow quality of service
 Use of a reservation protocol such as RSVP to resource resources at routers and
hosts
 Routers administer admission control
 Specialized routing protocols may be used
 Specialized packet schedulers and traffic policing techniques
 ISA defines two service categories namely Guaranteed Load and Controlled
Load.
See the Kurose & Ross textbook for in-depth explanations of the above points.
Note to markers: Try to use your judgment to grade this question.
Download