You must configure an accounting scheme before implementing accounting for users.
Users successfully go online after they are authenticated and authorized, and accounting starts when they access services. Accounting is performed based on online duration, traffic volume, or both. The accounting process is as follows: The NetEngine 8000 F collects statistics about the online duration and the upstream and downstream traffic, and sends the statistics to the RADIUS server in the format specified by the RADIUS protocol. The RADIUS server then returns a message indicating whether the accounting succeeds.
Perform the following steps on the router:
The system view is displayed.
The AAA view is displayed.
Real-time accounting backup is enabled between the master and slave main control boards.
The realtime-accounting backup enable command needs to be run if the RADIUS server has a strict requirement on the interval at which real-time accounting packets are sent. After this command is run, the real-time accounting timer is reset on the master and slave main control boards. In this manner, even if a master/slave main control board switchover occurs during the interval for sending real-time accounting packets, the NetEngine 8000 F still sends real-time accounting packets at the configured interval.
An accounting scheme is created.
An accounting mode is configured.
The NetEngine 8000 F supports RADIUS accounting, HWTACACS accounting, and non-accounting.
Only administrative users, not common BRAS users, support HWTACACS accounting.
Real-time accounting indicates that the NetEngine 8000 F periodically generates accounting packets and send them to the remote accounting server when a user is online. Real-time accounting minimizes loss of accounting information when the communication between the NetEngine 8000 F and the remote server is interrupted.
The interval for real-time accounting can be set to minutes or seconds.
The policy for handling accounting start failures is configured.
If the NetEngine 8000 F does not receive any response after sending an Accounting Start packet to the remote accounting server, the NetEngine 8000 F adopts the policy for handling accounting start failures. This policy may keep the user online or log the user out.
The policy for handling real-time accounting failures is configured.
If the NetEngine 8000 F does not receive any response after re-sending the real-time accounting packets to the remote accounting server for certain times, the NetEngine 8000 F adopts the policy for the real-time accounting failure. This policy may keep the user online or log the user out.
When RADIUS accounting or HWTACACS accounting is used, you are advised to set the maximum number of retransmissions for real-time accounting packets to be greater than the maximum number of retransmissions for .
The NetEngine 8000 F is configured to send a real-time accounting packet immediately after receiving an Accounting Start response.
After receiving an Accounting Start response from the accounting server, the NetEngine 8000 F determines whether to immediately send real-time accounting packets according to the configuration.
The NetEngine 8000 F is configured to add all the assigned IP addresses to an Accounting Stop packet to be sent to the RADIUS server for an IPoE user. This prevents accounting failures caused by incomplete IP information carried in an Accounting Stop packet when a dual-stack user goes offline only from the IPv4 or IPv6 stack.
The configuration is committed.