Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CS 455: Computer Networks

Fall 2023

Homework 2

To be completed individually. Please review the academic conduct rules mentioned in the syllabus.

Answer all questions. Submit on Gradescope.

1.   Consider a web client requesting a base html page of size O = 5,000 bytes from a web

server. This base html page contains 3 objects of the same size of O bytes each. These 3   embedded objects (img01.jpg, img02.jpg, img03.jpg) reside on the same web server. The minimum round-trip delay RTT = 100 ms, and the channel rate C = 1Mbps. Assume the   client uses persistent HTTP (HTTP 1.1) with pipelining to retrieve the 3 embedded

objects. How long is the response time—the time it takes to receive the base page and its   3 embedded objects from the web server after the user requests the initial base html page? In answering this question, assume error-free transmission. Be sure to consider TCP

connection establishment (1 RTT), and the data transmission delay for the base file and

the embedded objects. Ignore header / control bits, and assume that the sending rate is not limited by flow control, i.e., the server can send data at the channel rate C. To support

your answer, include a timing diagram, and show all steps of your calculations along with associated expressions in terms of O, C, and RTT.

2.   Consider a web client requesting a html page of size O = 125,000 bytes from a web

server. This html page contains no objects. The RTT = 300ms, and the channel rate C = 20Mbps. Assume the client uses non-persistent HTTP (HTTP 1.0). Now, a web cache

(proxy server) is installed in a location where the RTT between this web cache server and the web server is 400ms and the channel rate is 20Mbps. The RTT between this web

cache server and the client is 50ms and the channel rate is 100Mbps. In answering this question, assume error-free transmission and no local cache in the client. Be sure to

consider TCP connection establishment (1 RTT), and the data transmission delay for the html file. Ignore header / control bits, and assume that the sending rate is not limited by  flow control. Also, please distinguish web cache from router’s store-and-forward mode,  i.e., the web cache can start sending responses to the client when the first byte of the

response is received from the web server. To support your answer, include a timing diagram, and show all steps of your calculations.

a.   How long is the response time when web cache contains the response?

b.   How long is the response time when web cache does not contain the response?

c.    [extra pts] What is the minimal cache hit rate to make this web cache installation a performance win on average?

3.   In this problem, we use the useful dig tool available on Unix and Linux hosts to explore

the hierarchy of DNS servers. Recall that a DNS server in the DNS hierarchy delegates a   DNS query to a DNS server lower in the hierarchy, by sending back to the DNS client the name of that lower-level DNS server. First read the man page for dig, and then answer

the question: starting with a root DNS server (from one of the root servers [a-m].root-       servers.net), initiate a sequence of queries for the IP address forgoogle.comby using dig.

Show the list of names of DNS servers in the delegation chain in answering your query.

4.   UDP and TCP checksum.

a.   UDP and TCP use 1s complement for their checksums. Suppose you have the

following three 8-bit bytes: 01010011, 01100110, 01110100. What is the 1s

complement of the sum of these 8-bit bytes? (Note that UDP and TCP use 16-bit words in computing the checksum, you are being asked to consider 8-bit sum for simplicity.) Show all work. With the 1s complement scheme, how does the

receiver detect errors? Is it possible that a 1-bit error will go undetected? How about a 2-bit error?

b.   UDP and TCP checksum calculation includes 3 sections: a pseudoheader

containing part of the information of the IP header (in particular, source IP

address and destination IP address), the UDP/TCP header and the payload. Please explain why the checksum calculation includes the pseudoheader.

c.    [extra pts] The sender of a UDP packet can choose not to calculate the checksum. In this case, the checksum field is filled with all 0s. What if the sender decides to  calculate the checksum, but it happens that the result is all 0s? Please explain

why this does not create confusion on the receiver side.

5.   A client tries to communicate with the server over TCP. Client port is 50324 and server

port is 80. Suppose the initial sequence numbers chosen by client and server are 8000 and 15000, respectively. For simplicity, assume the underlying channel is reliable (i.e., does    not corrupt, duplicate, lose or reorder packets)

a.   Please draw a diagram showing the 3-way handshake. For each segment, please indicate the source and destination ports, sequence number and

acknowledgement number (if valid) and control flags. Please note, you can ignore the sequence number of the ACK only packet.

b.   After the handshake, suppose the client sends one segment containing 200 bytes of data and closes the TCP connection with a FIN + ACK segment (half-close).  Those two segments are sent to the server back-to-back. After receiving the FIN + ACK segment, the server sends one segment of 1000 bytes of data and closes  the connection with a FIN + ACK segment. Suppose both endpoints send an

acknowledgment whenever it receives a segment from the peer. Please draw a

diagram showing the 4-way connection termination (FIN + ACK sent by client,    ACK sent by server, FIN + ACK sent by server and last ACK sent by client). For each segment, please indicate the source and destination ports, sequence number  and acknowledgement number (if valid) and control flags. Please note, you can

ignore the sequence number of the ACK only packet.

6.   A client communicates with a server over TCP. After 3-way handshake, suppose both client send window and server rwnd sizes are 800 bytes. 5 segments are exchanged

between the client and server:

a.   The client sends 200 bytes to the server. Suppose the sequence number of the segment is 8001.

b.   The server receives 200 bytes and sends acknowledgement.

c.   The client receives acknowledgement.

d.   The client sends 300 bytes.

e.   The server receives 300 bytes and 100 bytes are consumed by the application. Server sends acknowledgement.

f.    The client receives acknowledgement.

g.   The server application consumes 200 bytes and the server sends acknowledgement.

Please fill in the missing SeqNo, AckNo and rwnds. Also, please draw the send window in 4 time points: 1) after 1st ACK is received, 2) after sending the segment containing

300 bytes of data, 3) after 2nd ACK is received and 4) after 3rd ACK is received. When   you draw the send window. Please indicate the send window size and the send window is divided into 2 parts, bytes outstanding and bytes that can be sent.

7.   Consider the figure below. Assuming TCP Reno is experiencing the behavior shown,

answer the following questions. In all cases, please provide a short discussion justifying your answer.

a.   Identify the interval of time when TCP slow start is operating.

b.   Identify the intervals of time when TCP congestion avoidance is operating.

c.   After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?

d.   After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?

8.   Please add the answers for the following Wireshark lab assignments. d a.   Wireshark DNS: q11 – q19

b.   Wireshark TCP: part 1 – part 3