Charging
AAA Transports
The first step when provisioning charging is to configure the network used for the different protocols, Rf and Ro. Ro can use a common interface, IPv4 address and MTU, or use specific per-protocol settings. The common settings are networking.oss.{interface,ipv4.addr,mtu}, whereas Ro uses networking.ro.{interface,ipv4.addr,mtu}.
Now the specific charging protocol settings can be configured. They are found under aaa.rf and aaa.ro. For both charging protocols, the following settings can be configured:
enabled: whether signalling will be sent on this interfacestandalone: whether the common settings for OSS will be used, or rather the separate settings will be used
A value of standalone: false will mean the protocol will use the values under aaa.oss for destinations,destinationRealm, originFqdn and originRealm. Otherwise the values under aaa.rf or aaa.ro will be used.
Then the specific transport protocol (TCP or SCTP) and socket options options need to be configured, both under aaa.rf or aaa.ro:
transportType: eithersctportcptransportOpts: specificreuseaddr: whether an existing socket inTIME_WAITstate is ignored when setting up the socketrecbuf: the buffer for incoming packets, in KBsndbuf: the buffer for ougoing packets, in KBunordered: (only usable for SCTP) whether messages can be sent unordered in the SCTP socket. Its recommended value istrue.nodelay: disables Nagle's algorithmOpens in a new tab; this may improve overhead in connections, but may cause latency for specific data to increase as they are not sent immediately
Configuration of sender identity in the Session-Id AVP
In the Diameter interfaces (Gx, Gy, NASREQ), the Session-Id AVP starts with the sender's identity. This identity can be configured through the aaa.originHost parameter. If it is not set, the SMC identity will be retrieved from the operating system.
This can also be modified directly in the ergw-config.json file under the entry "aaa"."apps"[0]."Origin-Host": "some.fqdn.name".
RADIUS charging
The aaa.radius.* parameters specify how RADIUS charging will be performed. RADIUS needs to enabled with aaa.radius.enabled set to true. The different phases of RADIUS accounting can be separately enabled with the aaa.radius.start.enabled, aaa.radius.interim.enabled and aaa.radius.stop.enabled parameters. Additionally, specific AVPs can be filtered out using aaa.radius.avp_filters if needed.
Sample configuration:
Separate servers for authorization and accounting can be used by setting aaa.radius.server.acct.standalone to true, and using aaa.radius.server.{acct,auth}.addr and aaa.radius.server.{acct,auth}.type:
Example:
RADIUS Accounting without Authentication
To enable RADIUS with only Accounting, without Authentication, and use start, stop and interim, use following configuration:
NASREQ settings
By default, interim accounting is enabled so NASREQ requests will be sent at the default rate (1800 seconds). However, this creates additional traffic on the PFCP interface which may not be desirable.
To disable interim messages in the NASREQ interface, it is possible to set the aaa.acctInterimInterval to null as in the following example:
Note
A null value cannot be used for aaa.acctInterimInterval if RADIUS stop or interim accounting are enabled.
Charging parameters
The triggers enabled for charging in the SMC vary depending on its role:
- SMC as SMF:
- charging containers updated at
cgi-sai-change,ecgi-change,qos-change,rai-change,tai-change,tariff-switch-changeanduser-location-info-change - CDRs sent at
ms-time-zone-change,rat-change,sgsn-sgw-changeandsgsn-sgw-plmn-id-change
- charging containers updated at
- SMC as TDF:
- charging containers updated at
sgsn-sgw-plmn-id-changeandtariff-switch-change - CDRs sent at
ms-time-zone-change
- charging containers updated at
The location-dependent triggers (cgi-sai-change, ecgi-change, rai-change, tai-change, and user-location-info-change) enable sending a Change Reporting Action (CRA) IE in the Create Session Response messages sent through the GTPv2 interface. Whether the CRA IE is sent and what value is included in it depend on the values of the CRSI and ENBCRSI indications in the Indication Flags IE, the access network type in the RAT Type IE, and the configured triggers. These IEs are taken from the original Create Session Request message. The following table describes the CRA IE value sent depending on different combinations of the indications and triggers:
More information about charging triggers can be found in TS 3GPP 32.251Opens in a new tab, sections 5.2.3.4 "Triggers for PGW-CDR charging information collection", 5.2.3.9 "Triggers for TDF-CDR charging information collection" and 5.2.3.10 "Triggers for PGW-CDR charging information collection when IP-CAN session charging is active".
Each rules definition under the applicationDetection section can include the corresponding policy items; any reference to AVP definitions can be checked in TS 3GPP 29.212, section 5.3 "Gx specific AVPs" (except as noted):
-
precedence
The order in which this rule will be applied if the flow definitions in several rules match the same flow. Corresponds to thePrecedenceAVP. -
permittedIPs
Sets the IPv4 addresses for which flows with the specificationpermit out ipv4 from <address> to assignedwill be added. -
type
Whether flow descriptions (classic) or an application name (adf) will be used to identify flows. -
additionalSDF(only applicable toclassictype)
The flow specification corresponding to theFlow-DescriptionAVP. The format for the flow description is described in RFC6733 (IPFilterRule). It is mapped to thePDI.SDF_Filter.Flow_Descriptionfield in PFCP. BothUPLINKandDOWNLINKdirections are set up. -
adftype
The name of the rule is used as the value for theTDF-Application-IdentifierAVP. -
meteringMethod
Describes what will be measured and reported in the flow specified in the element above. Each integer represents a different concept. In the packet switching domain, volume reporting is the usual setting. -
offlineEnabled
Set to 1 if offline charging is enabled. -
onlineEnabled
Set to 1 if online charging is enabled. -
ratingGroup
Rating Group applied to the flow. A description on the grouping of service usage can be found in RFC4006, section 5.1.2. -
offlineRatingGroup
The Rating Group defined for offline charging. Overrides the generalratingGroupsetting. -
onlineRatingGroup
The Rating Group defined for offline charging. Overrides the generalratingGroupsetting. -
Redirect-Information
When several rules are sent to the UPG, the rule to apply depends on a combination of flow specification and precedence, so the UPG will activate the highest-precedence rule that applies to the current flow. A rulebase selects several such rules to be sent to the UPG.