Networks Final - TCP/UDP

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Describe why an application developer might choose to run an application over UDP rather than TCP.

An application developer may not want its application to use TCP's congestion control, which can throttle the application's sending rate at times of congestion. Often, designers of IP telephony and IP videoconference applications choose to run their applications over UDP because they want to avoid TCP's congestion control. Also, some applications do not need the reliable data transfer provided by TCP.

True or false? Host A is sending Host B a large file over a TCP connection. Assume Host B has no data to send Host A. Host B will not send acknowledgments to Host A because Host B cannot piggyback the acknowledgments on data.

False

Suppose that the UDP receiver computes the Internet checksum for the received UDP segment and finds that it matches the value carried in the checksum field. Can the receiver be absolutely certain that no bit errors have occurred? Explain.

No, the receiver cannot be absolutely certain that no bit errors have occurred. This is because of the manner in which the checksum for the packet is calculated. If the corresponding bits (that would be added together) of two 16-bit words in the packet were 0 and 1 then even if these get flipped to 1 and 0 respectively, the sum still remains the same. Hence, the 1s complement the receiver calculates will also be the same. This means the checksum will verify even if there was transmission error

Is it possible for an application to enjoy reliable data transfer even when the application runs over UDP? If so, how?

Yes. The application developer can put reliable data transfer into the application layer protocol.

List the four broad classes of services that a transport protocol can provide. For each of the service classes, indicate if either UDP or TCP (or both) provides such a service.

a) Reliable data transfer (2%) - TCP b) A guarantee that a certain value for throughput will be maintained - Neither c) A guarantee that data will be delivered within a specified amount of time - Neither d) Security - Neither

Suppose that a Web server runs in Host C on port 80. Suppose this Web server uses persistent connections, and is currently receiving requests from two different Hosts, A and B. Are all of the requests being sent through the same socket at Host C? If they are being passed through different sockets, do both of the sockets have port 80? Discuss and explain.

- For each persistent connection, the Web server creates a separate "connection socket". Each connection socket is identified with a four‐tuple: (source IP address, source port number, destination IP address, destination port number). When host C receives and IP datagram, it examines these four fields in the datagram/segment to determine to which socket it should pass the payload of the TCP segment. Thus, the requests from A and B pass through different sockets. - The identifier for both of these sockets has 80 for the destination port; however, the identifiers for these sockets have different values for source IP addresses.

For a client-server application over TCP, why must the server program be executed before the client program? For a client-server application over UDP, why may the client program be executed before the server program?

- For the TCP application, as soon as the client is executed, it attempts to initiate a TCP connection with the server. If the TCP server is not running, then the client will fail to make a connection. - For the UDP application, the client does not initiate connections (or attempt to communicate with the UDP server) immediately upon execution

Recall that TCP can be enhanced with SSL to provide process-to-process security services, including encryption. Does SSL operate at the transport layer or the application layer? If the application developer wants TCP to be enhanced with SSL, what does the developer have to do?

- SSL operates at the application layer. - The SSL socket takes unencrypted data from the application layer, encrypts it and then passes it to the TCP socket. If the application developer wants TCP to be enhanced with SSL, he/she has to include the SSL code in the application.

If the TCP server were to support n simultaneous connections, each from a different client host, how many sockets would the TCP server need? How many sockets for UDP?

- TCP has a welcoming socket and then creates a new socket with each connection so TCP has n + 1 sockets. - 1 socket because all data from different clients enters the server through this one socket.

Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A and Host B each send a UDP segment to Host C with destination port number 6789. Will both of these segments be directed to the same socket at Host C? If so, how will the process at Host C know that these two segments originated from two different hosts?

- Yes, both segments will be directed to the same socket. - For each received segment, at the socket interface, the operating system will provide the process with the IP addresses to determine the origins of the individual segments.

Why do HTTP, SMTP, and POP3 run on top of TCP rather than on UDP?

The applications associated with those protocols require that all application data be received in the correct order and without gaps. TCP provides this service whereas UDP does not.


Ensembles d'études connexes

NU 302 Management of Care Question Set 1

View Set

AD Banker Life & Health Chapter 5

View Set

Chapter 13.3 Study Guide Questions

View Set

Chapter 10 Online Content and Media M/C

View Set

NUR2261 - Unit 2 - Kidneys (AKI, CKD, Glomerulonephritis)

View Set

Quels sont les avantages et les inconvénients d'Internet? (= What are the pros and cons of the Internet)

View Set