Problem Statement
Explain the concept of encapsulation and decapsulation in networking.
Explanation
Encapsulation is the process of wrapping data with protocol information at each layer of the OSI or TCP/IP model before transmission. For example, the transport layer adds headers like port numbers, and the network layer adds IP addresses. Decapsulation is the reverse process where the receiving device removes these headers layer by layer to retrieve the original data. Encapsulation ensures that each layer can process information independently and reliably, making communication structured and modular.