HP VPN Firewall Appliances VPN Configuration Guide

63
Figure 59 Principle of IPv4 over IPv4 tunneling
Packets traveling through a tunnel undergo encapsulation and de-encapsulation, as shown in Figure 59.
Encapsulation:
a. Device A receives an IP packet from an IPv4 host and submits it to the IP protocol stack.
b. The IP protocol stack determines how to forward the packet according to the destination
address in the IP header. If the packet is destined for the IPv4 host connected to Device B,
Device A delivers the packet to the tunnel interface.
c. The tunnel interface adds a new IPv4 header to the IPv4 packet and submits to the IP protocol
stack. In the new header, the source IP address specifies the tunnel source and the destination
IP address specifies the tunnel destination. The IP protocol stack uses the destination IP address
of the new IP header to look up the routing table and sends the packet out.
De-encapsulation:
a. After receiving the packet, Device A delivers it to the IP protocol stack.
b. If the protocol number is 4 (indicating an IPv4 packet is encapsulated within the packet), the IP
protocol stack delivers the packet to the tunnel module for de-encapsulation.
c. The tunnel module de-enc
apsulates the IP packet and sends it back to the IP protocol stack.
d. The protocol stack forwards the de-encapsulated packet.
IPv4 over IPv6 tunneling
IPv4 over IPv6 tunneling enables isolated IPv4 networks to communicate with each other over an IPv6
network.
Figure 60 Principle of IPv4 over IPv6 tunneling