Broadband users of a metropolitan area network are in a huge quantity, and are a main force of consuming Internet Protocol version 4 (IPv4) addresses. In the face of exhaustion of IPv4 addresses, introducing the Internet Protocol version 6 (IPv6) is an inevitable trend of network evolution. However, before IPv4 addresses are exhausted, an operator network, a service platform, a terminal, and an Internet content provider (ICP) are unable to fully support the IPv6 and to have commercial capabilities of the IPv6. In a transition period of the IPv6, a CGN technology is introduced to extend a life cycle of the IPv4 in order to ensure steady service transition and gain time for IPv6 deployment.
When using a network address translation (NAT) 444 technology, an independent CGN device such as a firewall currently supports only a centralized scenario. In a distributed scenario, there are still some problems when the CGN device uses the NAT444 technology. The centralized scenario refers to a scenario in which there is only one CGN device that performs address translation, and the distributed scenario refers to a scenario in which there are multiple CGN devices that perform address translation.
However, in a CGN dual-active scenario, both CGN devices have a function of allocating a public network address and a port range to a private network address. Therefore, the following scenario exists. Two CGN devices receive different packets from a same private network address, and the two CGN devices each allocate a public network address and a port range to the private network address, and therefore, the private network address may obtain two different public network addresses and two different port ranges.
However, to meet a source tracing requirement, the CGN device requires that a source private network address obtain a same public network address and a same port range regardless of a CGN device that is in a CGN dual-active scenario and to which data flows with the same public network address are offloaded. However, the foregoing scenario contradicts source tracing, and cannot ensure source tracing consistency.