Thursday, November 6, 2008

Basic TCP/IP Layering Concept-2

The previous post dealt with the issue of how the packets traverses the layers in TCP/IP stack protocol. In this post, let us look into the reason of layering.

Why do we require layering. To reason this out let us consider what would we have if we didn't have layers. I can think of an alternative where in we have a single header and the payload. We could send this from source across the intermediate nodes to the destination. However, the issue then would be of disorganization. When the sender sent a packet on the path, the intermediate node will have to go through the entire header and then decide where to send the packet. Instead of layered concept where it strips only link layer header and checks the network layer header and sends it ahead.

Again at transport layer, the processing entity strips of link layer and network layer header and just goes through transport header. Thus we can see that layering has kind of divided the work amongst various processing entities.

The major advantage of this division of processing is that it gives rise to layers which are independent of each other. Consider we want to make some changes to the routing protocol ie. we want to modify the procedure of forming forwarding tables. Without layering, when we have a single header, we will have to deal with the whole header and accordingly the entire method of processing the header will also get modified. Notice that routing protocol should not change anything within Transport protocol, even then while modifying routing protocol it is getting affected.

This is where layering becomes helpful. With layering, we just have to modify the network layer protocol without worrying about the transport. This division gets us this independence amongst protocols and organization.

To illustrate the layering we can consider assembly line. Every machine performs its task without worrying about the machine ahead of it. Similarly in layering every layer will perform its assigned task without worrying about other layers.

I hope I was able to clear the layering concept.

No comments:

Post a Comment