RADIUS Counters

The packets and byte counters of each session, traffic class (class 0 - 7) as well as policer counters (level 1 to 4) are supported via RADIUS accounting interims and stop messages. Those counters are layer two counters per default which can be adjusted using correction values and factors from the AAA configuration profile.

Subscriber accounting is based on multiple sources like LIF-, class/queue-, policer- and control-traffic statistics which are described below.

  • The InLIF (Incoming Logical Interface) stats count all traffic received on the logical interface including control traffic are traffic dropped by ingress policer.

  • The policer stats count all traffic accepted by policer (color green) per level (1-4). Ingress control traffic will be hit by a separate control plane policer and therefore not counted in the session policer stats.

  • The class/queue stats count all egress traffic except control traffic which is directly sent to the IFP.

  • The OutLIF (Outgoing Logical Interface) stats count all traffic sent on the logical interface except control traffic which is directly sent to the IFP.

  • The control stats count all traffic received and sent from or to the control plane for a given subscriber (counted in PPPoE daemon for PPPoE sessions).

rbfs counters
Because counter updates are not atomic operations, the sum of all class counters might be different from the session counters.

The counted bytes per packet can be adjusted as described in chapter Configuring Accounting Adjustments of the Subscriber Management Configuration Guide.

All subscriber accounting attributes and counters are stored without adjustment (L2) in the table local.access.subscriber.accounting and remain until the subscriber session is finally removed after response to RADIUS accounting stop.

The command show subscriber <id> accounting displays the adjusted subscriber accounting information. It is also possible to display the values before adjustment using show subscriber <id> accounting origin.

supervisor@rtbrick: op> show subscriber 72339069014638637 accounting
Subscriber-Id: 72339069014638637
    IFL: ppp-0/0/1/72339069014638637
    Start Timestamp: Wed Feb 24 09:06:47 GMT +0000 2021
    Idle Timestamp: Wed Feb 24 09:06:47 GMT +0000 2021
    Session-Timeout: 86400 seconds
    Idle-Timeout: 7200 seconds
    Session Statistics:
        Ingress: 0 packets 0 bytes
        Egress: 0 packets 0 bytes
    LIF Statistics:
        Ingress: 14 packets 896 bytes
        Egress: 0 packets 0 bytes
    Egress Class (Queue) Statistics:
        class-0: 0 packets 0 bytes
        class-1: 0 packets 0 bytes
        class-2: 0 packets 0 bytes
        class-3: 0 packets 0 bytes
        class-4: 0 packets 0 bytes
        class-5: 0 packets 0 bytes
        class-6: 0 packets 0 bytes
        class-7: 0 packets 0 bytes
    Ingress Policer Statistics:
        Level 1: 0 packets 0 bytes
        Level 2: 0 packets 0 bytes
        Level 3: 0 packets 0 bytes
        Level 4: 0 packets 0 bytes

Session Counters

Per default, the session counters are calculated using the LIF statistics which include all traffic received on the logical interface (InLIF) and all traffic sent on the logical interface (OutLIF) except control traffic which is directly sent to the IFP. Ingress traffic sent to CPU or transit traffic dropped by policer is still counted whereas egress traffic dropped by QoS is not counted.

Alternatively, it is possible to use the sum of all policer counters for ingress session counters which can be changed in the AAA configuration profile by setting the accounting ingress source to POLICER (default is LIF) to include only accepted transit traffic.

Using LIF in egress and POLICER in ingress results in a symmetric behavior where only accepted transit traffic is counted.

Following the list of the RtBrick class counter attributes.

Attribute Name Description

42

Acct-Input-Octets

Incoming session bytes (uint32)

43

Acct-Output-Octets

Outgoing session bytes (uint32)

47

Acct-Input-Packets

Incoming session packets (uint32)

48

Acct-Output-Packets

Outgoing session packets (uint32)

52

Acct-Input-Gigawords

Acct-Input-Octets overflow counter (uint32)

53

Acct-Output-Gigawords

Acct-Output-Octets overflow counter (uint32)

The internal 64 bit counters are split over the standard 32 bit octet and gigaword counters by using the most significant 32 bit as gigawords and the least significant 32 bits as octets.

32 Bit Acct-Input/Output-Gigawords 32 Bit Acct-Input/Output-Octets

Internal 64 Bit Counter

Class Counters

The outgoing class counters are filled by queue counters which ensures that only traffic leaving the device is counted here.

Following the list of the RtBrick class counter attributes.

Attribute Name Description

26-50058-81

RtBrick-Class-0-Packets-Out

Outgoing Class-0 packets (uint64)

