 So, now, when we move from the analogy to the network, we see that there is a concept of layering. Just as in the analogy we had the manager and then we had the dispatch section and then we had the packaging section. In a network, again, there are multiple layers. Each layer has its own functions. So, before we get into that, let us ask the question, why do we need these layers? What does it give us? So, the key point here is that it can be done without having layers also. However, in that case, every application, for example, you might think of a web service application. Let us say you are using your web server to get information from a client or you might think of a file transfer application where you are moving files across the network. So, each application would have to do the entire packaging and the entire dispatching operations by itself. In order to avoid that, what we do in networks is to provide this idea of layers so that the functions can be separated. So, the application layer now only worries about talking to the corresponding application layer on the other side of the network. The transport layer worries only about ensuring that packets are sent in the correct sequence and are received in the correct sequence. The dispatch layer worries only about making sure that the packet goes along the desired route. So, by separating these concerns, it becomes easier to manage the applications as well as to develop applications quickly. Now, how do these layers work? The basic idea is that each layer provides a service to the layer above and it utilizes the services of the layer below. For example, the application layer gives some data and some address to the transport layer. Now, this information is the transport layer's responsibility to communicate from one end of the network to the other end of the network. At the other end, again this information is reassembled and sent back to the application layer. To make a web request, what happens is your request is packaged and sent across the network. At the web server side, the request is again received in the original form by the web server. So, each layer provides a service to the layer above it through what is called the interface. The interface is nothing but sending of the data and some control information from one layer to the other. Now, along with layers, there is the concept of protocols. What is a protocol? Protocol is nothing but an understanding between two entities of how they are going to communicate. So there are various protocols. In the networking world, the protocol means that a layer on the client side is communicating with the corresponding layer on the server side. For example, when the transport layer, which is responsible for creating the packets and numbering them and keeping track of them, is communicating with the peer layer, the transport layer on the other side of the network. They need the notion of acknowledgments so that the layer can keep track of which packets have been received on the other side, which acknowledgments have come, which packets may have been lost, which need to be retransmitted and so on. So in order to have this understanding between the same layer across the network, that idea is called the protocol. So they have a mechanism by which certain control packets are exchanged, by which they come to know what is the current state of the data that is being transmitted across the network. To summarize, the concept of layering involves two ideas. One is the idea of interfaces through which one layer is able to talk to the layer below it and pass on the data and control information. And the other idea is that of the protocol, wherein one layer is able to talk to its peer at the other end of the network. So both of these have a notion of some syntax, which is how is the packet to be framed, what should be the control signals and so on and some semantics, which is how should these signals be interpreted.