Figure 12 shows the protocol stack on a client, an IPSec gateway, and a server. In the figure, HTTP and TCP are examples of higher-level protocols involved in the end-to-end communication; other end-to-end communication protocols are also supported. The layers where the data can be encrypted are shown in gray.
Figure 12: IPSec Tunneling Stack

Figure 13 shows the packet encapsulation for IPSec tunneling.
Figure 13: IPSec Tunneling Packet Encapsulation
