Tuesday 13 October 2015

Transport Layer 4

Introduction to Transport Layer

Now after covering almost every aspect of the Application Layer and the Application Layer protocols, we have now here to start our discussion on the 2nd layer of the Internet stack , The Transport Layer.

Before starting with our discussion on Transport Layer, I want to give you a live scenario, that will make you clear with the working of Transport Layer and the other layers of the Internet stack.

Let us suppose that there are two bungalows. One is in India and Other is in America. In the bungalow in India, lives a person James along with his 5 children. And in the bungalow in America, lives a person Steve along with his 4 children. Now all 5 children of James write a letter to every children of Steve on every Sunday. Therefore total number of letters will be 20. Thus, all the children writes the letter , put them in envelopes and hand over it to James. Then James write source house address and the destination house address on the envelope and give it to the postal service of India. Now the postal service of India puts some other addresses corresponding to the country and delivers it to the America postal Service. The American Postal sees the destination address on the envelopes and will deliver those 20 letters to the Steve House. Steve collects the letter from the postman and after considering the name of his respective children on the envelopes, he gives the letter to each of them.
In this example we have processes and the layers. Let me explain.
Processes = children
Application Layer messages = envelopes
Hosts = The two Bungalows
Transport Layer Protocol = James and Steve
Network Layer protocol = Postal Service
  • Here you can see, that according to children, James and Steve are the mail services, but in real they are just a part of the delivery process.
Suppose James and Steve went on a holiday for 10 days. Then as their susbstitute, Angelina comes at place of James and Ashley comes at place of Steve. But now for the two bungalows, unfortunately Angelina and Ashley are not able of providing services as James and Steve. Angelina and Ashley often drops letters, lose them, which are often eaten by the dogs. Thus in the same way , services provided by the Transport Layer depends on type of protocol you use in your network.
  • In this scenario, for example  if the postal service cannot guarantee the maximum time taken in the delivery of the envelopes, thus there is no way that James and Steve can guarantee the maximum delays in the delivery of mails between the children. In the same way, the services provided by the Transport Layer are often subjected to the services provide by the underlying network layer. If the network layer cannot guarantee the delay in delivery of messages, then surely transport layer can never.
But still, a Transport Layer protocol guarantees certain services that are not guaranteed by the underlying Network Layer. 
Thus, in our coming posts on transport layer and the other layers, you must always remember this example, making it easier for you to understand the layers concept.
Overview of Transport Layer Protocol:

Transport Layer acts as a medium between the Application Layer and the the Network Layer. Transport Layer provides a logical communication medium between the processes running on different end systems. What does logical communication means?

Logical communication means that, from an Application perspective, it is like the hosts are directly connected to each other, but in reality , the hosts may be on two opposite sides of the earth, connected by routers and links. As the physical infrastructure of the two hosts and the intermediate can be different, so for this reason , the Application processes use the logical communication of the Transport Layer to send message from one host to other and be free from the worry of the physical infrastructure used.


Different Protocols of Transport Layer:

There are basically two types of protocols that Transport provides to give services to Application Layer. These are:

1. Transmission Control Protocol (TCP)

2. User Datagram Protocol (UDP)

TCP provides a reliable and connection-oriented service to the Application. On the other hand, UDP provides a unreliable and connection-less service to the Application. Thus, it is upto the Application Developer, which transport Layer protocol has to be used. For example: In case of HTTP, it is built over TCP.

 Transmission Control Protocol (TCP):


1. TCP provides a reliable delivery of data. Irrespective of the fact, Network layer doesn't provides reliable data transfer, TCP guarantees that. But TCP doesn't guarantee anything about the time taken to deliver the packet.

2. TCP delivers the packet in their respective order. This means, from the source, in the order in which you will send the packet, they will reach in the same order at the destination.
3. As TCP provides reliable data transfer and connection oriented services, it is a bit heavy and complex protocol.

4. TCP provides congestion control or the flow control within a network.


User Datagram Protocol (UDP):

1. UDP provides non-reliable data delivery. It is a connection-less service provider.

2. UDP doesn't guarantee the delivery of packets in the order they are sent.

3. Its a light protocol. 

Relationship Between Network and Transport layer:

On one hand , the Transport Layer provides communication between processes, whereas on the other hand, the Network Layer provides communication between hosts. Recall the above example of two bungalows and compare it with that. I am sure, you will understand it

No comments:

Post a Comment