COMP 5416 Assignment 2, Due: Oct. 14, Friday, 5pm
You need to write your answers to all questions in a single .pdf file. Please name your file as Lastname_Firstname_Assignment2.pdf. You should also submit your Python code. Please name your Python file as Lastname_Firstname_Assignment2.py. Then you should zip your files in a single .zip package, using the name Lastname_Firstname_Assignment2.zip.
Q1 Go-Back-N: Think deeper, 3 points
In the following network, node A transmits packets that pass through B and C, and arrive at the destination D. The bit rate of all links is R = 1 Mbit/sec. The maximum packet size in the network is 500 Bytes. Ignore the header size. The one-way propagation delay on each link is 4msec. (Same as Q1 in Tutorial 5)
(1) How long does it take to transmit a file of size 40,000 Bytes if A and D use the Go- Back- 6 ARQ and B and C are Store-and-Forward? Assume that there is no error in transmission in the network, and the size of ACK packets is negligible
(2) Repeat (1) if we use Go- Back- N, where N=8, 10, and 20
(3) Sketch the overall time vs. N (N is the value of Go-Back-N) curve. N ranges from 1 to 20
(4) Repeat (1) if the second packet is lost (all other packets are successfully received). The timout duration is assumed to be 50ms.
Q2 HTTP and TCP: Cross-layer analysis, 2 points
Suppose within your web browser you click on a link to obtain a web page. Assume that the webpage you are fetching has 3 images located on the same server as the main webpage. Each image is a large file that fits into 10 TCP segments. The main page also fits into 1 segment. Assume that the client and server are using TCP Tahoe. The one-way propagation delay in the network is 5 msec. Ignore the size of all packets. Ignore the TCP termination delay (i.e., FIN, FINACK). In parts (a) and (b), there is no loss in the network. ssthresh=8 at the beginning. (Hint: more than one rounds are needed to transmit one large file; you need to consider cwnd in each round.)
(a) How long does it take to obtain the whole web page including the objects if non-persistent HTTP is used? Show all your work.
(b) How long does it take to obtain the whole web page including the objects if persistent HTTP is used? (Hint: one TCP connection is established to transmit the main page and three objects. You can start to request the first object if the main page has been received. You can start to request the second object if the first object has been fully received.)
(c) Repeat (b). Assume that the 8th data segment from server to client arrives with error. All previous and subsequent packets arrive with no-error. How long does it take to obtain the whole web page and the objects? Show all your work.
Q3 Usefulness of cache, 2 points
ABC, Australian Broadcasting Corporation, has a website located in Sydney that maintains the entire newscast. There is a direct connecting link between Sydney and Melbourne. Assume that one-way propagation delay on the Melbourne-Sydney link is 100 msec and the bandwidth of the link is 10 Mbps. Further assume that the connection between any client in Victoria and the router R1 in Melbourne has a bandwidth of 1000 Mbps, and one-way propagation delay is 10msec. All queries from Victoria are sent to Sydney on the R1-R2 link. On average, the requests from Victoria to view the news webpage arrive at the rate of 620 requests per second and the newscast webpage is 2000 Bytes (which fits exactly one packet). Ignore the header size.
(a) Find the utilization of the Sydney-Melbourne link (Hint: ρ = 𝑎𝐿, 𝑎 is the request rate) 𝑅
(b) Assume that the queuing delay on the Sydney-Melbourne link is given by
ρ𝐿
(1−ρ)𝑅
ρ is the utilization, L is the packet size, and R is the transmission rate. What is the total
average delay in viewing the news webpage?
(c) Assume that the capacity of the Sydney-Melbourne link is increased to 100 Mbps. Find the total delay in part (b).
(d) Now assume that ABC creates a local webpage in Melbourne that only contains the local news. All other news are still maintained in Sydney. Assume that on average 30% of the requests are for local news, which can be served in the Melbourne site. What would be the total average delay in fetching news? (Melbourne-Sydney link bandwidth is still 10 Mbps)
Q4 TCP Ping Server with multiple connections, 3 points
You are given the complete code for the TCP Ping client. Your task is to write the TCP Ping server. The ping client code is in TCPClient2.py. You do not need to modify this code. The client will send 20 ping requests to the server. The server receives the data and converts characters to uppercase, and then sends back 20 ping responses (capitalized data). You should submit your server code as Lastname_Firstname_Assignment2.py.
You need to code and implement the server program. The server must be able to serve multiple clients simultaneously. Please note that the server codes used in Lab 4 can only accept one client!
In order to serve multiple clients simultaneously. The server should run multiple threads. As we have discussed, the server will establish a new connection socket to communicate with one new client, and each new connection socket will be managed by a new thread. You should self- study the following function: thread.start_new_thread().
To test the server, you should run multiple clients simultaneously. In the following example, three clients send “client a”, “client b”, and “client c” 20 times simultaneously, and they receive “CLIENT A”, “CLIENT B”, and “CLIENT C” 20 times from the server. As shown in the following figure.
The server should also print IP address, port number of the client, and the message to send, as shown in the following figure. You can notice that the server sends different messages to different clients with different port numbers.
Q5. VoIP Trace and Analysis, 3 points
A VoIP trace is included in Q5trace.xls. The trace includes around 60 VoIP data packets. Each line in the trace shows the sending timestamp, sequence number, and receiving timestamp of a VoIP packet.
At the beginning, the delay estimation (di) is 100ms, and the deviation of delay (vi) is 10ms. Recall that di is updated as follows
di = (1- α) di-1 + α (ri – ti), where α=0.1, ti and ri are the sending and receiving timestamps.
vi is updated as follows
where β =0.1. We also define
vi = (1-β)vi-1 + β|ri – ti – di|,
playout-timei = ti + di + Kvi, where K=3. Please answer the following questions.
(1) What are the playout times of all packets? List all of them in a table. (2) How many packets missed the playout time?
Hint: you need to review slides of week 7. A few packets were lost.
Q6. Wireshark Trace and Analysis, 2 points
Download the Wireshark trace file Q6trace, which contains some UDP packets carrying SNMP messages. Once you have downloaded the trace, you can load it into Wireshark and view the trace using the File pull down menu, choosing Open, and then selecting the trace file. Please answer the following questions.
Question
Answer
1
Select one packet. From this packet, determine how many fields there are in the UDP header. Name these fields.
2
From the packet content field, determine the length (in bytes) of each of the UDP header fields.
3
The value in the Length field is the length of what? Verify your claim with your captured UDP packet.
4
What is the maximum number of bytes that can be included in a UDP payload.
5
What is the largest possible source port number?
6
What is the protocol number for UDP? Give your answer in both hexadecimal and decimal notation. (To answer this question, you’ll need to look into the IP header.)
7
Search “UDP” in Google and determine the fields over which the UDP checksum is calculated.
8
Examine a pair of UDP packets (11th and 12th) in which the first packet is sent by your host and the second packet is a reply to the first packet. Describe the relationship between the port numbers in the two packets