Multiple IPv4 - IPv6 address mapping encapsulation - prefix resolution (M46E-PR)
Naoki Matsuhira
WIDE Project
Japan
naoki.matsuhira@gmail.com
4 April 2022
IPv6
IPv4
This document specifies M46E Prefix Resolution (M46E-PR) specification. M46E-PR connect IPv4 stub networks between IPv6 backbone network. And also, M46E-PR can stack many IPv4 networks, i.e. the nwtworks using same IPv4 private addresses without interdependence.

Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Introduction
This document provide M46E Prefix Resolution (M46E-PR) specification.
The basic strategy for IPv6 deployment is dual stack. However, because of exhaustion of IPv4 address, there will be no IPv4 addresses for configuring dual stack in near future. That means there will be IPv6 only networks automatically.
However, there are many IPv4 only networks still exist and those seems continuous use in near future. That means methods continuous use of IPv4 network over IPv6 only network will be required.
M46E-PR also provide such methots.

Basic Network Configuration
Figure 1 shows network configuration with M46E-PR. The network consists of three parts, backbone network, stub network, and M46E-PR.
Backbone network can be operated with IPv6 only. Stub network has three cases, IPv4 only, Dual Stack (both IPv4 and IPv6), and IPv6 only.
M46E-FP connects backbone network and stub network in case IPv4 still works in that stub network. If stub network is IPv6 only, M46E-PR is not needed.
    /---------------------------------------------------\
    |                                                   |
    |                  Backbone Network                 |
    |                    (IPv6 only)                    |
    |                                                   |
    \---------------------------------------------------/
           |                   |                |
           |                   |                |
           |                   |                |
      +----------+       +----------+           |
    /-| M46E-PR  |-\   /-| M46E-PR  |-\   /--------------\
    | +----------+ |   | +----------+ |   |              |
    |              |   |              |   |              |
    | Stub Network |   | Stub Network |   | Stub Network |
    | (IPv4 only)  |   | (Dual Stack) |   | (IPv6 only)  |
    |              |   |              |   |              |
    \--------------/   \--------------/   \--------------/

Basic Function of M46E-PR
M46E-PR has mainly two function. One is IPv4 over IPv6 Encapsulation / Decapsulation, and another is generate a table where IPv4 stub network belong to IPv6 network.

IPv4 over IPv6 Encapsulation / Decapsulation
M46E-PR excapsulates IPv4 packet to IPv6 from stub network to backbone network, and decapsulates IPv6 packet to IPv4 from backbone network to stub network. Figure 2 shows packet format on both backbone network and stub network.

     +--------+------------+       +----------+--------+------------+
     |IPv4 Hdr|    Data    |  -->  | IPv6 Hdr |IPv4 Hdr|    Data    |
     +--------+------------+       +----------+--------+------------+

     +--------+------------+       +----------+--------+------------+
     |IPv4 Hdr|    Data    |  <--  | IPv6 Hdr |IPv4 Hdr|    Data    |
     +--------+------------+       +----------+--------+------------+

    /-------------------\  +----------+  /-----------------------------\
    |   Stub Network    |--| M46E-PR  |--|       Backbone Network      |
    |      (IPv4)       |  +----------+  |         (IPv6 only)         |
    \-------------------/                \-----------------------------/

M46A architecture
M46A is a IPv6 address used in outer IPv6 header which encapsulate IPv4 packet by M46E-PR. M46A is described in [I-D.draft-matsuhira-m46a].Figure 3 shows M46A address architecture.
    |        96 - m bits       |         m bits         |     32 bits  |
    +--------------------------+------------------------+--------------+
    |        M46A prefix       | IPv4 network plane ID  | IPv4 address |
    +--------------------------+------------------------+--------------+

M46E address consists of three parts as follows.
M46A prefix:
M46A prefix. This value is not a fixed value, and resolved packet by packet
IPv4 network plane ID: IPv4 network plane ID is an identifier of IPv4 network stack over IPv6 backbone network.
IPv4 address:
IPv4 address in inner IPv4 packet.

Resolving M46A
M46E-PR resolve M46A using M46E Prefix Resolution Table (M46E-PR Table). M46E-PR generate M46E-PR address resolving M46A prefix from IPv4 network plane ID and IPv4 address. Figure4 show this processing.
    |        96 - m bits       |         m bits         |     32 bits  |
    +--------------------------+------------------------+--------------+
    |        M46A prefix       | IPv4 network plane ID  | IPv4 address |
    +--------------------------+------------------------+--------------+

    \--------------------------/\--------------------------------------/
               ^                                     |
               |                                     |
               |                                     v
    +------------------------------------------------------------------+
    |                                                                  |
    |        M46E Prefix Resolution Table (M46E-PR Table)              |
    |                                                                  |
    +------------------------------------------------------------------+

