Example: Limiting Subscriber Access Based on Account Balances
The sample data provides an example called Quota that limits a subscriber’s access rate based on the balances of accounts that record the subscriber’s use of network resources. Subscribers receive a quota of transfer (upload and download) volume in two ways:
- Periodic quota—Volume that is periodically added to a subscriber’s account. For example, a subscriber may receive a 25-MB periodic quota each month. The periodic quota is tracked in the periodic account.
- Bought quota—Additional volume that a subscriber can purchase and use at any time. For example, a subscriber may purchase 25 MB of bought quota in January, and use the bought quota between January and March. Bought quota is tracked in a bought account.
As a subscriber consumes volume, the SRC-VTA debits the accounts, using first the periodic quota and, if no periodic quota is available, the bought quota.
Subscribers managed by a VTA require a subscription to quota services—services for which a VTA monitors and manages usage. You must configure these subscriptions to be activated when the subscriber logs in. When a subscriber logs in to the SAE, the SAE tries to activate the quota services. However, if neither the periodic account nor the bought account has a positive balance, the SRC-VTA deactivates the quota services, and the SAE applies to the subscriber either the default policy or another policy that implements a service with a lower bandwidth.
The units of the accounts depend on the formula that you define to determine the use of network resources. With this formula, the SRC-VTA calculates the change to the accounts and the interim accounting interval.
The Quota configuration example provides a VTA that operates as follows:
- When a service session for the quota service starts, the SAE sends a start event to the SRC-VTA.
- The SRC-VTA starts a VTA session that has the same identifier as the service session and a qualifier of zero.
- When the SRC-VTA receives the first interim
update from the SAE in a VTA session, it records a balance change
that details the use of resources and the event time for the VTA session.
When the SRC-VTA receives interim updates in the VTA session, it updates
the use of resources and the event time in the balance change recorded
previously.
- If the periodic account contains sufficient resources to cover the balance change, the SRC-VTA changes only the balance of that account.
- If the periodic account does not contain sufficient resources for the change, the SRC-VTA records one balance change for the resources available in that account and records another balance change for the difference in the bought account. In this case, the SRC-VTA records subsequent balance changes to the bought account.
- If neither account has sufficient resources, the SRC-VTA deactivates the quota service.
- If the SAE session ends, the VTA session ends. When a new service session starts, Steps 1 to 3 recur. However, a service session may last for several VTA sessions. In this case, the SAE and SRC-VTA continue the process described in Step 3.
- When an administrator replenishes the periodic quota, the SRC-VTA ends the VTA session, finalizes all balance changes for the session, and records a credit to the periodic account.
- When the subscriber buys additional volume, the SRC-VTA ends the VTA session, finalizes all balance changes for the session, and records a credit to the bought account.
- When the SRC-VTA next receives an interim update event
from the SAE, it starts a new VTA session. The SRC-VTA obtains the
start time for the VTA session from the SAE event, and records debits
to the accounts as described in Step 3.
The SRC-VTA always ends the VTA session when an administrator replenishes periodic quota or the subscriber buys volume. However, a service session may last for several billing periods. In this case, when the SRC-VTA starts a new VTA session, it continues to assign the SAE session identifier to the VTA session and increments the qualifier by one. Keeping the VTA session within a billing period allows the SRC-VTA to finalize balance changes.
