Connection-Oriented and Connectionless Protocols Differences

FTC disclaimer: This post contains affiliate links and I will be compensated if you make a purchase after clicking on my link.

Network technologies and protocols are differentiated on how the data is sent over a network and whether two or more devices are connected or not.

The protocols are generally divided into two categories based on the use of the connection.

  • Connection-oriented protocols
  • Connectionless protocols

Moreover, based on connection-based services, it is divided as

  • Connection-oriented services
  • Connectionless services

Different layers of the networking provide both connection-based services to the layer above them.

Connection-Oriented protocols

connection oriented protocol

The connection-oriented protocol is where the logical connection is first created between two devices before transferring data.

It can be accomplished by following the specific set of rules in which one device will initiate the connection, and the other device will respond.

Moreover, the whole process will start by initiating the connection request to other devices. After that, it will establish a connection and start to communicate with other devices. At last, when the transmission of data is over, it will terminate the connection.

So, the sequence of commands for connection-oriented services are

  • Establish connection
  • Send information
  • Release connection

Connection oriented services

In other words, connection-oriented means it performs a handshake to establish an end-to-end connection before it starts sending data.

The handshake process can be simple or complex depends on the type of protocols. Additionally, connection-oriented protocols always depend on bi-directional communications.

Connectionless protocols

connectionless protocol

Connectionless protocols don’t need to establish a connection before sending any data. As soon as the device is ready to send data, it will send it without expecting any confirmation from other devices.

Moreover, the connectionless service can take a different path for a different set of data, and it doesn’t require any authorization from the receiver end.

Also, connectionless service is not reliable because it doesn’t guarantee data transfer to the receiver end. Also, the data packets can be received in any order to the receiver.

In other words, we can say that the data packet in connectionless service doesn’t follow the defined path.

Also, data packets are not received because of network congestion or loss of data packets.

Relationship between connection-oriented, circuit-switched, and packet-switched network

The connection-oriented in networking means that connection is needed before we start the process of data transmission.

For a circuit-switched network, the circuit is established only when the two devices are connected. That’s why the circuit-switched network is known as a connection-oriented network.

But, for connection between two devices, circuit establishment is not the prerequisite. We can say that all apples are fruit in a simple analogy, but not all fruit is apple.

For this reason, the circuit-switched network precondition is to establish connections between two devices.

Moreover, connection-oriented protocols are not only based on the circuit-switched network but it is also created to work over a packet-switched network.

Connection-oriented protocols over a packet-switched network

Although we know that a packet-switched network doesn’t require a connection between two devices, it doesn’t mean that connected devices don’t work on the packed-switched network.

So, there are connection-oriented protocols that work on the packet-switched network, such as File Transfer Protocol, Telnet Protocol.

File Transfer Protocol requires a precondition that the two devices need to be connected.

It means that you need to establish a connection by entering login and password. Once devices are connected, now you would be eligible to send and receive files, execute commands to change directories, and so on.

Similarly, the Telnet protocol also requires establishing a connection before it starts sending packets.

Connection-Oriented and Connectionless Protocols in TCP/IP

Both protocols can be used in the same layer of the OSI model

Connection-Oriented and Connectionless protocols can be used in the same layer of the OSI model.

For instance, in the transport layer of the OSI model, there are two protocols, namely – TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

TCP is a connection-oriented protocol used by the application, which is required to establish a logical connection before sending data.

UDP is a connectionless protocol used by another type of application that doesn’t require any connection before sending data.

Moreover, we have also understood that connection-oriented protocol and the connectionless protocol do not depend on the type of switched network that is a circuit-switched network or a packet-switched network.

It means that if the connection is connection-oriented or connectionless, it can support both types of switched networks.

A good example would be TCP (Transmission Control Protocol). The TCP is a connection-oriented protocol, but it still prefers to send data as packets over the packed-switched network.

Both protocols can be implemented over each other

Connection-oriented protocols and connectionless protocols can be used by combining at different levels of the internetwork.

It means that connection-oriented protocol can be implemented over an inherently connectionless protocol.

Also, the connectionless protocol can be implemented over connection-oriented protocol at a lower level.

For instance, Telnet, which is a connection-oriented protocol running over IP, is a connectionless protocol.

Similarly, IP, a connectionless protocol, runs over an ATM (Asynchronous Transfer Mode), a connection-oriented protocol.