No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


NE20E-S2 V800R010C10SPC500 Feature Description - NAT and IPv6 Transition 01

This is NE20E-S2 V800R010C10SPC500 Feature Description - NAT and IPv6 Transition
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
MAP-T/MAP-E Mapping Rules

MAP-T/MAP-E Mapping Rules

Port Mapping

Concept of A+P

From the perspective of IPv4 addresses and transport layer ports, the number of 32-bit IPv4 addresses is limited, and a few 16-bit transport layer ports (transport port) are used. Therefore, the IPv4 addresses can be extended by using the transport layer ports.

MAP mapping also uses the A+P concept that maps a pair of a public IPv4 address and a port number to an IPv4 private address. In MAP, 16 bits of a transport layer port number are divided into three parts: A, port-set ID, and M.

About A and a

Ports 0 through 1023 are well-known port numbers. It is recommended that ports 0 through 1023 be extended to ports 0 through 4095 (2^12 ports in total) in MAP. The default value of a is 4 (16 bits - 12 bits). a is set to a non-zero value. If a is set to 0, ports in all port ranges can be allocated.

About port-set ID and k

Size k of a port-set ID determines a sharing ratio, and the sharing ratio is 2^k. The transport layer port range contains 2^k ports, and each port is assigned to a single CPE. Each CPE that shares the IPv4 address obtains a unique port-set ID that identifies a unique port set.

About m

Size m of the M field determines a contiguous block of ports in a port set. The continuous length is 2^m.

Consequently, a total of 2^k port sets are obtained. Each port set is identified by a unique port-set ID. A port set identified by each port-set ID contains a number of [(2^a) - 1] x (2^m) ports.

The following is an example of a MAP mapping rule:

m = 2 can be calculated based on the sharing ratios of R = 1024 and a = 4. The following table lists port-set IDs and matching port sets.

Each given unique port-set ID is mapped to a fixed port set.

Address Mapping

The mapping between IPv4 and IPv6 addresses is implemented by embedding a part of IPv4 addresses and some attributes of ports into IPv6 addresses. The attribute part of IPv4 addresses is IPv4-Addr-suffix, and that of a port set is a port-set ID. The IPv4 address and port information is closely associated with IPv6 addresses to create stateless mapping.

Figure 3-5 Mapping between IPv4+Port addresses and IPv6 addresses

In Figure 3-5, the mapping between IPv4+Port and IPv6 addresses shows that the public IPv4 address and port sequence can be derived based on the attributes, including the End-user IPv6-prefix, Rule-IPv6-prefix, EA-bits, Rule-IPv4, and Port-Set ID offset, regardless of the MAP-CE or MAP-BR. The MAP technology combines an IPv4 address and a port-set ID to create an interface ID to identify a MAP-CE. The interface ID is combined with the End-user IPv6-prefix to form an IPv6 address, which uniquely identifies the MAP-CE in a MAP domain.

IPv4address field: If a public IPv4 address is allocated, the IPv4address field is set to the allocated IPv4 address, and the length is 32 bits. If the IPv4address field is allocated to an IPv4 user (possibly an enterprise user), this field needs to be padded with 0s. For example, if an IPv4 prefix of is allocated to a user, the IPv4address field must be set to 0xC0000200 (hexadecimal).

Port-Set ID field: If the port-set ID extracted from the EA-bits field is less than 16 bits, pad 0 on the left. For example, if the Port-Set ID field value is 0xAC, 0s are padded to generate value 0x00AC. If an IPv4 prefix or an exclusive IPv4 address is assigned, no port set ID is extracted, and the Port-Set ID field value is 0x0000.

To create stateless mapping, close associations have been established between IPv6 addresses and the pairs of IPv4 addresses and ports of the IPv4 address sharing users in the MAP domain. In addition, an IPv6 address can uniquely identify a user in the MAP domain.

Mapping Rule Definition

In MAP technology, there are three MAP rules: basic mapping rule (BMR), forwarding mapping rule (FMR), and default mapping rule (DMR). The DMR is called destinations outside the MAP domain.

BMR (mandatory)

A BMR is used to compute an IPv4 address, a port set, and an IPv6 address of a MAP-CE. The BMR must be configured on MAP-CEs and the MAP-BR. MAP-CEs use this rule to perform NAT44 and IPv6 translation and encapsulation for IPv4 user data. The MAP-BR uses this rule to perform the following operations:
  • Decapsulates or removes tunnel information from IPv6 packets for IPv4 addresses.
  • Performs IPv6 translation and encapsulation based on IPv4 addresses and ports for return traffic and forwards the traffic to MAP-CEs over IPv6 routes in the MAP domain.

The basic BMR parameters include the Rule-IPv6-prefix, Rule-IPv4-prefix, EA-bits-length, and Port-Set ID-offset. These parameters can be used on a MAP-CE to calculate the shared IPv4 address and port sequence and the IPv6 address of the MAP-CE.

In the MAP domain, multiple sub-domains can be divided based on the IPv4 subnet logic. Each IPv4 subnet serves as a sub-domain. Mapping rules on all MAP-CEs in each sub-domain can be summarized to a single rule. Each MAP-CE is assigned a particular End-user IPv6-prefix and the same BMR.

FMR (optional)

An FMR is used to allow MAP-CEs to communicate with one another on a mesh network, without passing through the MAP-BR. When a local MAP-CE accesses another MAP-CE, the destination IPv6 address must be set to the address of the peer MAP-CE. The source IPv6 address in packets is generated based on the BMR, and the IPv6 address of the destination MAP-CE is to be converted based on the FMR. The MAP-CEs use the same BMR (in a certain range). Therefore, the FMR and BMR can be the same. Therefore, a BMR can be configured as an FMR.

For example, a BMR is the same as an FMR a MAP domain. When the IPv4 service of a MAP-CE2 user accesses the IPv4 service of a MAP-CE1 user, MAP-CE2 uses NAT44 and the BMR to generate a source IPv6 address and uses the FMR to generate the IPv6 address of the destination MAP-CE1.

DMR (optional)

Different from the BMR and FMR that apply to both MAP-E and MAP-T scenarios, DMRs differ between MAP-E and MAP-T scenarios:
  • MAP-T: Based on the DMR, the destination IPv4 address in packets is an address outside a MAP domain, and packets carrying such a destination IP address are forwarded outside the MAP domain through the MAP-BR. The DMR defines the Rule-IPv6-prefix and Rule-IPv4-prefix. The Rule-IPv6-prefix value is set to the IPv6 prefix of the MAP-BR. The Rule-IPv4-prefix value is set to A MAP-CE uses the DMR as a default mapping rule for matching IPv4 routes. In the following figure, after the DMR is used, the destination IPv6 address is generated using the Rule-IPv6-prefix configured based on the DMR and destination IPv4 address.
    Figure 3-6 Destination IPv6 address format
  • MAP-E: The DMR refers to destinations outside the MAP domain. In MAP-E, an IPv6 header has an IPv4 address embedded. Therefore, if the destination IPv4 address in packets is an address outside a MAP domain, the MAP-BR's IPv6 address merely needs to be encapsulated. When the packet reaches the MAP-BR, the MAP-BR removes the IPv6 header to restore the destination IPv4 address. In MAP, using the DMR is to configure the MAP-BR's IPv6 address.
Updated: 2019-01-02

Document ID: EDOC1100055472

Views: 2650

Downloads: 3

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next