Reference articles on history, science, culture and more
Encyclopedia

Encapsulation (networking)

Communication protocol design method

Image credit is listed at the end of this article.

Encapsulation is the computer-networking process of concatenating layer-specific headers or trailers with a service data unit (i.e. a payload) for transmitting information over computer networks. Deencapsulation (or de-encapsulation) is the reverse computer-networking process for receiving information; it removes from the protocol data unit (PDU) a previously concatenated header or trailer that an underlying communications layer transmitted.

Encapsulation and deencapsulation allow the design of modular communication protocols so to logically separate the function of each communications layer, and abstract the structure of the communicated information over the other communications layers. These two processes are common features of the computer-networking models and protocol suites, like in the OSI model and internet protocol suite. However, encapsulation/deencapsulation processes can also serve as malicious features like in the tunneling protocols.

The physical layer is responsible for physical transmission of the data, link encapsulation allows local area networking, IP provides global addressing of individual computers, and transport layer protocols (TCP/UDP) select the destination process or application via port numbers (servicing applications like Web over TCP or TFTP over UDP).

For example, in the IP suite, the contents of a web page are encapsulated with an HTTP header, then by a TCP header, an IP header, and, finally, by a frame header and trailer. The frame is forwarded to the destination node as a stream of bits, where it is decapsulated into the respective PDUs and interpreted at each layer by the receiving node.

The result of encapsulation is that each lower-layer provides a service to the layer or layers above it, while at the same time each layer communicates with its corresponding layer on the receiving node. These are known as adjacent-layer interaction and same-layer interaction, respectively.

In discussions of encapsulation, the more abstract layer is often called the upper-layer protocol while the more specific layer is called the lower-layer protocol. Sometimes, however, the terms upper-layer protocols and lower-layer protocols are used to describe the layers above and below IP.

Watch videos about Encapsulation (networking)Explainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article Encapsulation (networking), written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Images, from Wikimedia Commons:

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.