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

Reminder

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

upgrade

NE40E V800R010C00 Feature Description - NAT and IPv6 Transition 01

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).
NAT Port Allocation Modes

NAT Port Allocation Modes

In an integrated scenario, a NAT device initiates NAT port allocation after receiving the first packet sent by a specific private IP address. In a distributed scenario, port allocation takes place during user login.

Port Pre-Allocation

Port pre-allocation, also called the port range mode, enables a NAT device to pre-allocate a public IP address and port segment to a private IP address when a NAT device is mapping the private IP address to the public IP address. The public IP address and ports in the port segment are used in NAT mapping for the private IP address.

Semi-Dynamic Port Allocation

The semi-dynamic port allocation (Semi-Port Dynamic) mode is an extension of the port range mode. Semi-dynamic port allocation extends a single port segment in the port range mode to three parameters: the initial port range, the extended port range, and the maximum number of times a port range is extended. When users go online, a NAT device assigns an initial port segment and ports in the initial segment to users. If the number of used ports exceeds the initial port segment size, the NAT device assigns an extended port segment. The maximum number of extensions indicates the number of times extended port segments can be assigned.

Dynamic Port Allocation

Dynamic port pre-allocation (Port Dynamic) enables a NAT device to pre-allocate a public IP address and a port range with 64 ports to a private IP address. If the number of used ports exceeds the initial port range size, the NAT device assigns another port range with 64 ports to the user. The allocation process repeats without a limit on the maximum number of extended port ranges.

Dynamic port allocation supports interface multiplexing and non-interface multiplexing modes:
  • Interface multiplexing dynamic port allocation

    When receiving packets destined for different public IP addresses, a NAT device can map the private IP addresses and port numbers to the same public IP address and port number.

  • Non-interface multiplexing dynamic port allocation

    When receiving packets destined for different public IP addresses, a NAT device cannot map the private IP addresses and port numbers to the same public IP address and port number.

Per-port allocation

Per-port allocation is a dynamic port allocation mode. Specifically, a port, instead of a port segment, is allocated each time a flow table entry is created. Such a mode features the highest port usage of a public IP address and therefore is used when few IPv4 jiupublic IP addresses exist or when few ports are required for services.

Table 3-1  Comparison between port allocation modes

Port Allocation Mode

Advantage

Disadvantage

Port pre-allocation

A fixed port range is pre-allocated to the users who are using the same public IP address.

Whether the port range meets the requirement cannot be guaranteed.

Semi-dynamic port allocation

A fixed port range is pre-allocated to the users who are using the same public IP address. In this mode, if the port range exceeds the limit, you can configure the number of extension times within a specified range.

This mode is preferred to the dynamic port allocation mode although it also cannot ensure that all users have sufficient port allocation.

Dynamic port allocation

A fixed port range is pre-allocated to the users who are using the same public IP address. In this mode, if the port range exceeds the limit, you can set the number of extension times to any value.

If a user needs to use a lot of ports, the number of ports allocated to other users may be insufficient. In this scenario, the semi-dynamic port allocation mode has an advantage because it allows for even port allocation to each user.

Per-port allocation

No port range is pre-allocated, Each port is allocated when a new flow table is created.

This mode is suitable for scenarios where public IPv4 addresses are few.

Taking the port pre-allocation mode as an example, after the port-range command is run in the NAT, DS-Lite, or NAT64 instance view, the system pre-allocates a port range to private network users to perform NAT. Running the port-range command in the NAT, DS-Lite, or NAT64 instance view indicates that this instance uses the port pre-allocation mode. The port-range command also specifies the size of a port range. The start and end port numbers are automatically generated.

As shown in Figure 3-5, after port-range 1024 is configured on the CGN device, port segment [1024,2047] is allocated to CPE1 and port segment [2048,3071] is allocated to CPE2.
Figure 3-5  CGN port pre-allocation
Port pre-allocation can be used in two scenarios:
  • If a CGN board is inserted into a BRAS, the CGN board pre-allocates a port segment upon user online and releases the port segment upon user offline.
  • If a standalone CGN device is deployed, the CGN device allocates a port segment (for a specific source IP address) upon receipt of data flows and releases a port segment through the aging mechanism.

If a large number of ports need to be used within a specific period of time, new connections may fail to be set up for users after the first-time port allocation, and the use of some applications will be affected. In this case, users have to either shut down some applications or go online again, which is quite complex. To address this issue, incremental port allocation is introduced.

Download
Updated: 2018-07-04

Document ID: EDOC1100027155

Views: 21995

Downloads: 72

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