How do TCP and UDP differ in the way that they establish a connection between two endpoints?
TCP uses the three-way handshake, and UDP does not guarantee message delivery.
TCP uses synchronization packets, and UDP uses acknowledgment packets.
UDP provides reliable message transfer, and TCP is a connectionless protocol.
UDP uses SYN, SYN ACK, and FIN bits in the frame header while TCP uses SYN, SYN ACK, and ACK bits.
TCP and UDP both use the same mechanism to establish a connection.
Explanations
Answer A (Correct): TCP is a connection-oriented protocol and uses a three-step handshake (SYN, SYN-ACK, ACK) to establish a reliable connection. UDP, on the other hand, is a connectionless protocol and does not guarantee message delivery.
TCP and UDP are both transport protocols used in the Internet protocol suite. TCP is connection-oriented, which means it establishes a stable connection before transmitting data, ensuring that packets arrive at their destination in the right order. UDP, on the other hand, is a connectionless protocol that sends packets without establishing a stable connection, which can result in missing or disordered packets.
Answer B (Incorrect): This statement is false because TCP uses both synchronization packets (SYN) and acknowledgement packets (ACK). UDP does not guarantee delivery and therefore does not use an acknowledgement mechanism.
Answer C (Incorrect): It’s the other way around. TCP ensures reliable message transfer, while UDP is connectionless and does not guarantee delivery.
Answer D (Incorrect): This statement is incorrect because TCP uses the SYN, SYN ACK, and ACK bits in the header, not UDP.
Answer E (Incorrect): Incorrect. TCP and UDP have very different mechanisms for establishing connections.