In a transmission network, the communication between layers can be connection oriented or connectionless.
There is a sequence of operation to be followed by the users of connection oriented service. These are:
In connection oriented service we have to establish a connection before starting the communication. When connection is established, we send the message or the information and then we release the connection.
Connection oriented service is more reliable than connectionless service. We can send the message in connection oriented service if there is an error at the receivers end. Example of connection oriented is TCP (Transmission Control Protocol) protocol.
It is similar to the postal services, as it carries the full address where the message (letter) is to be carried. Each message is routed independently from source to destination. The order of message sent can be different from the order received.
In connectionless the data is transferred in one direction from source to destination without checking that destination is still there or not or if it prepared to accept the message. Authentication is not needed in this. Example of Connectionless service is UDP (User Datagram Protocol) protocol.
A service is formally specified by a set of primitives (operations) available to a user process to access the service. These primitives tell the service to perform some action or report on an action taken by a peer entity. If the protocol stack is located in the operating system, as it often is, the primitives are normally system calls. These calls cause a trap to kernel mode, which then turns control of the machine over to the operating system to send the necessary packets. The set of primitives available depends on the nature of the service being provided. The primitives for connection-oriented service are different from those of connection-less service. There are five types of service primitives :
Connection Oriented Service Primitives
There are 5 types of primitives for Connection Oriented Service :
LISTEN | Block waiting for an incoming connection |
CONNECTION | Establish a connection with a waiting peer |
RECEIVE | Block waiting for an incoming message |
SEND | Sending a message to the peer |
DISCONNECT | Terminate a connection |
There are 4 types of primitives for Connectionless Oriented Service:
UNIDATA | This primitive sends a packet of data |
FACILITY, REPORT | Primitive for enquiring about the performance of the network, like delivery statistics. |
In this section we will learn about how services and protocols are related and why they are so important for each other.
These are the operations that a layer can provide to the layer above it in the OSI Reference model. It defines the operation and states a layer is ready to perform but it does not specify anything about the implementation of these operations.
These are set of rules that govern the format and meaning of frames, messages or packets that are exchanged between the server and client.