Overview
This lecture explains the difference between connection-oriented and connectionless transport layer protocols, focusing on TCP and UDP, and their behavior regarding data delivery and reliability.
Connection-Oriented Protocols (TCP)
- TCP establishes a connection to ensure all data is properly transmitted and acknowledged.
- Each data segment sent in TCP is acknowledged by the receiver, confirming successful delivery.
- TCP uses acknowledgements (ACKs) and retransmits data if segments are lost or corrupted.
- Sequence numbers in TCP allow data to be assembled in the correct order even if segments arrive out of order.
- Establishing, maintaining, and tearing down connections in TCP adds overhead and extra network traffic.
Reliability and Error Handling
- Connection-oriented protocols protect against transmission errors, congestion, and network failures.
- Lower layers (IP, Ethernet) use checksums to detect errors but discard bad data without resending.
- Retransmission of lost or corrupted data is handled at the transport layer by protocols like TCP.
Connectionless Protocols (UDP)
- UDP (User Datagram Protocol) does not establish connections or use acknowledgements.
- UDP simply sends packets to the destination port without confirming delivery.
- UDP is suitable for less critical data, such as video streaming, where some data loss is acceptable.
- Eliminating TCP's overhead allows UDP to use more bandwidth for actual data transfer.
Key Terms & Definitions
- Connection-Oriented Protocol — A protocol (like TCP) that establishes a connection and ensures reliable data delivery with acknowledgements.
- Acknowledgement (ACK) — A signal sent to confirm the receipt of a data segment.
- Checksum — A calculated value used to verify data integrity at lower network layers.
- User Datagram Protocol (UDP) — A connectionless transport protocol that sends datagrams without establishing a connection or requiring acknowledgements.
- Sequence Number — A number used to keep track of the order of data segments in TCP.
Action Items / Next Steps
- Review the differences between TCP and UDP.
- Understand scenarios where connection-oriented vs. connectionless protocols should be used.