Connection Oriented and Connectionless Services


Connection Oriented and Connectionless Services

In this tutorial, you’ll learn connection oriented and connectionless services. You can easily learn connection oriented and connectionless services.

The layers provide these two resources to the layers above them. What are the services:

  • Connection-Oriented Service (COS) is a type of service that focuses
  • Services that aren’t linked

Connection Oriented Services

Users of connection-oriented services must obey a specific operation series. There are the following:

  1. Connection is established.
  2. Information is sent.
  3. Connection is released.

Before we can start communicating in a link-oriented service, we must first create a connection. We send the message or information after the link is established, and then we release the connection.

Connection-oriented service is more dependable than a service that does not need a connection. If there is an error at the receiver’s end, we can send the message as a link-driven service. TCP (Transmission Control Protocol) is an example of a connection-oriented protocol.

Connection Less Services

It’s similar to postal services in that it includes the complete address where the message (letter) will be sent. From source to destination, each message is routed independently. The order in which messages are sent and received can differ.
Data is transferred in one direction from source to destination in connectionless mode, with no checks to see whether the destination is still there or whether it is ready to accept the message. There is no need for authentication in this case. The UDP (User Datagram Protocol) protocol is an example of a connectionless service.

Difference: Connection oriented and Connectionless service

  1. Authentication is necessary for connection-oriented services, but it is not required for connectionless services.
  2. The connection-oriented protocol creates a connection and checks if the message has been received, sending again if an error occurs, while connectionless service protocol does not ensure message delivery.
  3. Connection-oriented service is more dependable than a service that does not need a connection.
  4. The connection-oriented service interface is based on streams, while the connectionless service interface is based on messages.

What are Service Primitives?

A collection of primitives (operations) accessible to a user method to access a service is formally defined as a service. These primitives instruct the service to take some action or to report on a peer entity’s action. The primitives are typically system calls if the protocol stack is located in the operating system, which is popular. These calls trigger a kernel mode trap, which hands control of the machine over to the operating system to send the necessary packets. The primitives available are determined by the type of service being offered. Connection-oriented service primitives vary from connection-less service primitives.

LISTEN: A server executes the LISTEN primitive when it is able to accept an incoming connection. It comes to a halt while waiting for an incoming connection.
CONNECT: It establishes a connection with the server. The response is still pending.
RECIEVE: The server is then blocked by the RECIEVE call.
SEND: The client then uses the SEND primitive to send its message, followed by the RECEIVE primitive to receive the answer. Transmit the post.

DISCONNECT is a primitive that is used to close a relation. After this primitive, no message can be sent. When a client sends a DISCONNECT packet, the server recognizes the client by sending a DISCONNECT packet as well. When the client receives the server package, the operation is completed.

Connection Oriented Service Primitives

Connection Oriented Service primitives are divided into five categories:

LISTENBlock waiting for an incoming connection
CONNECTIONEstablish a connection with a waiting peer
RECEIVEBlock waiting for an incoming message
SENDSending a message to the peer
DISCONNECTTerminate a connection
Connection Oriented and Connectionless Services

Connectionless Service Primitives

There are 4 types of primitives for Connectionless Oriented Service:

UNIDATAThis primitive sends a packet of data
FACILITY, REPORTPrimitive for enquiring about the performance of the network, like delivery statistics.
Connection Oriented and Connectionless Services

Relationship of Services to Protocol

We’ll learn how services and protocols are connected and why they’re so important to each other in this segment.

What are Services?

In the OSI Reference model, these are the operations that a layer may provide to the layer above it. It specifies the operation and states that a layer is ready to run, but it does not specify how these operations should be implemented.

What are Protocols?

These are the rules that govern the format and context of frames, messages, and packets sent between the server and the client.


We learned how to find the longest substring with non-repeating characters by using the sliding window technique in this tutorial.


Please enter your comment!
Please enter your name here