Generally, a process by which a lower-layer protocol receives data from a higher-layer protocol and then places the data into the data portion of its frame. Thus, encapsulation is the process of enclosing one type of packet using another type of packet.
Encapsulation at the lowest levels of the Open Systems Interconnection (OSI) reference model is sometimes referred to as framing. Examples of encapsulation include the following:
The data-link layer (layer 2) of the OSI model for networking is responsible for encapsulation or framing of data for transmission over the physical medium. In local area network (LAN) technologies, this is usually Carrier Sense Multiple Access with Collision Detection (CSMA/CD) for Ethernet networks. For wide area network (WAN) technologies, the data-link protocols used depend on whether the communications are point-to-point or multipoint: