TCP/IP Encapsulation
When data moves from upper layer to lower level of TCP/IP protocol stack (outgoing transmission) each layer includes a bundle of relevant information called a header along with the actual data. The data package containing the header and the data from the upper layer then becomes the data that is repackaged at the next lower level with lower layer's header. Header is the supplemental data placed at the beginning of a block of data when it is transmitted. This supplemental data is used at the receiving side to extract the data from the encapsulated data packet. This packing of data at each layer is known as data encapsulation.
Figure ofTCP/IP Encapsulation
TCP/IP Decapsulation
The reverse process of encapsulation (or decapsulation) occurs when data is received on the destination computer. As the data moves up from the lower layer to the upper layer of TCP/IP protocol stack (incoming transmission), each layer unpacks the corresponding header and uses the information contained in the header to deliver the packet to the exact network application waiting for the data.
Figure of TCP/IP Decapsulation
Names of different network data packets
The format of the data packet generated at different layers is different, and known by different names.
The data packet created at the Application layer is known as a "MESSAGE".
As described in the previous lesson, the Transport Layer contains two important protocols: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). TCP (Transmission Control Protocol) is more reliable but consumes more resource. UDP (User Datagram Protocol) is less reliable but consume fewer resources than TCP (Transmission Control Protocol) and is faster than TCP (Transmission Control Protocol).
The Application layer message is again encapsulated at the Transport Layer. If the protocol used at the Transport Layer is TCP (Transmission Control Protocol), the data packet is known as a "TCP SEGMENT". If the protocol used at the Transport layer is UDP (User Datagram Protocol), the data packet is known as a "UDP DATAGRAM".
The data packet created at the Internet layer by Internet Protocol, which again encapsulates the Transport layer segment/datagram, is known as a "IP DATAGRAM".
The data packet at the Network Access layer, which encapsulates and may subdivide the IP Datagram, is known as a "FRAME" (generally Ethernet Frame). The Frame is converted into a bitstream at the lowest sublayer of the Network Access layer and then placed on medium.