9 Difference between Connection-Oriented and Connectionless Services Protocol

9 Difference between Connection-Oriented and Connectionless Services Protocol

When one computer wants to send a packet to another computer connected to the internet, cumbersome operations are executed including establishing the connection between sender and receiver.

These operations are governed by the set of rules called protocol.

The services provided by these protocols are of two types- Connection-oriented and connectionless services.

Through this article, you will get an answer to all the questions related to the Connection-Oriented and Connectionless protocol services.

Table of Content:

Before finding the difference between connection-Oriented and Connectionless Services, let’s see some of the basic networking notation we are using in this article.

The computer sending data is called as a sender and the computer receiving data is called as a receiver. The data message is also referred as a packet.

Why there is need to establish the connection to transfer message?

In between sending a packet from the sender to receiver, there are cumbersome operations involved.

Is destination alive and reachable? What path should be followed by the packet to reach the destination? Is destination agree with the accepting the packet? What common format should be used by the packets so that it will be easily understood by both the sender and receiver?

Getting the answer to all the questions is the first priority before sending the packet over the network. How these services are addressed depends on the connection-oriented and connectionless service provided by the networking protocol.

Let’s see…

What is the Difference between Connection-Oriented and Connectionless Services of the Protocols?

Protocol Characteristics Connection Oriented Protocol Sevices Connectionless Protocol Sevices
1) Definition It is the communication service in which virtual connection is created before sending the packet over the internet. In this communication service, packets are sent without creating any virtual connection over the internet.
2) Authentication It needs authentication of the destination node before transferring data. It transfers the data message without authenticating destination.
3) Reliability This is a more reliable connection as it makes the virtual connection before sending packets and ensures delivery of the packet to the destination. This connection does not ensure reliability on packet transmission.
4) Handshaking The handshaking is carried out to ensure both sender and receiver agree with this connection. There is no handshaking happens while sending a packet over the network.
5) Delay It is slower than the connectionless service. Before sending a packet, the virtual connection is created in the connection-oriented protocol which adds extra delay. It is faster than connection-oriented protocol service.
6) Overhead Sending packet in connection-oriented service requires more parameters in the header of the packet to ensure the reliable transmission. It has less overhead and smaller packet header size.
7) Routing Route is finalized and decided at the time of handshaking before sending the actual packet. The route is not finalized and decided on the way while transferring data packet based on the network congestion.
8) Packet Travel All the packets between sender and destination follows the same path. Not necessary all the packets transmitting between sender and receiver follows the same path.
9) Protocol Example TCP is connection-oriented protocol. UDP is connectionless protocol.

Why is TCP Connection-Oriented and UDP Connectionless Protocol?

If you look at the image below, TCP opens the connection and complete all the handshaking formalities before transferring the message to another node. Here client and server are two nodes.

As UDP is connectionless protocol, it does not require creating a connection. And the message is transferred without handshaking.

TCP and UDP connection

This is one of the main differences between UDP and TCP networking protocol.

There are certain advantages and disadvantages of both connection-orientated and connectionless services.

What are the Advantages and Disadvantages of Connection-Oriented Service:

Advantages:

  • It is reliable.
  • All the packets follow the same path to the destination.

Disadvantages:

  • Handshaking is required before sending an actual data packet over the internet.
  • Requires additional header parameter to ensure reliable communication between sender and receiver. So, it has extra overhead.
  • Header size of the packet is bigger than connectionless protocol.

What are the Advantages and Disadvantages of Connectionless protocol:

Advantages:

  • It sends the packet without handshaking.
  • It is faster than connection-oriented protocol.
  • The header size of the packet is smaller as compared to the packets in connection-oriented services.

Disadvantages:

  • It is not reliable and cannot ensure the data transmission to the destination.
  • Packets decide the route while transmission based on the network congestion.
  • It does not have a fixed path.
  • Different packets do not necessarily follow the same path.

When to Use Connection-Oriented Protocol?

If you need reliable communication between sender and receiver, connection-oriented services are more useful.

Example: We use email for communication. If we are sending an email to another recipient, it should be delivered. In this case, the connection-oriented protocol is more reliable to use.

When to use Connectionless protocol?

If we are more concern about the packet transmission speed than reliability, connectionless service is more useful.

Example: If we are developing video streaming website, we need a faster connection to stream without buffer delay. In this case, the connectionless protocol is more useful.

Domain name server (DNS) uses connectionless service protocol (UDP) for the domain and IP resolution.

Wrapping Up…

This is all about the difference between connection-oriented and connectionless services and protocols. I have explained it with the TCP and UDP example.

Moreover, each node (receiver and sender) have a hierarchy of networking layers. At each node, each layer filters and parses the message before sending it to next node. For more detail and to know how does it work, you can read  7 Layers of OSI Model in Networking.

If you have any doubt or any point to discuss, let’s see you in the comment.

18 Comments

          1. Hi there, I want to develop a website that teaches. something like that of coursera.
            Give me your social media handles so I can add you.

  1. Does a connectionless connection have a physical connection between the sender and the receiver? why?

    1. Two systems are connected means they can transfer network package between them. It is not necessary to connect them physically (wire). Two systems also can be connected using a wireless medium.

  2. Thanks a lot! It has been very simply explained. But this is what the question, how is the transport layer to management connection? How will he know in which case to use the connectionless transfer (UDP) or connection-oriented transfer (TCP)?

  3. > All the packets between sender and destination follows the same path.

    This is completely false.

    > Route is finalized and decided at the time of handshaking before sending the actual packet.
    This is false as well. If this is true, what if a router in the path goes down ? Is the connection abandoned. No. Packets are just retransmitted using a different route.

Leave a Reply

Your email address will not be published. Required fields are marked *