IPv4 over IPv6 tunneling

Implementation

IPv4 over IPv6 tunneling adds an IPv6 header to IPv4 packets so that the IPv4 packets can pass an IPv6 network through a tunnel to realize interworking between isolated IPv4 networks.

Figure 120: IPv4 over IPv6 tunnel

Figure 120 shows the encapsulation and de-encapsulation processes.

Tunnel modes

As shown in Figure 121, the DS-Lite feature contains the following components:

Figure 122: Packet forwarding process in DS-Lite

As shown in Figure 122, the packet forwarding process in DS-Lite is as follows:

  1. Upon receiving a packet from the private IPv4 network, the B4 router adds an IPv6 header to the packet and sends the IPv6 packet to the AFTR through the tunnel.

  2. The AFTR performs the following operations:

    • Removes the IPv6 header from the tunneled packet.

    • Assigns a tunnel ID to the B4 router.

    • Records the mapping between the IPv6 address of the B4 router (the source IPv6 address of the packet), and the tunnel ID.

  3. After de-encapsulation, the AFTR translates the source private IPv4 address of the packet into a public IPv4 address and sends the packet to the destination IPv4 host. The AFTR also maps the NAT entries to the tunnel ID so that IPv4 networks connected to different B4 routers can use the same address space.

  4. Upon receiving the response packet from the public network, the AFTR translates the destination public IPv4 address into the private IPv4 address. The AFTR performs the following operations:

    • Looks up the IPv6 address-tunnel ID mapping to obtain the IPv6 address of the B4 router.

    • Uses the address as the destination address of the encapsulated IPv6 packet.

    • Forwards the packet to the B4 router.

Figure 122 shows an example of PAT translation for dynamic NAT. Typically, dynamic NAT is used. When you use static NAT for DS-Lite tunneling, make sure the IP addresses of private IPv4 networks connected to different B4 routers do not overlap. For more information about NAT, see "Configuring NAT."