Use Subscriber CGNAT Address Mapping in Juniper BNG CUPS

Overview of Subscriber CGNAT Address Mapping

Subscriber CGNAT address mapping and accounting integration correlates each subscriber session with its assigned private IPv4 address and the corresponding public IPv4 address and carrier-grade NAT (CGNAT) port block allocations created by network address port translation (NAPT). The system learns allocation and release events from CGNAT syslog messages, maintains a per-subscriber mapping database in the BNG CUPS Controller where subscriber state is anchored, and makes the mapping available. The system can also export mapping details to downstream accounting and traceability systems by sending RADIUS Accounting vendor-specific attributes (VSAs), including timestamps and one attribute instance per port block.

When you enable subscriber CGNAT address mapping, the BNG CUPS Controller builds a per-subscriber mapping table by accepting CGNAT allocation and release events through syslog and correlating those events to an active subscriber session. The mapping table uses the subscriber session identifier as the key and stores the private IPv4 address, the public IPv4 address, and one or more allocated port block ranges.

As the CGNAT function allocates or releases port blocks, it sends syslog messages. The mapping service parses the messages, updates the mapping database, and makes the updated state available for operational queries and RADIUS accounting export.

Configuring CGNAT in BNG CUPS Controller

Configure the mapping service in the control plane instance context where the subscriber state is anchored. For example, in a centralized control plane deployment, enable CGNAT mapping under the control-plane-instances stanza so the BNG CUPS Controller learns the mappings even when subscriber forwarding occurs on separate BNG User Planes. On the BNG CUPS Controller, perform the following configuration:

After completing the configuration, the mapping service listens for CGNAT syslog events on UDP port 514.

Operational Output and RADIUS Accounting Export

After the mapping exists, you can retrieve the mapping from the show subscribers id subscriber-id command output. The command displays the session and associated private-address, public-address, and port-block entries. If a subscriber receives multiple blocks, the output includes multiple port-block instances for the same session.

For downstream traceability systems, the system exports the mapping through RADIUS accounting using the VSA 26-238 NAPT-Block-Info. The system shows one attribute instance per port block and includes timestamps.

If your deployment supports both external CGNAT and local NAT behavior, select the appropriate service in the subscriber’s dynamic profile and update it with variables. For example, you can enable external NAPT per session at the external-napt stanza using external-napt disable:$junos-ext-napt-enable; (see the following example).