Homework 7 (Due 11/09) (110+10)
Problem 1 (5)
A process on host 1 has been assigned port p, and a process on host 2
has been assigned port q. Is it possible for there to be two or more
TCP connections between these two ports at the same time?
Problem 2 (40)
TCP provides reliable transfer through a mixture of
sequence number, receiver buffer, cumulative acknowledgement, and fast
retransmission. Answer the following True or False problems. If it's
False, explain why.
- a) Host A is sending host B a large file over a TCP
connection. Assume host B has no data to send to A. Host B will not
send acknowledgements to host A because host B cannot piggyback the
acknowledgement on data.
- b) The size of the TCP advertised window (RcvWindow) never changes
throughout the duration of the connection.
- c) Suppose host A is sending host B a large file over a TCP
connection. The number of unacknowledged bytes that A sends cannot
exceed the size of the receiver's buffer.
- d) Suppose host A is sending host B a large file over a TCP
connection. If the sequence number for a segment of this connection is
m, then the sequence number for the subsequent segment will
necessarily be m+1.
- e) Suppose host A sends host B one segment with sequence number 38
and 4 bytes of data. Then in the same segment the acknowledgement
number is necessarily 42.
- f) Suppose that the last sampleRTT in a TCP connection is equal to
1 second. Then timeout for the connection will necessarily be set to a
value >= 1 second.
- g) With the selective repeat protocol, it is possible for the
sender to receive an ACK for a packet that falls outside of its
current window.
- h) With the Go-Back-N, it is possible for the sender to receive an
ACK for a packet that falls outside of its current window.
Problem 3 (10)
TCP provides congestion control through slow start and AIMD (
additive
increase and multiplicative decrease). Answer the following True or
False problems. If it's False, explain why.
- a) Consider congestion control in TCP. When a timer expires at the
sender, the threshold is set to one half of its previous value.
- b) The slow start is really slow, which is one of the overhead introduced by congestion control.
Problem 4 (10)
- Consider the effect of using slow start on a line with a 10-msec
round-trip time and no congestion. The receive window is 24KB and the
maximum segment size is 2KB. How long does it take before the first
full window can be sent?
- Suppose the TCP congestion window is set to 18KB and a timeout occurs.
How big will the window be if the next four transmission bursts are
all successful? Assume that the maximum segment size is 1KB.
Problem 5 (20)
- Based on the sample codes given in class,
write a client and server "echo" program which uses UDP and TCP. You need to turn in the following codes
- echoserv-tcp.c
- echocli-tcp.c
- echoserv-udp.c
- echocli-udp.c
- (+10)Design and develop an application scenario that tests the effect of having more requests than the allowed queuing length in "listen()". You need to turn in the code as well as the output
Problem 6 (15)
Refresh concepts on ``big endian'' and ``little endian''
- Write a program which can detect and report the
hardware architecture it is running on. Give the test result for Intel
PC and Sun SPARC (unix.cas.utk.edu). Turn in the code and the output.
- Is there any relationship among ``big endian'', ``little
endian'', ``network byte order'', ``host byte order''? Explain why or
why not.
Problem 7 (10 - check for completion but not correctness): Task 1 of project 4
Write a server for node0 and call it node0.c. Write a client for node1 and call it node1.c. Initially, prepare the initial DV table for both node0 and node1. Let node1 send its DV to node0. Upon receiving node1's DV, node0 will modify its DV according to node1's input. Then it'll reply node1 with the updated DV.