Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Encapsulation is a fundamental part of a layered approach to networking. The OSI model represents the expected order of encapsulation, but it is entirely possible to encapsulate lower layers within higher layers, or mix things up. Any protocol can be encapsulated within another.
Often, network tunnels are built by engineers seeking to expand the functionality of existing equipment and software. In particular, tunnels are often used to send data across WANs when the Layer 2/3 protocols in use on the endpoint LANs are not compatible with the intermediary network(s). Over time, tunneling protocols have also been developed to provide confidentiality and integrity for communications. Attackers use tunnels to smuggle data in and out of organizations, without anyone detecting the communications channel.