Connection oriented basically provides sequence number which is the basis of reliability. By reliability, it means that the communication between the sender and the receiver is connection oriented.
Connectionless and connection oriented services transport protocol
When the source and the destination during a communication calculates and share certain parameters before transferring the packets then this kind of communication is called connection oriented.
If source sends data to destination, then the sources cannot expect any acknowledgement for connectionless protocol. But if destination wants to reply it, then it can do so by using IP and port number.
A reliable protocol caters two things:
- Network congestion control.
- Receiver flow control.
At this point, a question should arrive in your mind that if a connection oriented communicating protocol is much more reliable than why connectionless transport layer protocols are used?
Reasons to use connection less transport protocol
UDP protocol is also known as unreliable connectionless transport layer protocol.
Following are some reasons to use UDP:
- Finer application level control over which the data is sent and if when we want to control we need light weight and less consuming protocols. Real time applications require minimum sending rate and don’t want any delay, but can tolerate any loss. Therefore, UDP protocol is used over here.
- No connection establishment – UDP protocol does not need to establish any connection before any communication of data packet and therefore it avoids such delays.
- No connection state – No buffers, congestion control parameter, etc are maintained, and therefore the server that is utilizing UDP protocol can handle multiple active clients at a time.
- Small packet header overheads – Since UDP is not keeping track of the parameters mentioned above, therefore, the size of the UDP packet gets automatically small.
Why UDP protocol is unreliable?
- It is a connectionless protocol. This means that there are changes of loss of packets.
- They are one ended traffic. This means it sends packet without caring for acknowledgement.
On the other hand, TCP protocol is much more reliable as there are acknowledgements for packets received.
Reliable transport protocol
TCP protocol is also known as reliable connection oriented transport layer protocol. If we use this protocol then flow control and congestion control are done at the transport layer while maintaining a persistence link. So this caters reliability by using connection oriented approach.
Unreliable transport protocol
Now for unreliable approach, flow control and congestion control are not done at the transport, instead their control lies with the application layer.
UDP takes message from the application process, attaches source and destination port numbers field for multiplexing / de-multiplexing service and passes the resulting segment to network layer. The network layer encapsulates it into an IP datagram and delivers to the receiving host. If the segments arrives at the receiving host, UDP uses the port number to deliver segments data to the correct application process.
UDP is used by RIP routing table updates. RIP updates are send periodically, last updates will be replaced by the recent once.