cse123A Problem set - Transport layer ch. 6 Problem 1: The LISTEN call could indicate willingness/readiness to establish new connections, but not block. When a CONNECT comes in, the process which called LISTEN can be given a signal (like kill call in unix) and it can then accept or reject the connection. (The LISTEN in BSD unix does not block. The book chooses blocked LISTEN to simplify the example protocol implementation). Problem 2: The dashed line transition from PASSIVE ESTABLISHMENT PENDING to ESTABLISHED need not be based on acknowledgment and its arrival, and can happen immediately. So, the PASSIVE ESTABLISHMENT pending state is not needed. Problem 3: The problem is the same with more than two armies also. Problem 4: (a) The clock makes 32768 ticks to wrap around (2**15) and at 100 msec, it cycles in 3276.8 sec. The sender would enter the forbidden region at 3276.8 - 60 = 3216.8 sec. (b) At 240 seq. no.s per minute, the actual sequence number graph is 4t (t in secs) The edge of the forbidden region is 10(t-3216.8) setting 4t=10(t-3216.8), we get t=5361.3 sec. Problem 5: Refer to fig. 6-11(c) in the text. when the second duplicate packet arrives, that is, DATA(seq=x,ACK=Z), if (ACK y) were still around and later gets delivered to Host 1, a stale connection will come up which is disastrous. Host 2 does not ack the duplicate and this is useless if an old ack shows up at Host 1. So T must be large to ensure both a packet and ack for it are gone for good before using the same sequence number. Problem 6: Deadlocks are possible. Suppose a packet arrives out of the blue - it is not expected - at A and A acknowledges it. Further, assume that the acknowledgment is lost. A is now open and is hanging on the connection while B is totally ignorant. If the same thing happens to B, B is also open and A and B will deadlock expecting different sequence numbers. Problem 7: if the AW or WA time is small, then AC(W) and WC(A) are unlikely events. The sender should transmit in S1; the receiver's order does not matter. Problem 8: Yes. Both sides could execute receive simultaneously. Problem 9: One other invariant is that the sum of connections in the states listening, waiting, sending and receiving must be 1. In these states, the user process is blocked, and therefore can not also be in another state. Problem 10: The zero length message is received by the other side. It can be used, for example, to indicate end-of-file. Problem 11: None of the primitives can be executed, because the user process is blocked. Only packet arrival events are possible. The only legal packet arrivals are - CallReq, ClearReq, DataPkt, Credit. Problem 12: Sliding window is simpler, having only the parameters of window edges to maintain. The problem of TPDUs arriving in wrong order with the window being increased and then decreased does not arise. The credit scheme is flexible, allows dynamic buffer management, separate from acknowledgments. Problem 13: Even though each datagram (IP packet) arrives intact, it may happen that datagrams arrive out of order. So, TCP has to reassemble parts of a message as needed. Problem 14: No. A connection is identified (uniquely from other connections) by ((host addr, port no.) - (host addr, port no.)) the first of which is local and the other remote. Thus there can be only one ((host1,p) - (host2,q)) Problem 15: The entire TCP segment must fit in an IP packet as payload which can be maximum 65535 - 20 (the minimum header size of IP packet) which is 65515 bytes. Within this, TCP header will need minimum of 20 bytes (no option words) leaving 65515 - 20 = 65495 bytes of data from process as maximum possible. Problem 16: Two ways, the protocol can have a connection in SYN RECD state. (i) start with LISTEN and receive a SYN (ii) Process does an active open and sends a SYN and, if the other side was opening too, a SYN is received and SYN RECD state is entered. Problem 17: Even when user types at uniform rate, the echoing on to the screen will be in bursts with Nagel's algorithm - jerky feedback is not good interactivity! Problem 18: With slow start at 2k, the segment size increases as 4k, 8k, 16k, 24k (maximum as per receive window). Thus, from 2k to 24k occurs in 4 steps taking 40 msec - 10 msec is RTT. Problem 19: Start with 1k after time out and first success takes it to 1k, the second to 2k, the third to 4k, and the fourth to 8k. Problem 20: RTT-new-estimate = a(RTT-old-estimate) + (1-a)RTT-measured we get 0.9x30+0.1x26 = 29.6; 0.9x29.6+0.1x32 = 29.84 and 0.9x29.84+0.1x24 = 29.256 -- all times are in msec. Problem 21: At 1 Gbps, 65535 bytes takes 65.535 microsec xmit time and 20 msec of RTT (two 10 msec delay). We can ignore the xmit time relative to RTT and thereby, in one sec, 50 segments can be sent. This gives 65535x50 = 3.3 million bytes per sec and with 1Gbps line speed, we get (3.3x8)/1000 = 2.6% line efficiency (utilization). Problem 22: A sender may not send more than 255 TPDUs in 30 secs which works to 255x128x8x2 bps = 8.704 kbps. Problem 23: IP packets contain IP addresses which specify only a destination machine. The network layer does not know (can not figure) to which entity (process/port) to give this packet. UDP packets contain destination port which is a TSAP - between transport layer and the layer above (application layer). Problems 24 to 30 are on ATM AAL (section 6.5) which is omitted.