[Contents] [Prev] [Next] [Index] [Report an Error]

# Configuring RADIUS Accounting for Service Manager

The Service Manager application supports RADIUS accounting and interim accounting for subscriber service sessions that are activated by the RADIUS login and RADIUS CoA methods. When RADIUS accounting is enabled, RADIUS generates:

- An Acct-Start message when a service session is activated
- An Acct-Stop message when a service session is deactivated
- Interim-Acct messages

RADIUS accounting messages always include Service Manager time statistics. You must enable Service Manager volume statistics for a service session.

When you terminate a subscriber session, Service Manager first sends RADIUS Acct-Stop messages for any active services associated with the subscriber session, and then sends the Acct-Stop message for the subscriber session.

| Note: Service Manager statistics collection is a three-part procedure. You must configure statistics information in the service definition macro file, enable statistics collection by either RADIUS or the CLI, and also enable statistics collection for the policy referenced in the service macro using the statistics enabled keyword in the command for policy assignment to a profile at the time of attachment of the policy to an interface. For detailed information about Service Manager statistics, see Configuring Service Manager Statistics .

To support RADIUS accounting for Service Manager, the RADIUS Acct-Session-ID attribute [44] has been extended to include a colon-separated identifier, which uniquely identifies a service for a subscriber. For example:

`

erx FastEthernet 12/0:0001048580:002478

`

The Service-Session attribute (VSA 26-83) identifies the name of the service. This attribute is the value of the Activate-Service or Deactivate-Service attribute (including parameter values) that was used in the RADIUS Access-Accept message to activate or deactivate the service session. For example:

`

tiered(1280000, 5120000)

`

Table 144 lists the RADIUS accounting attributes used by the Service Manager application.

Table 144: Service Manager RADIUS Accounting Attributes

Attribute Number | Attribute Name | RADIUS Message Type | VSA Description
--- | --- | --- | ---
[26-83] | Service-Session | For service sessions only: Acct-Start Acct-Stop Interim-Acct | Name of the service (including parameter values) with which the statistics are associated
[26-140] | Service-Interim-Acct- Interval | Access-Accept and CoA-Request | Number of seconds between accounting updates for a service; a tagged VSA
[44] | Acct-Session-ID | Acct-Start Acct-Stop Interim-Acct | Accounting identifier that makes it easy to match start and stop records in a log file; the format is extended to include a colon-separated value that uniquely identifies the subscriber session

## Configuring Service Interim Accounting

Interim accounting determines how often accounting information is updated and sent to an accounting server. In addition to the user-based interim accounting supported on the router, Service Manager supports service-related interim accounting—you can configure an interim accounting interval for services that are created during a user RADIUS-based login and services that are activated by a CoA operation.

The service interim accounting interval is specified by the RADIUS Service-Interim-Acct-Interval attribute (VSA 26-140) that is included in the RADIUS Access-Accept message or CoA-Request message that activates a service session. Because the Service-Interim-Acct-Interval attribute is a tagged attribute, you can configure different interim accounting intervals for a particular user’s various services.

You can use the aaa service accounting interval command to specify the default service interim accounting interval. Service Manager uses this interval value for service accounting when the Service-Interim-Acct-Interval attribute is not configured.

| Note: You can also configure interim accounting for users. A user interim accounting interval is configured in the Acct-Interim-Interval RADIUS attribute (RADIUS attribute 85). You use the aaa user accounting interval command to specify the default user interim accounting interval, which is used when RADIUS attribute 85 is not configured. See Configuring Remote Access for information about configuring user interim accounting.

When the Service-Interim-Acct-Interval attribute is configured for a service, Service Manager uses the guidelines shown in Table 145 to determine the correct interim accounting interval to use for the service.

Table 145: Determining the Service Interim Accounting Interval

Service-Interim-Acct- Interval Value | Service Manager Action
--- | ---
0 | Disables interim accounting for the service
1–599 | Uses 600
600–86400 | Uses the specified value
86401 or greater | Uses 86400
The tag for the service-interim-acct- interval attribute does not match the tag for any service-activate attribute (VSA 26-65) | Discards the service-interim-acct-interval attribute

Table 146 describes a sample Acct-Start message for a service session. In the table, the two fields used by Service Manager are shown in bold characters. An Acct-Start message for a subscriber session without any active services does not include the Service-Session attribute.

Table 146: Sample Acct-Start Message for a Service Session

