Hello everyone, welcome you all to this new video. So in my previous video I had discussed with the TCP IP protocol suit the complete description about that suit. What do you mean by that suit and uh what is the layered architecture of that suit?
What and all are the five layers which we are going to be going through in that TCP IP that is a application transport network data link and physical layer. So all of them all of their explanations along with that the detailed description of all the uh layers under uh each substances that is a router switches source host and destination host in with respect to the TCP IP protocol suit. I've discussed it in that previous video.
So those who have not watched that video please go and watch it. It would be available in the uh just before this video. Okay.
So in this video we are going to be discussing with the concept of encapsulation and decapsulation. Okay. So this would be arising in the uh here I'm we are going to be taking the example of the TCP IP protocol suit itself which consists of five layers in that the process of flow of data that is the flow of data packets from source to destination host that would be somehow same as the encapsulation and decapsulation.
Okay. So what do you mean by that? We are going to be discussing in this video now.
Okay. So stay tuned. Watch this video till the end.
Like this video guys. Okay before you move further. So now let us get to the concept of this.
Now one of the important concept in protocol layering in the internet is encapsulation or decapsulation. So this figure 1. 23 here shows the concept for the small internet with respect to the TCP IP suit of encapsulation and decapsulation.
So here you see here if you observe this box very carefully if you observe this box very carefully here we are having this number four box as header at transport layer. Okay. So this is that number four box that is the header which is having the main message and the transport layer in the source host as well as the destination host.
Here box three is the header at the network layer. Okay. And uh box two is the header at the data link layer.
So what it does is encapsulating the data. Okay. So you see here at box four and three the data encapsulation is taking place that is from the final layer application layer it is going towards the lower layer that is the physical layer.
Okay. So the data flow is somehow like this. Okay.
So whenever the data flow or data packet is from application to physical layer we could be saying that the data is getting encapsulated from source to destination. that is it is going in this direction. Okay, it would be receiving the message with respect to the previous layers and going passing through the routers and whatever the message collected in this layer that would be getting stored in the router and ba based on that the router would be sending the appropriate signal to the destination ports and from here the decapsulation is taking place.
You see here it is getting back its original data. Okay, so that is called as decapsulation. So, okay.
So you see here at this direction the decapsulation is taking place from source to destination. Okay. So this is the basic procedure of encapsulation and decapsulation.
So you see here encapsulation at the source host. So at the source we have only encapsulation as I've told you the direction here is is at this side. So that's why in the source host we are the process taking place is the encapsulation.
Okay. So at source we have only encapsulation. At the application layer, the data to be exchanged is referred to as a message.
Uh a message normally does not contain any header or the trailer. But if it does, we refer to the whole as the message. So the message is passed to the transport layer that is whatever the message is there with respect to the application layer that is getting passed through the transport layer it won't be staying in the application layer because it doesn't contain any sort of data.
So that's why it should be getting transported towards the transport layer. So next is the transport layer takes the message as the payload. The load that the transport layer should take care of.
It adds the transport layer header to the payload which contains the identifiers of the source and destination and uh destination application programs that want to communicate plus some more information that is needed for the end to end delivery. Okay. So the and for the in case of end to end delivery so whatever is present in the transport layer that should be getting transferred so that's why that would be going towards the upcoming layer in the datagram with respect to the data present in the datagram that would be going towards the network layer okay so the network layer then takes the transport layer packet as I've told you whatever is present in the transport layer that that data packet would be getting stored in the network layer now as data or payload and then adds its own header to the payload.
So this header contains the address of the source and destination host and some more information used for error checking of the header. So the fragmentation or the information which is stored inside this uh transport layer would be all those things would be preferring over the data and based on the data packet which is present that would be getting transferred to the network layer. Okay.
So the result is the network layer packet which is called as a data graph. So whatever the uh data which is getting transport transferred from the transport layer to the network layer now that would be present inside that network layer and that network layer packet is also called as datagram. So the network layer then passes the packet to the data link layer.
Okay. So from the as from the procedure from the network layer whatever the message is present and whatever after the procedure it would be going towards the data link layer now. So now here the data link layer takes the network layer packet as data or payload and adds it add its own header.
So at each layer its own headers would be getting added up. Okay. So you see here in transport layer we had one header four.
Okay. When it comes to network layer it would be adding it it would be adding its own header that is three. So that's why it would be three four.
Now from network whatever this is present it would be going towards data link and its own header that is two would be getting added and like this the headers would be getting added when it goes when it when the data is getting encapsulated in between the layers. Okay. So which contains the link layer address.
Okay. So that uh header two would be containing a link layer address of the host or the next hop. Okay.
The next hop is the router. So the result is the link layer packet which is also called as a frame. Okay, for network layer packet we call it as a datagramgram.
Whereas for a link layer packet it is called as a frame. So this frame is passed in the physical layer for the transmission. So finally whatever the data present which is called as a frame that is going going towards the physical layer.
Okay. So this is the encapsulation procedure which is taking place at the source host. Okay.
So there is no decapsulation at the desk source host there. There would be only encapsulation at the source host. Now you see here decapsulation and encapsulation at the router.
So at the router side we would be having both the procedures. You see here according to the direction this this procedure is decapsulation here and this procedure here is encapsulation. So that's why at the router side we would be both the procedures would be taking place simultaneously that is decapsulation as well as encapsulation.
So you see here what it is what it does. So at the router we have both decapsulation and encapsulation because the router is connected to two or more links because here the router is getting connected to more than two links here. Okay, it is connected to physical data link and network layer.
So that's why it won't be going towards the transport and application layer. It should be coming back to the original path in order to decapsulate through the destination host. So that's why we would be having the uh both the procedures taking place simultaneously.
Okay. So after the set of bits are delivered to the data link layer, this layer decapsulates the datagram. Okay.
Decapsulates the datagramgram from the frame and passes it to the network layer. Okay. So now in this data link layer whatever the data is present that is going towards the physical layer.
It's the physical layer's job is simply to send send back the data send back the original data to the data link layer once again. Okay. So here from physical to data link.
So the procedure here is decapsulating. So that's why the data is getting decapsulated and whatever is present in that data link layer it gets uh the data link layer that is the frame that frame would be going towards the network layer and that network layer packet is also called as datagram. So that's why here I have here here it is mentioned that it decapsulates the datagramgram.
Okay. So the network layer only inspects the source and destination addresses in the datagram header and consults its formatting table to find the next hop. Okay.
To which the datagramgram is to be delivered in order to if if it does that procedure then the upcoming uh it would be the packet would be getting transferred to the upcoming layer. So the contents of the datagram should not be changed by the network layer in the router unless there is need to fragment the datagram. So if it is too big it to be passed through the next link the datagram is then passed to the data link layer of the next link.
Okay. So it would be having a limit that is the data packet which is present it should not be exceeding the uh data uh if it should be having one limited data. If that is not getting passed then we should be passing through different iterations.
Okay. Whatever the data which is maximum that should be getting passed and the remaining data would be going in a loop in the next step. Okay.
So now next step here is the data link layer of the next link encapsulates the datagram in a frame and passes it to the physical layer for transmission. So till here decapsulation is taking place. It would be go uh whatever the message which we have transferred from each layer during the process of encapsulation that would be getting processed and it would be going towards the router and the router would be receiving all the messages with respect to the encapsulation taking place and now it should be sending the data to the destination host and that sending of data would be now here in this case encapsulation.
Okay. So now here both the processes are taking place here at the router. Whereas in case of destination host now decapsulation would be taking place.
So till here it's done. Now it would be going towards the physical layer data link layer network transport and application in this upward direction. Okay.
So that's why to to in in the direction of the destination host. So that's why in the destination side we would be the process taking place is decapsulation. Okay.
So at the destination host each layer only decapsulates the packets received that is whatever the packets which are received with respect to the encapsulation and it it is gone to the router that data would be getting received which is present in the router and it removes the payload whatever the additional data which is present in that packet it removes it and delivers the payload to the next higher layer protocol. Okay, that is until the message reaches the application layer that is from the lowermost layer physical layer it would be going to data link network transport and application finally and it would be reaching the destination host. Okay, it is necessary to say that decapsulation in the host involves error checking.
Okay. So whatever the decapsulation procedure which is taking place in the destination host the error checking would be happening there because whatever the data which we have whatever the necessary data which we have transferred to the destination that should be getting satisfied right. So that's why the there would be error checking and if there is error the complete procedure would be repeating once again until we get the accurate data.
Okay. So this was the complete procedure of encapsulation and decapsulation between the source and the destination host. Okay.
So yeah that's all for this video guys. We'll see you in the next video with the one more concept. So stay tuned.
Like this video, subscribe to our channel, keep supporting. Okay. Thank you.