CS计算机代考程序代写 algorithm Tutorial 2 Answers

Tutorial 2 Answers

Tutorial 2 (Week 10)
Note: Some questions are from past exams.

Q1.

In the slow-start mode, the congestion window doubles in size each transmission round. During the
fourth round when the congestion window equals to 8 MSS, all 8 transmitted packets are lost. Hence, the
sender determines the losses via a timeout, sets the threshold to 4 MSS, and reduces the congestion
window to 1 MSS. Staring from the fifth round, the sender retransmits the lost data (starting from
segment No 8) and then transmits the remaining portion of the file. The congestion window doubles
until it becomes equal to the threshold (i.e., 4 MSS) during the seventh transmission round. Then, the
TCP connection switches to the congestion-avoidance mode and increases the congestion window by 1
MSS per transmission round. Host A finishes the delivery of the 32- MSS file during the tenth round:

Q2.

(a) 28.8.128.252 – Port 3

(b) 128.8.128.5 – Port 4

(c) 128.8.25.223 – Port 2

(d) 155.128.45.21 – Port 5

Q3.

Q4.

(a) If the network part of the address is 24 bits (/24) then all interfaces in subnet 1 must be of the form
111.111.111.xxx while all interfaces in subnet 2 must be of the form 222.222.222.xxx. The IP
addresses are shown in the figure.

(b) LAN addresses are 48 bits long and written in hexadecimal-colon notation. These are very
different from the 32-bit addresses from part a.

(c)
1) In the IP datagrams from A to the router the addresses are as follows: source

111.111.111.111, destination: 222.222.222.222. In the IP datagrams from the router to E
the source and destination addresses does not change.

2) TTL, Upper layer protocol field, Checksum, Options etc
3) Using ARP (address resolution protocol)

(d)

1) The IP addresses of A and E would have to have the same network prefix since they are
now part of the same subnet.

2) There is no need to change the physical (LAN) addresses.
3) The switch uses backward learning algorithm. When a host sent a frame through the

switch, the switch would observe the LAN address of the sender and the interface
through which it has arrived and record this value in its forwarding table.

Q5.

(a) The one-way propagation delay (including the repeater delays) between A and B is:
(900m/2x108m/sec) + 4 x 20bits/10×106 bps
= (4.5 x 10-6 + 8 x 10-6) sec
= 12.5usec

(b).

• At time t = 0, both A and B transmit
• At time t = 12.5 usec A detects a collision
• At time t = 25 usec last bits of B’s aborted transmission arrives at A.
• Since A draws K=0 in the backoff algorithm, it can immediately start the retransmission at time t

= 25 usec.
• At time t=37.5 usec first bit of A’s transmission arrives at B. Note that this time is smaller than

512 bit times that B has to wait for backoff. Hence, B does not begin its transmission since it
detects A’s transmission (in CSMA, the node senses the channel before transmit).

• At time t = 37.5 usec + 1000bits/10x106bps = 137.5 usec A’s packet is completely delivered to
B.

Q6.

(a) A is sending data to B. 


(i) Yes, because C does not hear A

(ii) No, because C has heard the CTS sent by B

(b) B is sending data to A.


(i) No, because C has heard the data transmission from B

(ii) Yes, because C has not heard the CTS from A, even if it heard the RTS from B

Q7.