Figure 5show M46E-PR Table. This table consists four parts, IPv4 network plane ID, IPv4 address, netmask, and M46A prefix.
   +---------------------+------------+-------++-----------------------+
   |IPv4 network plane ID|IPv4 address|netmask||M46A prefix            |
   +---------------------+------------+-------++-----------------------+
   |IPv4 network plane ID|IPv4 address|netmask||M46A prefix            |
   +---------------------+------------+-------++-----------------------+
   |IPv4 network plane ID|IPv4 address|netmask||M46A prefix            |
   +---------------------+------------+-------++-----------------------+
   |IPv4 network plane ID|IPv4 address|netmask||M46A prefix            |
   +---------------------+------------+-------++-----------------------+
                 :              :               :
   +---------------------+------------+-------++-----------------------+
   |IPv4 network plane ID|IPv4 address|netmask||M46A prefix            |
   +---------------------+------------+-------++-----------------------+

M46E-PR configured IPv4 network plane ID, so M46E-PR know IPv4 network plane ID value the interface belongs.
Resolving destination address, M46E-PR use pre-configured IPv4 network plane ID valude, and destination address of IPv4 packets, and serch the M46E-PR table. M46E-PR table return the M46E-PR address prefix value correspoiding IPv4 network plane ID and IPv4 destination address. Then M46E-PR generate whole M46E-PR address.
Resolving source address, M46E-PR already know IPv4 network plane ID value and IPv6 address prefix as M46E-PR prefix. So, searching the M46E-PR table does not require for resolving source address.

Mode of M46E-PR
M46E-PR has two working mode, one is router mode, another is host mode.

Router mode
In router mode, M46E-PR act as a IPv6 router. M46E-PR occupy IPv6 subnet, and M46E-PR advertise route for M46E-PR.

Host mode
In host mode, M46E-PR act as a IPv6 host. M46E-PR share IPv4 subnet, that mean, M46E-PR and IPv6 hosts exists on same IPv6 subnet. M46E-PR do proxy NDP function for IPv4 host.

Sample configuration
Figure 6shows sample confiuration of M46E-PR. In this example, there are three IPv4 stub network with the same IPv4 network plane.

 /------------\  /--------------------------------------/
 |            |  | Stub Network #1                      |
 |            |  |  2001:0db8:0:1::/64                  |
 |            |  | +--------+  /----------------------\ |
 |            |--| |M46E-PR |--|10.1.1.0/24(plane 1)  | |
 |            |  | +--------+  |                      | |
 |            |  |             \----------------------/ |
 |           <--[2001:0db8:0:1::/64]                    |
 |            |  /--------------------------------------/
 |            |
 |            |  /--------------------------------------/
 |            |  | Stub Network #2                      |
 |            |  |  2001:0db8:0:2::/64                  |
 | Backbone   |  | +--------+  /----------------------\ |
 | Network    |--| |M46E-PR |--|10.1.2.0/24(plane 1)  | |
 |            |  | +--------+  |                      | |
 |            |  |             \----------------------/ |
 |           <--[2001:0db8:0:2::/64]                    |
 |            |  /--------------------------------------/
 |            |
 |            |  /--------------------------------------/
 |            |  | Stub Network #3                      |
 |            |  |  2001:0db8:0:3::/64                  |
 |            |  | +--------+  /----------------------\ |
 |            |--| |M46E-PR |--|10.1.3.0/24(plane 1)  | |
 |            |  | +--------+  |                      | |
 |            |  |             \----------------------/ |
 |           <--[2001:0db8:0:3::/64]                    |
 |            |  /--------------------------------------/
 |            |
 \------------/

Figure 7 shows M46E-PR table for sample network.
   +---------------------+------------+-------++-----------------------+
   |IPv4 network plane ID|IPv4 address|netmask||M46E-PR address prefix |
   +---------------------+------------+-------++-----------------------+
   |        1            | 10.1.1.0   | /120  || 2001:0db8:0:1         |
   |        1            | 10.1.2.0   | /120  || 2001:0db8:0:2         |
   |        1            | 10.1.3.0   | /120  || 2001:0db8:0:3         |
   +---------------------+------------+-------++-----------------------+

IANA Considerations
This document makes no request of IANA.
Note to RFC Editor: this section may be removed on publication as an RFC.

Security Considerations
Security Considerations does not discussed in this memo.

Normative References
[I-D.draft-matsuhira-m46a]

Multiple IPv4 - IPv6 mapped IPv6 address
N. Matsuhira
1 June 2019