RADIUS Attribute | Sample Value
--- | ---
acct-status-type | 1
username | client1@isp1.com
event-timestamp | 1112191723
acct-delay-time | 0
nas-identifier | ERX-01-00-06
acct-session-id | erx FastEthernet 12/0:0001048580:002478
nas-ip-address | 10.6.128.45
class | (binary data)
framed-protocol | 0
framed-compression | 0
framed-ip-address | 100.20.0.1
framed-ip-netmask | 0.0.0.0
ingress-policy-name (vsa) | forwardAll
egress-policy-name (vsa) | forwardAll
calling-station-id | #ERX-01-00-06#E12#0
acct-input-gigawords | 0
acct-input-octets | 4032
acct-output-gigawords | 0
acct-output-octets | 2163
acct-input-gigapackets (vsa) | 0
acct-input-packets | 7
acct-output-gigapackets (vsa) | 0
acct-output-packets | 7
nas-port-type | 15
nas-port | 3221225472
nas-port-id | FastEthernet 12/0
acct-authentic | 1
acct-session-time | 0
acct-service-session | tiered(1280000, 5120000)
service-interim-acct-interva l | 1200

aaa service accounting interval

- Use to specify the default interval between service accounting updates. Service manager uses the default interval when no value is specified in the Service-Interim-Acct-Interval attribute (Juniper VSA 26-140).
- This command and the aaa user accounting interval command replace the aaa accounting interval command, which is deprecated and might be removed in a future release.
- The default interval is applied on a virtual router basis—this setting is used for services associated with all users who attach to the corresponding virtual router.
- Specify the service accounting interval, in the range 10–1440 minutes. The default setting is 0, which disables the feature.

  | Note: To enable interim service accounting, the service accounting interval must be set to a non-zero value and the service statistics type must not be set to none.

- Example
  `
  host1(config)#aaa service accounting interval 60
  `
- Use the no version to reset the accounting interval to 0, which turns off interim service accounting when no value is specified in the Service-Interim-Acct-Interval attribute (Juniper VSA 26-140).
- See aaa service accounting interval

aaa user accounting interval

- Use to specify the default interval between user accounting updates. The router uses the default interval when no value is specified in the RADIUS Acct-Interim-Interval attribute (RADIUS attribute 85).
- This command and the aaa service accounting interval command replace the aaa accounting interval command, which is deprecated and might be removed in a future release.
- The default interval is applied on a virtual router basis—this setting is used for all users who attach to the corresponding virtual router.
- Specify the user accounting interval, in the range 10–1440 minutes. The default setting is 0, which disables the feature.
- Example
  `
  host1(config)#aaa user accounting interval 20
  `
- Use the no version to reset the accounting interval to 0, which turns off interim user accounting when no value is specified in the RADIUS Acct-Interim-Interval attribute.
- See aaa user accounting interval

## Service Interim Accounting for IPv4 and IPv6 Services in a Dual Stack Overview

You can query the external parent group statistics similar to the statistics retrieved for classifier lists. You must specify the correct external parent group name and its corresponding hierarchical policy parameter for each of the input, output, and secondary-input statistics. You can specify a list of external parent groups along with hierarchical policy parameter for which statistics must be collected and sent to Service Manager for display in the Acct-Stop and Interim-Acct messages. The statistics for packets arriving at an interface attached at the input stage and the statistics for packets arriving at an interface attached at the secondary input stage are added and displayed in the Input Bytes field of the show service-management command. The statistics for packets leaving an interface at which the hierarchical policy is defined are displayed in the Output Bytes field of the show service-management command. The external parent group statistics are not limited to combined IPv4 and IPv6 services in a dual stack. You can also obtain external parent group statistics for IPv4 and IPv6 services configured independently in a dual stack.

You can retrieve either external parent group statistics or classifier statistics from policy manager. However, you cannot retrieve both the statistics for a single service definition. When a combined service is configured, you cannot retrieve classifier list-based based statistics. In such a scenario, you can only retrieve external parent group-based statistics from policy manager.

Service interim accounting and accounting based on service deactivation are supported for IPv6 services. For the combined IPv4 and IPv6 service, the statistics are a sum of the values in the external parent group and hierarchical policy parameter pair lists (defined as input-stat-epg, secondary-input-stat-epg, and output-stat-epg in the service definition macro).

If an interface fails, service-related interim accounting does not calculate the packets that are transmitted through this failed interface. For statistics reporting, only those packets that exist for interfaces when the subscriber service session is deactivated are counted.

[Contents] [Prev] [Next] [Index] [Report an Error]