Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dpi:bras_bng:radius_integration:radius_accounting:start [2023/10/26 14:20] – [Accounting – traffic accounting] elena.krasnobryzh | en:dpi:bras_bng:radius_integration:radius_accounting:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Accounting – traffic accounting====== | ||
- | {{indexmenu_n> | ||
- | FastPCRF supports the Radius accounting. FastDPI transmits subscribers' | ||
- | Add the following parameters in **/ | ||
- | * to enable accounting | ||
- | < | ||
- | <note important> | ||
- | |||
- | * you need to activate the billing [[en: | ||
- | < | ||
- | # statistics on the subscriber' | ||
- | netflow=4 | ||
- | # timeout for statistics to be sent | ||
- | netflow_timeout=60 | ||
- | netflow_as_direction=1 | ||
- | </ | ||
- | <note important> | ||
- | |||
- | * you need to activate the [[en: | ||
- | |||
- | * [[en: | ||
- | |||
- | <note important> | ||
- | |||
- | ===== Additional Settings ===== | ||
- | |||
- | [Stingray Service Gateway 8.1+] When fastPCRF starts it sends the Accounting-Request request containing the '' | ||
- | |||
- | [Stingray Service Gateway 8.1+] Some billing systems require accounting and authorization requests to be syncronized: | ||
- | |||
- | < | ||
- | acct_auth_sync=1 | ||
- | |||
- | # [SSG 9.5.3+] Delay in seconds when synchronizing acct and auth (LanBilling) | ||
- | # When the acct_auth_sync mode is enabled, the SSG, after receiving confirmation | ||
- | # from Radius (billing) that Acct-Stop is accepted, immediately sends an Access-Request. | ||
- | # In some cases, between the confirmation of Acct-Stop and the sending of Access-Request | ||
- | # it is need to insert a small delay so that all transients in billing | ||
- | # passed and the Access-Request was successfully processed and an Access-Accept was received. | ||
- | # This parameter defines the extent of this delay in seconds. | ||
- | # Default = 0 (no delay). | ||
- | # acct_auth_sync_delay = 0 | ||
- | |||
- | </ | ||
- | |||
- | When synchronization is enabled, SSG checks whether the given IP address has an active accounting session before sending the Access-Request. If there is such session, DPI sends a Stop accounting request, waits for a response and only then sends an Access-Request authorization request. | ||
- | |||
- | [Stingray Service Gateway 8.3+] There are different concepts of what is “incoming” and “outgoing” traffic. In case of SSG incoming traffic is the one that comes to the subscriber from inet, while outgoing is what goes to inet from the subscriber. Some systems are desined differently - you can invert directions in accounting for such cases. Use the parameter acct_swap_dir: | ||
- | |||
- | < | ||
- | # To change traffic direction in accounting Radius-attributes | ||
- | # 0 (default) - no changes | ||
- | # 1 - swap the incoming/ | ||
- | acct_swap_dir=0</ | ||
- | |||
- | <note important> | ||
- | |||
- | The start/end of the accounting session is usually initiated by fastDPI, but the internal accounting database is maintained in fastPCRF. FastDPI delivers traffic consumption raw data by subscriber to the database, while fastPCRF aggregates the data and converts it to the Radius Accounting format. The interaction between fastDPI and fastPCRF is handled through the exchange of internal messages over the network by closed protocol. In case of accounting lost internal messages might lead to an endless accounting session (lost " | ||
- | < | ||
- | # PCRF pending queue parameters | ||
- | # PCRF pending queue is designed to smooth short-term PCRF inaccessibility | ||
- | # Requests to PCRF may be binding (e.g. Acct Start/Stop) | ||
- | # or optional for delivery (e.g. all authorization requests, - if such request | ||
- | # disappeares, | ||
- | # Only the binding for delivery requests get into pending queue. | ||
- | |||
- | # Maximum time for a request being in the pending queue, sec (default=300 sec) | ||
- | # Requests older than this time will not be sent to PCRF | ||
- | # | ||
- | # Max size pending queue, default=10000 requests | ||
- | # When this size is reached, the first requests in the queue will be deleted. | ||
- | # | ||
- | |||
- | ===== Internal design ===== | ||
- | The accounting database is placed in fastPCRF and is in-memory. DB is two-level: | ||
- | * The lower raw layer is responsible for storing data from fastDPI. The key here is the IP address. | ||
- | * The upper level aggregation combines one or more raw-level records into an accounting session. | ||
- | |||
- | Using CLI commands you can manipulate accounting data, start and end sessions and watch internal statistics. | ||
- | |||
- | <note important> | ||
- | |||
- | <note important> | ||
- | |||
- | ===== FastDPI restart ===== | ||
- | {{anchor: | ||
- | |||
- | When starting/ | ||
- | |||
- | In SSG 9.5.3+, two possible processing strategies are regulated by the fastpcrf.conf parameter: | ||
- | < | ||
- | # How to handle a fastdpi-server restart: | ||
- | # 0 - when stopping/ | ||
- | # specifying NAS-attributes of the fastDPI-server, | ||
- | # stop without sending Acct-Stop. | ||
- | # 1 - when stopping/ | ||
- | # Accounting-Off/ | ||
- | # Default value: 1 | ||
- | acct_fastdpi_session_stop = 1 | ||
- | </ | ||
- | |||
- | By default '' | ||
- | |||
- | ✔ for each fastdpi server (the option [[en: | ||
- | |||
- | ✔ to identify fastPCRF (which also sends Acct-On/ | ||
- | |||
- | Actions of the Radius server when receiving Acct-On/ | ||
- | |||
- | * if NAS-attributes (NAS-Identifier and/or NAS-IP-Address) refer to fastDPI, all acct-sessions initiated by this fastDPI should be closed; | ||
- | * if NAS-attributes identify fastPCRF, all active acct sessions should be closed (all sessions from fastDPI that are served by this fastPCRF) |