CS计算机代考程序代写 FTP Question:

Question:
Specify packet switching and circuit switching? Which one does the Internet adopt? Why does the Internet make such a choice?
Answer:
• [2pts] Circuit switching: dedicated circuit per call.
• [2pts] Packet switching: data sent through net in discrete chunks.
• [2pts] The Internet chooses packet switching.
• [2pts] Packet switching has better performance.
Reference:
PPT [chapter 1 Intro] P33

Question:
Assume there is one router and two links between the ftp server and client (see picture below). FTP is on top of TCP (thus uses pipelining). The first link has transmission rate R1 and the second link has transmission rate R2. Assume the file gets broken into three packets each of size L. We will ignore all propagation and processing delays. How long does it take from when the server starts sending the file until the client has received the whole file if R2 ≥ R1? What if R2 < R1? In the second case, how long does the second packet spend in the router’s queue? R1 Router R2 FTP Server FTP Client Answer: • [4pts] Start with the case R2 ≥ R1: the third packet reaches the router at time 3L/R1. Then it’s just a matter of transmitting that packet to the client, which takes L/R2. So, in total, 3L/R1+L/R2. • [4pts] In the second case, the argument is similar. At time L/R1, the first packet is at the router. At time L/R1 + L/R2, the first packet is at the client and the second packet is ready to go at the router. So at time L/R1 + 3L/R2, the third packet arrives at the client. • [4pts] Finally, to calculate the queuing time of the second packet at the router. We said that at time L/R1 + L/R2, the second packet is ready to be transmitted by the router. On the other hand, the second packet arrives at the router at time 2L/R1. So it waits for L/R1 + L/R2 − 2L/R1 = L/R2 − L/R1. (Note here that R1 > R2, so packets arriving at the router faster than the router sends the packets out. Therefore, packets will be queued.)

Question:
What is the difference between persistent HTTP and non- persistent HTTP? What is the difference between pipelining and parallel connection?
Assume that the Web page consists of: 1 base HTML page (of size A bits), and M images (each of size B bits). Let the transmission rate of the connection be R. What is the response time for persistent HTTP without pipeline? We ignore TCP congestion control.

Answer:

[3pts] Non-persistent connection has one connection per request-reply cycle. Persistent connection allows multiple request-reply interactions to take place before the connection is closed. Non-persistent connection is used in HTTP 1.0.
[3pts] Pipelining is to let the client send multiple requests without waiting for a response. This is within one TCP connection. Parallel connection is to establish several TCP connections.
[6pts](A+MB)/R+(2+M)×RTT
Response time = initiate RTT+ transmit time Transmit time depends on how data is transmitted(parallel/pipelining/without pipelining)

• • •
Reference:
PPT [chapter 2 application-layer] P30-31

Question:
Read the receiver side of rdt2.1 as follows. Consider STATE “wait for 0 from below” (the STATE on the left). Please explain the following two event/actions in detail, i.e., what happens, why happens, what are the reactions and why are the reactions.

Answer:
• 1) [5pts] Event: the lower layer receives a packet. rdt2.1 finds that the packet is not corrupted and has a sequence number 0.
• Action: rdt2.1 extracts the data from the packet and delivers the data to upper layer. rdt2.1 creates an ACK packet with checksum and sends this packet to the sender.
• 2) [5pts] Event: the lower layer receives a packet. rdt2.1 finds that the packet is not corrupted and has a sequence number 1. This is because a previous ACK sent by the receiver has error. This is a duplication packet.
• Action: The sender creates and sends ACK again. If ACK is not sent, there will be a deadlock, i.e., the sender will not send anything and the receiver will not receive anything.
Reference:
PPT [chapter 3 transport-layer] P23

Question:
Explain the difference between flow control and congestion control.
Answer:
• [3pts] Flow control is to limit the transmission speed of the server, so as not to overwhelm the receiver. This is between two hosts.
• [3pts] The congestion control is to limit the transmission speed of the hosts, so as not to overwhelm the network. This is about all hosts.
Reference:
PPT [chapter 3 transport-layer] P64 PPT [chapter 3 transport-layer] P67

Question:
Consider sending a large file from a host to another host over a TCP connection (using TCP Reno). The threshold for TCP congestion control in the first round is 16.
a. If no loss occurs, in which round does the congestion window to increase from 1 MSS (maximum segment size) to 20 MSS?
b. If no loss occurs, what is the throughput up to time 10th round (in terms of MSS and RTT)?
c. If the sender receives three duplicate ACK at the 11th round, what is the congestion window size and threshold in the 14th round (in terms of MSS)?

Answer:
• [4pts] Solution:
1, 2, 4, 8, 16, 17, 18, 19, 20
So it is the 9th round.
• [4pts] Solution:
In the 10th round, there are 1+2+4+8+16+17+18+19+20+21 = 126 MSS sent. So the throughput is 12.6 MSS/RTT.
• [4pts] Solution:
Threshold is 22/2 = 11 MSS and the congestion window is 13 MSS.
Reference:
PPT [chapter3 transport-layer] P83