Encapsulation (networking)
From Wikipedia, the free encyclopedia
In computer networking, "encapsulation" is to include data from an upper layer protocol into a lower layer protocol. This is a method of abstraction for networking by allowing different layers to add features/functionality.
For example (see image), the internet is based upon the Internet Protocol (IP — specifically IPv4) and most applications use either the User Datagram Protocol (UDP) or Transmission Control Protocol (TCP). Thus, a chunk of user data is encapsulated in a UDP datagram which is then encapsulated in an IP packet which is then sent over a data link layer protocol (e.g., Ethernet). The data link layer is responsible for physical transmission of the data; IP adds addressing of individual computers; UDP adds "application addressing" (i.e., the port specifies the service like a web or TFTP server).
Both the OSI model and internet protocol suite use encapsulation.
When encapsulating, the more abstract layer is called the upper layer protocol (ULP) while the more specific layer is called the lower layer protocol (LLP). In the example given, UDP is the ULP to IP while ethernet is the LLP to IP.