26-50058-82

RtBrick-Class-0-Bytes-Out

Outgoing Class-0 bytes (uint64)

26-50058-83

RtBrick-Class-1-Packets-Out

Outgoing Class-1 packets (uint64)

26-50058-84

RtBrick-Class-1-Bytes-Out

Outgoing Class-1 bytes (uint64)

26-50058-85

RtBrick-Class-2-Packets-Out

Outgoing Class-2 packets (uint64)

26-50058-86

RtBrick-Class-2-Bytes-Out

Outgoing Class-2 bytes (uint64)

26-50058-87

RtBrick-Class-3-Packets-Out

Outgoing Class-3 packets (uint64)

26-50058-88

RtBrick-Class-3-Bytes-Out

Outgoing Class-3 bytes (uint64)

26-50058-98

RtBrick-Class-4-Packets-Out

Outgoing Class-4 packets (uint64)

26-50058-90

RtBrick-Class-4-Bytes-Out

Outgoing Class-4 bytes (uint64)

26-50058-91

RtBrick-Class-5-Packets-Out

Outgoing Class-5 packets (uint64)

26-50058-92

RtBrick-Class-5-Bytes-Out

Outgoing Class-5 bytes (uint64)

26-50058-93

RtBrick-Class-6-Packets-Out

Outgoing Class-6 packets (uint64)

26-50058-94

RtBrick-Class-6-Bytes-Out

Outgoing Class-6 bytes (uint64)

26-50058-95

RtBrick-Class-7-Packets-Out

Outgoing Class-7 packets (uint64)

26-50058-96

RtBrick-Class-7-Bytes-Out

Outgoing Class-7 bytes (uint64)

Those attributes will be encoded as subattributes (RFC2865) similar to broadband forum (BBF) line attributes to reduce the size of the RADIUS message. Counters with a zero value will be also excluded from the packet.

counters

Policer Counters

The incoming policer attributes count all traffic accepted (colored green) by ingress policers with dedicated packet and byte values per level.

Following the list of the RtBrick policer counter attributes.

Attribute Name Description

26-50058-97

RtBrick-Policer-L1-Packets-In

Incoming Policer L1 accepted packets (uint64)

26-50058-98

RtBrick-Policer-L1-Bytes-In

Incoming Policer L1 accepted bytes (uint64)

26-50058-99

RtBrick-Policer-L2-Packets-In

Incoming Policer L2 accepted packets (uint64)

26-50058-100

RtBrick-Policer-L2-Bytes-In

Incoming Policer L2 accepted bytes (uint64)

26-50058-101

RtBrick-Policer-L3-Packets-In

Incoming Policer L3 accepted packets (uint64)

26-50058-102

RtBrick-Policer-L3-Bytes-In

Incoming Policer L3 accepted bytes (uint64)

26-50058-103

RtBrick-Policer-L4-Packets-In

Incoming Policer L4 accepted packets (uint64)

26-50058-104

RtBrick-Policer-L4-Bytes-In

Incoming Policer L4 accepted bytes (uint64)

Those attributes will be encoded as subattributes (RFC2865) similar to broadband forum (BBF) line attributes to reduce the size of the RADIUS message. Counters with a zero value will be also excluded from the packet.

Service Classification and Accounting

The underlying virtual output queueing (VOQ) is a common and efficient architecture for high performance switches but brings some major limitations. One obvious limitation is that queues must be allocated in ingress and canΓÇÖt be changed in egress as shown in the picture below.

core interface

Service classification and accounting is based on standard behavior aggregate (BA) and multifield classifier (MF) bound global or to ingress interfaces matching on some protocol fields assigning a traffic class. Downstream traffic (to subscriber) is counted per subscriber and class using queue counters to count only traffic not dropped by QoS. Upstream traffic (from subscribers) is countered per subscriber and policer level.

Some service providers would like to control if premium traffic is handled differently on a per subscriber basis which can be also achieved with VOQ as explained below.

Let us assume a product which handles video streaming services with higher priority or excludes those traffic from actual data volume. With VOQ the classification as Video is done on the ingress core interface equally for all subscribers regardless of the booked product. Now instead of changing the queue per subscriber in egress, the behavior of the queue can be changed to behave equally to BestEffort which is supported in egress per subscriber.

service classification

The corresponding Video traffic is now threaded equally to BestEffort but still counted separately. For accounting purposes the traffic of BestEffort and Video can be simply added in the billing infrastructure to get the actual amount of BestEffort traffic.

In upstream, the expected class and policer level can be assigned per subscriber because BA and MF classifiers are bound to the PPPoE session in ingress.