The IPsec feature security protocols use two different modes to protect the entire IP payload or the upper layer protocols:
Transport mode
Tunnel mode
Tunnel mode IPsec protects the whole IP packet. In tunnel mode, IPsec inserts the IPsec header between another IP datagram IP header and inner IP header.