Question

In: Computer Science

1. Explain one aspect of UDP that makes it better than TCP. 2. Explain what is...

1. Explain one aspect of UDP that makes it better than TCP.

2. Explain what is a socket.

3. Explain the difference in demultiplexing between UDP and TCP.

4. Illustrate a system of your choice with Finite State Machine.

Solutions

Expert Solution

1. In UDP we have no connection establishment. TCP uses a three-way handshake before it starts to transfer data. UDP just blasts away without any formal preliminaries. Thus UDP does not introduce any delay to establish a connection. This is probably the principal reason why DNS runs over UDP rather than TCP—DNS would be much slower if it ran over TCP.

2. A socket is the interface between the application process and the transport-layer protocol. The application at the sending side pushes messages through the socket. At the other side of the socket, the transport-layer protocol has the responsibility of getting the messages to the socket of the receiving process. The socket mechanism provides a means of inter-process communication (IPC) by establishing named contact points between which the communication take place.

3. For demultiplexing in UDP we need source port number field and the destination port number field. A UDP socket is fully identified by a pair consisting of a destination IP address and a destination port number. As a consequence, if two UDP segments have different source IP addresses and/or source port numbers, but have the same destination IP address and destination port number, then the two segments will be directed to the same destination process via the same destination socket.

One major difference between a TCP socket and a UDP socket is that a TCP socket is identified by a quadruple: (source IP address, source port number, destination IP address, destination port number). Thus, when a TCP segment arrives from the network to a host, the host uses all four values to demultiplex the segment to the appropriate socket.

4. I am not sure to what the system in here is referring to. I think it is either of TCP or UDP. So I have solved this part using that assumption only. Please tell me in the comments below if it is something else.

The follwing figure is of the TCP finite state machine


Related Solutions

What is UDP and how does it work? What are the differences between TCP and UDP?....
What is UDP and how does it work? What are the differences between TCP and UDP?. Provide examples (if applicable) to support your comparative review.
What are the services provided by TCP?  What services are provided by UDP?
What are the services provided by TCP?  What services are provided by UDP?
What are the differences between TCP and UDP? What are transport protocols?
What are the differences between TCP and UDP? What are transport protocols?
What is the difference between TCP and UDP? Why would you use one over the other?...
What is the difference between TCP and UDP? Why would you use one over the other? Why have other nations enjoyed faster broadband speeds, greater availability, and lower prices? What advantages could broadband offer to underserved areas of the world? Is Internet access important for economic development? Why or why not?
Q10. Compare the header of TCP, UDP, and IP packets and explain why are there more...
Q10. Compare the header of TCP, UDP, and IP packets and explain why are there more fields in TCP header than UDP and IP? (10 points)
List three applications that use UDP and three applications that use TCP and explain why those...
List three applications that use UDP and three applications that use TCP and explain why those applications use the selected Transport layer protocol.
b) UDP does not provide end to end flow control, but TCP does. Explain how this...
b) UDP does not provide end to end flow control, but TCP does. Explain how this is achieved using sequence numbers. Give an example where a packetized message sent using UDP is received incorrectly, but when using TCP it is received correctly under same circumstances without channel errors.                                                                     
WHAT ARE THE DIFFERENCES BETWEEN TCP/IP AND UDP IN TERMS OF OSI LAYERS AND DEFINITION ITSELF?...
WHAT ARE THE DIFFERENCES BETWEEN TCP/IP AND UDP IN TERMS OF OSI LAYERS AND DEFINITION ITSELF? PLEASE GIVE BREIFE EXPLANATIONS WITH PICTURES AND EXAMPLES WITH EASY ENOUGH TO MEMORIZE AND UNDERSTAND
Describe how DDoS attacks may be mounted against TCP and UDP services. In what way will...
Describe how DDoS attacks may be mounted against TCP and UDP services. In what way will being connection-oriented be different for TCP and UDP?
1. Consider running real-time traffic, like VoIP, over a TCP or UDP socket. Why might you...
1. Consider running real-time traffic, like VoIP, over a TCP or UDP socket. Why might you prefer to run such an application using a UDP transport layer? 2. Consider running real-time traffic, like VoIP, over a TCP or UDP socket. Suppose you chose to use TCP for your application; what would you need to do to ensure that the robust transport algorithm does not harm real-time performance?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT