Layers offer two types of services to the layers above them:
Connection-Oriented service is based on telephone. As you pick up the phone, dial the number, talk and then hang up. Similarly, here you firstly establish a connection, uses It and then releases the connection. It is like the messages pushes through a tube from one side and the receiver gets it other side. Here the bits arrive in order. In some cases when a connection is established, the receiver, sender, and subnet conduct a negotiation about parameters to be used, such as quality of service required, as maximum message size, and other issues.
Each message carries the complete destination address, and is routed through the system independent of all the others. When two messages are sent to the same destination, the one sent first will be the first one to arrive but there could be a possibility that the first one sent can be delayed. A reliable service is one in which the message is never lost.
Reliable connection-oriented service will be having two variations: message sequences and byte streams. In the message sequence the message boundaries are preserved for example. if two 8-byte messages are sent, they received as two different b-byte messages and but notes one of16-byte message. In the bytes stream the connection is simply a stream of bytes, with no message boundaries i.e. 2048 bytes arrive at the receiver as one.
Not all applications need connections. For example, as e-mail and e-junk mail have becomes more common. All we need is a way to send a single message that has a high probability of arrival, but no guarantee. Unreliable (meaning not acknowledged) connectionless service is often called datagram service, in accordance with telegram service, which also does not return an acknowledgement to the sender.
Another service is the request-reply service. In this service the sender transmits a single datagram containing a request; the reply contains the answer. The table shows different types of services.
Six different types of Services: