Connectionless and Connection Oriented Network Services
- Connection-Oriented Service:
- In a connection-oriented service, a logical connection is established between the communicating parties before any data transfer occurs.
- This connection establishment involves a series of steps, including handshaking, negotiation, and resource allocation.
- Once the connection is established, data is transmitted between the sender and receiver over this dedicated path.
- The connection remains active until explicitly terminated by one of the parties or due to a timeout.
- Examples of connection-oriented protocols include TCP (Transmission Control Protocol) in the TCP/IP suite.
- Connectionless Service:
- In a connectionless service, data is sent from the sender to the receiver without establishing a dedicated connection.
- Each data unit (often called a datagram) carries complete addressing information, allowing it to be routed independently through the network.
- There is no prior setup or coordination between sender and receiver; each packet is treated independently.
- Because of this lack of overhead for connection establishment and maintenance, connectionless services can be more efficient for certain types of communication.
- Examples of connectionless protocols include UDP (User Datagram Protocol) in the TCP/IP suite.
Comparison:
- Reliability: Connection-oriented services provide a reliable data transfer mechanism, ensuring that data is delivered correctly and in order. Connectionless services do not guarantee reliability; it's the responsibility of higher-level protocols or applications to handle any necessary error checking and retransmission.
- Overhead: Connection-oriented services typically have higher overhead due to the connection setup and maintenance process. Connectionless services have lower overhead since they don't require establishing and managing connections.
- Ordered Delivery: Connection-oriented services maintain the order of transmitted data, ensuring that data arrives at the receiver in the same order it was sent. Connectionless services do not guarantee ordered delivery.
- Examples: TCP is a common example of a connection-oriented protocol, providing reliable, ordered, and connection-based communication. UDP is a well-known example of a connectionless protocol, offering lightweight, unreliable, and connectionless communication.