Background
The Internet Assigned Numbers Authority (IANA) has allocated the last two “/8” address groups of its IPv4 address space in February 2011. IPv4 exhaustion has become a real problem that operators must face. There are some solutions to solve IPv4 address exhaustion, including IPv4 renumbering and address reuse, but none of them can fundamentally solve the problem of address exhaustion. From the existing address reserves of telecom operators, they can only support short-term development and cannot meet the needs of business development in the long run.
The introduction of IPv6 is considered to be the fundamental and direct solution to the exhaustion of IPv4 addresses, but the actual introduction of IPv6 has been slow. The essence is that IPv6 has not brought new business opportunities, but only solves the existing address problem. The existing alternative solutions can basically meet the actual deployment needs of operators, and the driving force for replacing IPv6 is insufficient.
Concept explanation
CGN (Carrier-Grade NAT, carrier-grade NAT) refers to large-scale NAT in a narrow sense (see Figure 3-2), specifically refers to the technology of statistical reuse of current public network IPv4 addresses through large-scale deployment of IPv4 private addresses. CGN can improve the utilization rate of IPv4 addresses, thereby solving the problem of IPv4 address exhaustion for a considerable period of time, ensuring smooth transition of services, and buying time for the deployment of IPv6 addresses. Because the mainstream IPv6 evolution solutions (such as Dual Stack+NAT444, DS-Lite) have introduced CGN, Huawei collectively refers to a series of IPv6 evolution solutions as CGN solutions.
CGN Port Allocation Mode
Port Pre-allocation
Port pre-allocation is also called Port Range mode, which means that when CGN maps private addresses to public addresses, it pre-allocates a public address and a port segment to a private address, and all NAT mappings of the private address use the public address and ports in the port segment. If the number of ports used by the user exceeds the pre-allocated port segment size, no more ports will be allocated to the private address.
Port Semi-Dynamic Allocation
Port semi-dynamic allocation is also called Semi-Dynamic port allocation mode, which is an extension of the Port Range mode, expanding the parameters of Port Range to three parameters: initial port segment size, extended port segment size, and maximum allowed number of expansions. When a user accesses the network, CGN first allocates a port segment of the initial port segment size to the user, and then allocates ports in the port segment. If the number of ports used by the user exceeds the initial port segment size, a port segment is allocated according to the expanded port segment size. The number of times the expanded port segment is allocated is determined by the maximum number of expansions allowed.
Dynamic port allocation
Dynamic port allocation is a Port Dynamic mode, which means that when CGN maps private addresses to public addresses, it pre-allocates a public address and a port segment with a fixed port segment size of 64 to a private address. If the number of ports used by the user exceeds the initial port segment size, a fixed-size port segment is allocated to the user according to the port segment size of 64, and there is no limit on the maximum number of expansion allocations.
Port-by-port allocation
Port-by-port allocation is also a Port Dynamic mode, which means that a port is allocated each time a new flow table is created, and the port segment is not pre-allocated. Therefore, the port utilization rate of the public address in this mode is the highest, which is suitable for situations where IPv4 or IPv6 public addresses are relatively scarce.
Leave a comment