< Home

Overview of Static Mapping

This section describes the concepts and principles of static mapping.

Static mapping applies to NAT444 networks. By configuring the mapping among the private IP address pool, public IP address pool, and port range, you can improve the source tracing efficiency.

In most cases, static mapping is configured on the NMS server. The NMS server generates and maintains a static mapping table and delivers the static mapping to the CGN and AAA server, so that they can perform such operations as NAT and authentication based on the mapping.

If the NMS fails to deliver commands, you can run commands on the CGN to configure static mapping and adjust the configurations. This chapter focuses on the configuration of this static mapping.

To implement static mapping, ensure that the CGN and the AAA server maintain the same static mapping table. Otherwise, authentication or source tracing may fail. This problem does not occur in the scenarios where the NMS server globally delivers the static mapping.

Static mapping is a rapid NAT algorithm proposed by China Telecom. Based on the collected address mapping information, including the private IP address pool, public IP address pool, and port range allocated for public addresses, the NMS generates mappings using the algorithm, therefore implementing rapid NAT and sourcing user addresses.

There are multiple static mapping relationships, as shown in Figure 1, Figure 2, and Figure 3. The private addresses, public addresses, and number of ports are only used as examples. The actual number and proportion depend on the actual networking. On a device, address sections in an address pool are sorted in ascending order. Addresses in an address section are sorted in ascending order. Ports in a port range are sorted in ascending order.

Figure 1 Static mapping schematic diagram 1

By default, the device uses an address pool as a unit to calculate mappings between public and private addresses and preferentially translate ports. Figure 1 shows the static mappings. Assume that each private address section has n addresses, each public address section has m addresses, and each public address is assigned n port ranges. User address mappings are created as follows:
  1. N addresses in private address section 1 correspond to the first address in public address section 1 and the port range corresponding to the public address.
  2. N addresses in private address section 2 correspond to the second address in public address section 1 and the port range corresponding to the public address.
  3. Subsequent addresses follow the same mapping rule. If addresses in public address section 1 are used up, public address section 2 is used.
Then, the following mappings are formed:
  • Private address a1 maps with public address A1 + port range c1

  • Private address a2 maps with public address A1 + port range c2

  • .........

  • Private address an maps with public address A1 + port range cn

  • Private address b1 maps with public address A2 + port range c1

  • Private address b2 maps with public address A2 + port range c2

  • .........

  • Private address bn maps with public address A2 + port range cn

Figure 2 Static mapping schematic diagram 2

Figure 2 shows the static mappings when the device uses an address pool as a unit to calculate mappings between public and private addresses and preferentially translate addresses. Assume that each private address section has 2n addresses, each public address section has n addresses, and each public address is assigned n port ranges. User address mappings are created as follows:
  1. The first n addresses in private address section 1 correspond to n addresses in public address section 1 and the smallest port range corresponding to the public addresses. If addresses in public address section 1 are used up, public address section 2 is used.
  2. The second n addresses in private address section 1 correspond to n addresses in public address section 2 and the smallest port range corresponding to the public addresses.
  3. The first n addresses in private address section 2 correspond to n addresses in public address section 1 and the second smallest port range corresponding to the public addresses. If addresses in public address section 1 are used up, public address section 2 is used.
  4. The second n addresses in private address section 2 correspond to n addresses in public address section 2 and the second smallest port range corresponding to the public addresses.
  5. Subsequent addresses follow the same mapping rule.
Then, the following mappings are formed:
  • Private address a1 maps with public address A1 + port range c1

  • Private address a2 maps with public address A2 + port range c1

  • .........

  • Private address an maps with public address An + port range c1

  • Private address an+1 maps with public address B1 + port range c1

  • Private address an+2 maps with public address B2 + port range c1

  • .........

  • Private address a2n maps with public address Bn + port range c1

  • Private address b1 maps with public address A1 + port range c2

  • Private address b2 maps with public address A2 + port range c2

  • .........

  • Private address bn maps with public address An + port range c2

  • Private address bn+1 maps with public address B1 + port range c2

  • Private address bn+2 maps with public address B2 + port range c2

  • .........

  • Private address b2n maps with public address Bn + port range c2

Figure 3 Static mapping schematic diagram 3

Figure 3 shows the static mappings when the device uses a section as a unit to calculate mappings between public and private addresses. Assume that each private address section has 3n addresses, each public address section has n addresses, and each public address is assigned 3 port ranges. User address mappings are created as follows:
  1. The smallest three addresses in private address section 1 correspond to the first address in public address section 1 and the port range corresponding to the public address.
  2. The second smallest three addresses in private address section 1 correspond to the second address in public address section 1 and the port range corresponding to the public address.
  3. Subsequent addresses follow the same mapping rule.
Then, the following mappings are formed:
  • Private address a1 maps with public address A1 + port range c1

  • Private address a2 maps with public address A1 + port range c2

  • Private address a3 maps with public address A1 + port range c3

  • .........

  • Private address a3n-2 maps with public address An + port range c1

  • Private address a3n-1 maps with public address An + port range c2

  • Private address a3n maps with public address An + port range c3

  • Private address b1 maps with public address B1 + port range c1

  • Private address b2 maps with public address B1 + port range c2

  • Private address b3 maps with public address B1 + port range c3

  • .........

  • Private address b3n-2 maps with public address Bn + port range cn

  • Private address b3n-1 maps with public address Bn + port range cn

  • Private address b3n maps with public address Bn + port range cn

Figure 4 shows the implementation process of static mapping.

Figure 4 Diagram for the mechanism of static mapping

  1. The NMS server collects static mapping elements (including private addresses, public addresses, and port range), generates a static mapping table, and delivers the mapping to the CGN and AAA server.
  2. When a private IPv4 network user attempts to access the IPv4 Internet, an IPv4 packet is sent to the CPE.
  3. After receiving the IPv4 packet, the CPE translates the level-1 private address in the packet header into a level-2 private address and forwards the resulting packet to the CGN.
  4. After receiving the packet, the CGN translates the level-2 private address into a public IPv4 address based on the static mapping table and assigns the specified port range.
  5. The AAA server performs authentication, authorization, and accounting on the user and records and maintains information, such as the billing information and user account.
If the NMS fails to deliver commands, you can manually configure static mapping and adjust the configurations on the CGN. In this case, the IP addresses of subsequent packets are translated based on the new static mapping table.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >