ECS 152A Computer Networks

ECS 152A Computer Networks

ECS 152A Computer Networks

Assignment II

Due: 10/26/07 by 4pm.

Q 1)

a)Why do we need an unreliable UDP service when we have a reliable TCP service? [2]

b)What advantage does the Selective Repeat protocol have over the Go Back N protocol? [2]

c)Explain the concept of fast retransmit in the TCP protocol. [3]

a)If we incorrectly estimate the time out interval, it can cause problems in our packet transmission. If the time out interval (RTO) is too small, then time outs will occur very frequently and the sender will end up retransmitting a lot of packets unnecessarily. This will add to the congestion in the network. [1]

If the RTO is large, then in the event of packet loss, the sender will wait for a long time before retransmitting, thus slowing down the effective rate. [1]

b) If in a particular connection, the window size and the bandwidth-delay product are both large, many packets can be in the pipeline. A single packet error can thus cause GBN to retransmit a large number of packets, many unnecessarily. As the probability of channel errors increases, the pipeline can become filled with these unnecessary retransmissions. Selective repeat avoids unnecessary retransmissions by having the sender retransmit only those packets that were received in error at the receiver. [2]

c) If the time out interval is too long, then the sender will wait too long before retransmitting a packet causing larger delays. Since a sender sends a large number of segments back to back and one segment gets lost, there will be many back to back duplicate ACKs. If the sender receives three duplicate ACKs for the same data packet before its timer expires, it will send the packets again before the time out. This is fast retransmit.

Q 2)

a)Draw the FSM for the receiver side of protocol rdt 3.0. [3]

a) Same as FSM for rdt 2.2 receiver in the text book.

b)Give a trace of the operation of protocol rdt 3.0 when data packets and acknowledgement packets are garbled. (Similar to fig. 3.16 in the text book) [3]

c)

4000 Km 1000 Km

In the given setup, A sends messages to B and B forwards them to C, both using stop and wait protocol. Data rate between A and B is 100 Kbps. Packet length is 1000 bits. The propagation delay is 5 microseconds / Km. The ACK packets are negligible in length. There are no errors and losses.

What would be the data rate between B and C such that B is not overloaded (arrival rate at B is less than rate at which B can send the packets? [4]

B receives a packet every 30 ms.

So, B must send a packet in less than 30 ms to not be overloaded.

IF X is the transmission time, then X + 5 < 30

X < 25 => 1000/R < 25

=> R > 40 Kbps[4]

Therefore, the rate from B to C should at least be 40 Kbps.

Q 3) State whether the following are true or false. Give reason if false. [3]

a)TCP uses cumulative acknowledgement.

b)Host A sends Host B a file over a TCP connection. Host B has no data to send to Host A. Host B will not send acknowledgements to Host A because Host B cannot piggyback the acknowledgements on data.

c)In selective repeat, the receiver will not acknowledge a correctly received packet if it is out of order.

a) True

b) False.

c) False.