RFC 2975

Introduction to Accounting Management

๐Ÿ“… published October 2000, from ietf

Okay bestie, let's get into RFC 2975! ๐ŸŽ€

Quick facts first ๐Ÿ’… This is RFC 2975, called Introduction to Accounting Management. It came from the Network Working Group in October 2000 and was written by B. Aboba (Microsoft Corporation), J. Arkko (Ericsson), and D. Harrington (Cabletron Systems Inc.). It's marked Informational, and the header doesn't have any Obsoletes or Updates lines, so it isn't claiming to replace or change anything else ๐Ÿฆ‹

Status of This Memo โœจ

This memo is here to give the Internet community information ๐Ÿ’– It does not specify an Internet standard of any kind, and distribution of it is unlimited ๐ŸŒธ

Copyright (C) The Internet Society (2000). All Rights Reserved. ๐Ÿซถ

Abstract ๐ŸŒˆ

Accounting Management is all about collecting resource consumption data for capacity and trend analysis, cost allocation, auditing, and billing ๐Ÿ“Š This doc walks through each of those problems and talks about the issues you run into when designing modern accounting systems ๐Ÿงš

Accounting apps don't all have the same security and reliability needs, which means you can't build one single accounting protocol plus one set of security services and expect it to fit everyone ๐Ÿ˜ญ So the goal of accounting management is to give you a toolbox that can meet each application's requirements ๐Ÿงฐ This doc covers the tools that exist right now and the state of the art in accounting protocol design. The companion document, RFC 2924, reviews the state of the art in accounting attributes and record formats ๐Ÿ‘‘


Table of Contents ๐Ÿฆ‹

   1.  Introduction                                             2
       1.1   Requirements language                              3
       1.2   Terminology                                        3
       1.3   Accounting management architecture                 5
       1.4   Accounting management objectives                   7
       1.5   Intra-domain and inter-domain accounting          10
       1.6   Accounting record production                      11
       1.7   Requirements summary                              13
   2.  Scaling and reliability                                 14
       2.1   Fault resilience                                  14
       2.2   Resource consumption                              23
       2.3   Data collection models                            26
   3.  Review of Accounting Protocols                          32
       3.1 RADIUS                                              32
       3.2 TACACS+                                             33
       3.3 SNMP                                                33
   4.  Review of Accounting Data Transfer                      43
       4.1 SMTP                                                44
       4.2 Other protocols                                     44
   5.  Summary                                                 45
   6. Security Considerations                                  48
   7. Acknowledgments                                          48
   8. References                                               48
   9. Authors' Addresses                                       52
   10. Intellectual Property Statement                         53
   11. Full Copyright Statement                                54

1. Introduction โœจ

Accounting Management is all about collecting resource consumption data for capacity and trend analysis, cost allocation, auditing, and billing ๐Ÿ“Š This document breaks down each of those problems and digs into the issues involved in designing modern accounting systems ๐Ÿ’…

Since accounting applications don't share uniform security and reliability requirements, it's not possible to come up with a single accounting protocol and one set of security services that covers every need ๐Ÿ™ˆ So the goal of accounting management is a set of tools that can meet the requirements of each application ๐Ÿ› ๏ธ This document describes the tools available right now, plus the state of the art in accounting protocol design. The companion document, RFC 2924, reviews the state of the art in accounting attributes and record formats ๐ŸŽ€

1.1. Requirements language

Here's how the key words work in this doc ๐Ÿค“ The words "MAY", "MUST", "MUST NOT", "optional", "recommended", "SHOULD", and "SHOULD NOT" are to be interpreted as described in [6].

1.2. Terminology ๐Ÿ“–

This document frequently uses the following terms, so let's get them straight ๐Ÿ’–

Accounting: The collection of resource consumption data for the purposes of capacity and trend analysis, cost allocation, auditing, and billing. Accounting management requires that resource consumption be measured, rated, assigned, and communicated between appropriate parties.

Archival accounting: In archival accounting, the goal is to collect all accounting data, reconstruct missing entries as best as possible if data is lost, and archive data for a mandated time period. It's "usual and customary" for these systems to be engineered to be very robust against accounting data loss ๐Ÿ”’ This may include provisions for transport layer as well as application layer acknowledgments, use of non-volatile storage, interim accounting capabilities (stored or transmitted over the wire), etc. Legal or financial requirements frequently mandate archival accounting practices, and may often dictate that data be kept confidential, regardless of whether it is to be used for billing purposes or not ๐Ÿซถ

Rating: The act of determining the price to be charged for use of a resource ๐Ÿ’ฐ

Billing: The act of preparing an invoice ๐Ÿงพ

Usage sensitive billing: A billing process that depends on usage information to prepare an invoice can be said to be usage-sensitive. In contrast, a process that is independent of usage information is said to be non-usage-sensitive โœจ

Auditing: The act of verifying the correctness of a procedure. In order to be able to conduct an audit, it's necessary to definitively determine what procedures were actually carried out so you can compare them to the recommended process. Accomplishing this may require security services such as authentication and integrity protection ๐Ÿ•ต๏ธโ€โ™€๏ธ

Cost Allocation: The act of allocating costs between entities. Note that cost allocation and rating are fundamentally different processes ๐Ÿ‘€ In cost allocation the objective is typically to allocate a known cost among several entities. In rating, the objective is to determine the amount to be charged for use of a resource. In cost allocation, the cost per unit of resource may need to be determined; in rating, this is typically a given ๐Ÿ“

Interim accounting: Interim accounting provides a snapshot of usage during a user's session. This may be useful in the event of a device reboot or other network problem that prevents the reception or generation of a session summary packet or session record ๐ŸŒˆ Interim accounting records can always be summarized without the loss of information. Note that interim accounting records may be stored internally on the device (such as in non-volatile storage) so as to survive a reboot, and thus may not always be transmitted over the wire ๐Ÿ’œ

Session record: A session record represents a summary of the resource consumption of a user over the entire session. Accounting gateways creating the session record may do so by processing interim accounting events or accounting events from several devices serving the same user ๐Ÿฆ‹

Accounting Protocol: A protocol used to convey data for accounting purposes ๐Ÿ“จ

Intra-domain accounting: Intra-domain accounting involves collecting information on resource usage within an administrative domain, for use within that domain. In intra-domain accounting, accounting packets and session records typically do not cross administrative boundaries ๐Ÿ 

Inter-domain accounting: Inter-domain accounting involves collecting information on resource usage within an administrative domain, for use within another administrative domain. In inter-domain accounting, accounting packets and session records will typically cross administrative boundaries ๐ŸŒ

Real-time accounting: Real-time accounting involves processing information on resource usage within a defined time window. Time constraints are typically imposed in order to limit financial risk โฐ

Accounting server: The accounting server receives accounting data from devices and translates it into session records. The accounting server may also take responsibility for routing session records to interested parties ๐Ÿ–ฅ๏ธ

1.3. Accounting management architecture โœจ

okay so the accounting management setup is basically a group project between three players: network devices, accounting servers, and billing servers ๐Ÿ’… the network device collects resource consumption data as accounting metrics, then passes that info to an accounting server. usually that handoff happens through an accounting protocol, though devices can also generate their own session records if they want ๐Ÿฆ‹

the accounting server then processes what it gets from the device ๐Ÿงš that can mean summarizing interim accounting info, getting rid of duplicate data, or making session records.

the processed data then goes to a billing server, which mostly handles rating and invoice generation, but it can also do auditing, cost allocation, trend analysis, or capacity planning ๐Ÿ”ฅ before sending anything over, the accounting server might batch and compress session records. the point is to cut down on the amount of accounting data and the bandwidth needed for the transfer ๐Ÿ’œ

one of the accounting server's jobs is telling inter-domain and intra-domain accounting events apart and routing each one correctly ๐ŸŽ€ for session records that contain a Network Access Identifier (NAI), which is described in [8], you can tell the difference by checking the domain portion of the NAI. if the domain portion is absent or matches the local domain, the record is treated as an intra-domain accounting event. otherwise, it's treated as an inter-domain accounting event ๐Ÿ™ˆ

intra-domain events usually get routed to the local billing server, while inter-domain events go to accounting servers in other administrative domains ๐ŸŒธ it's not required that inter and intra-domain session records use the same format, but it is desirable, because it skips translations that would otherwise be needed ๐Ÿ’–

when there's a proxy forwarder in the picture, domain-based access controls can be applied by the proxy forwarder instead of by the devices themselves ๐Ÿงš the network device usually talks an accounting protocol to the proxy forwarder. the proxy can either convert those accounting packets into session records, or forward the packets on to another domain. either way, domain separation usually happens because the proxy sorts the session records or accounting messages by destination โœจ

now here's the tea ๐Ÿซ– if the accounting proxy isn't trusted, it can be hard to check whether it's making correct session records from the accounting messages it received, since the original messages usually aren't forwarded along with the session records. so when trust is a concern, the proxy typically forwards the accounting packets themselves. as long as the accounting protocol supports data object security, the endpoints can verify that the proxy hasn't modified the data in transit or snooped on the packet contents ๐Ÿ‘‘

here's the diagram of the whole accounting management architecture ๐ŸŒˆ

     +------------+
     |            |
     |   Network  |
     |   Device   |
     |            |
     +------------+
           |
Accounting |
Protocol   |
           |
           V
     +------------+                               +------------+
     |            |                               |            |
     |   Org B    |  Inter-domain session records |  Org A     |
     |   Acctg.   |<----------------------------->|  Acctg.    |
     |Proxy/Server|   or accounting protocol      |  Server    |
     |            |                               |            |
     +------------+                               +------------+
           |                                            |
           |                                            |
Transfer   | Intra-domain                               |
Protocol   | Session records                            |
           |                                            |
           V                                            V
     +------------+                               +------------+
     |            |                               |            |
     |  Org B     |                               |  Org A     |
     |  Billing   |                               |  Billing   |
     |  Server    |                               |  Server    |
     |            |                               |            |
     +------------+                               +------------+

1.4. Accounting management objectives ๐ŸŽฏ

Accounting Management is all about collecting resource consumption data for capacity and trend analysis, cost allocation, auditing, and billing ๐Ÿ’… each of these jobs has its own requirements, so no one-size-fits-all vibes here ๐Ÿซถ

1.4.1. Trend analysis and capacity planning ๐Ÿ“ˆ

for trend analysis and capacity planning, the goal is usually a forecast of future usage ๐Ÿ”ฎ forecasts are inherently imperfect, so high reliability is typically not required, and moderate packet loss can be tolerated. if you can use statistical sampling to cut down on data collection while still getting the forecast's desired statistical accuracy, you may be able to tolerate high packet loss, as long as bias isn't introduced ๐ŸŒธ

the security requirements here depend on how the data is collected and how sensitive it is ๐ŸŽ€ extra security services may be required when data moves between administrative domains. for example, if info is collected and analyzed inside the same administrative domain, integrity protection and authentication may be used to guard against collecting invalid data. for inter-domain applications, confidentiality may be desirable to protect against snooping by third parties ๐Ÿ™ˆ

1.4.2. Billing ๐Ÿ’ธ

when accounting data is used for billing, the requirements depend on whether the billing process is usage-sensitive or not ๐Ÿงพ

1.4.2.1. Non-usage sensitive billing ๐Ÿ“

by definition, non-usage-sensitive billing doesn't need usage information, so in theory all accounting data could be lost without messing up the billing process ๐Ÿฅฒ that said, it would still hurt other stuff like trend analysis or auditing, so wholesale data loss would still be unacceptable ๐Ÿ’€

1.4.2.2. Usage-sensitive billing ๐Ÿ’ฐ

usage-sensitive billing depends on usage information, so packet loss can translate directly into revenue loss ๐Ÿ˜ญ because of that, the billing process may need to follow financial reporting and legal requirements, which means an archival accounting approach may be needed ๐Ÿ“š

usage-sensitive systems may also need low processing delay โฑ๏ธ today, credit risk is commonly managed by computerized fraud detection systems designed to catch unusual activity ๐Ÿ•ต๏ธ batched transmission of accounting data might otherwise make sense for efficiency, but where there's a risk of fraud, financial exposure grows with processing delay. so it may be advisable to transmit each event individually to keep batch size small, or even to use quality of service techniques to minimize queuing delays ๐Ÿš€ authorization may also need to depend on ability to pay ๐Ÿ’…

whether these techniques are useful depends on the application, since the degree of financial exposure is application-dependent ๐ŸŽ€ for dial-up Internet access from a local provider, charges are typically low, so the risk of loss is small ๐ŸŒท but for dial-up roaming or voice over IP, time-based charges may be substantial, so the risk of fraud is larger ๐Ÿ“ž in those situations, it's highly desirable to quickly detect unusual account activity, and it may be desirable for authorization to depend on ability to pay ๐Ÿšจ where valuable resources can be reserved, or where charges can be high, very large bills can rack up fast, so processing may need to finish within a defined time window to limit exposure โšก

since in usage-sensitive systems accounting data turns into revenue, the security and reliability requirements are greater ๐Ÿ‘‘ because of financial and legal requirements, these systems need to be able to survive an audit ๐Ÿง so security services such as authentication, integrity, and replay protection are frequently required, and confidentiality and data object integrity may also be desirable ๐Ÿ” application-layer acknowledgments are also often required to guard against accounting server failures ๐Ÿ›ก๏ธ

1.4.3. Auditing ๐Ÿ”

with enterprise networking expenditures on the rise, interest in auditing is growing ๐Ÿ“Š auditing, which is the act of verifying the correctness of a procedure, commonly relies on accounting data ๐Ÿ’… audit tasks include checking the correctness of an invoice submitted by a service provider, or verifying conformance to usage policy, service level agreements, or security guidelines ๐Ÿ“

to permit a credible audit, the auditing data collection process must be at least as reliable as the accounting process used by the entity being audited ๐Ÿซถ similarly, security policies for the audit should be at least as stringent as those used when preparing the original invoice. because of financial and legal requirements, archival accounting practices are frequently required in this application ๐Ÿ—‚๏ธ

when auditing procedures verify conformance to usage or security policies, security services may be desired ๐Ÿ”’ this typically includes authentication, integrity, and replay protection, as well as confidentiality and data object integrity. to respond to security incidents in progress, auditing applications are frequently built to operate with low processing delay ๐Ÿšจ

1.4.4. Cost allocation ๐Ÿงฎ

cost allocation and billback methods aren't yet widespread among enterprise customers ๐Ÿคทโ€โ™€๏ธ but with telephony and data communications converging, there's growing interest in applying cost allocation and billback procedures to networking costs, the same way they're already commonly practiced with telecommunications costs ๐Ÿ“ž

cost allocation models, including the traditional costing mechanisms described in [21]-[23] and the activity-based costing techniques described in [24], are typically based on detailed analysis of usage data. as a result, they're almost always usage-sensitive ๐ŸŽฏ whether these techniques are applied to splitting costs between partners in a venture or between departments in a single firm, cost allocation models often have profound behavioral and financial impacts ๐Ÿ˜ณ so systems built for this purpose tend to care about reliable data collection and security just as much as billing applications do ๐Ÿ” because of financial and legal requirements, archival accounting practices are frequently required in this application too ๐Ÿ—„๏ธ ๐ŸŒˆ

1.5. Intra-domain and inter-domain accounting ๐Ÿฆ‹

okay so accounting management started out mostly focused on intra-domain applications, meaning stuff that stays inside one network. but now we're deploying things like dial-up roaming, Internet fax, Voice and Video over IP, and QoS, and those need inter-domain accounting, where the data crosses into other networks. it's giving growing up ๐Ÿ“ˆ

inter-domain and intra-domain accounting are different in a few important ways, bestie ๐Ÿ’…

intra-domain accounting is when you collect info on resource consumption inside one administrative domain and then use it inside that same domain. accounting packets and session records typically don't cross administrative boundaries. so intra-domain apps usually see low packet loss and move data between trusted entities ๐Ÿซถ

inter-domain accounting is when you collect that same kind of info inside one administrative domain but use it in a different administrative domain. here the accounting packets and session records will typically cross administrative boundaries, so inter-domain apps may see substantial packet loss. and the entities in the transfer can't be assumed to trust each other ๐Ÿ˜ฌ

because inter-domain accounting moves data between domains, extra security may be desirable. on top of authentication, replay and integrity protection, you may want security services like confidentiality and data object integrity ๐Ÿ”. also, in inter-domain accounting each party involved typically needs its own copy of every accounting event for invoice generation and auditing ๐Ÿงพ

1.6. Accounting record production ๐ŸŒธ

typically, you get one accounting record per session. sometimes you get a set of interim records that can be summed up into a single record for billing. but to support stuff like wireless access or complicated billing regimes, we need a more sophisticated approach โœจ

you need several accounting records from one session when pricing changes during the session. like, a service might cost more during peak hours than off-peak. so when a session keeps going from one tariff period into another, the device has to report "packets sent" for both periods ๐Ÿ“ฆ

time isn't the only trigger though. in mobile access networks, a user can roam from place to place and still be connected in the same session. if roaming changes the tariffs, you have to account for the resources consumed in the first area and the second area ๐Ÿ—บ๏ธ. another example is when changes are allowed to an ongoing session. a session could be re-authorized with improved QoS, and that would require producing accounting records at both QoS levels ๐Ÿ“ถ

you could handle all this with vectors or multi-dimensional arrays that represent resource consumption inside a single session record. for example, the vector or array could describe consumption for each combination of factors, like one data item being the number of packets during peak hour in the area of the home operator. ngl though, that seems complicated and inflexible, so most current systems produce a set of records from one session instead ๐Ÿ™ƒ. a session identifier needs to be present in the records so accounting systems can tie them together ๐Ÿ”—

in most cases the network device decides when multiple session records are needed, since the local device knows the factors that affect local tariffs, like QoS changes and roaming ๐Ÿ–ฅ๏ธ. but future systems are being designed so the home domain can control record generation. this matters in inter-domain accounting, or when network devices don't have tariff information. centralized control can be done, for instance, by having authorization servers require re-authorization at certain times, and requiring accounting records to be produced upon each re-authorization ๐ŸŽ€

so, in conclusion: sometimes you have to produce multiple accounting records from a single session. it must be possible to do that without making the user start a new session or re-authenticate ๐Ÿ’–. the production of multiple records can be controlled either by the network device or by the AAA server. and the requirements for timeliness, security and reliability are the same for multiple-record sessions as they are for single-record sessions ๐Ÿ’ฏ

1.7. Requirements summary ๐Ÿ“‹

here's the whole vibe in one table, bestie ๐Ÿ‘‘

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                     |                   |
|  Usage          |   Intra-domain      | Inter-domain      |
|                 |                     |                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 | Robustness vs.      | Robustness vs.    |
|                 | packet loss         | packet loss       |
|  Capacity       |                     |                   |
|  Planning       | Integrity,          | Integrity,        |
|                 | authentication,     | authentication,   |
|                 | replay protection   | replay prot.      |
|                 | [confidentiality]   | confidentiality   |
|                 |                     | [data object sec.]|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Non-usage      | Integrity,          | Integrity,        |
|  Sensitive      | authentication,     | authentication,   |
|  Billing        | replay protection   | replay protection |
|                 | [confidentiality]   | confidentiality   |
|                 |                     | [data object sec.]|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 | Archival            | Archival          |
|  Usage          | accounting          | accounting        |
|  Sensitive      | Integrity,          | Integrity,        |
|  Billing,       | authentication,     | authentication,   |
|  Cost           | replay protection   | replay prot.      |
|  Allocation &   | [confidentiality]   | confidentiality   |
|  Auditing       | [Bounds on          | [data object sec.]|
|                 |  processing delay]  | [Bounds on        |
|                 |                     | processing delay] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 | Archival            | Archival          |
|  Time           | accounting          | accounting        |
|  Sensitive      | Integrity,          | Integrity,        |
|  Billing,       | authentication,     | authentication,   |
|  fraud          | replay protection   | replay prot.      |
|  detection,     | [confidentiality]   | confidentiality   |
|  roaming        |                     | [Data object      |
|                 | Bounds on           |  security and     |
|                 |  processing delay   |  receipt support] |
|                 |                     | Bounds on         |
|                 |                     |  processing delay |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Key: [] = optional ๐Ÿ”‘

2. Scaling and reliability โœจ

as the Internet keeps growing, accounting management systems really need to be scalable and reliable ๐Ÿ“ˆ. this section covers the resources accounting management systems use up, plus the scalability and reliability properties of the different data collection and transport models ๐Ÿ› ๏ธ

2.1. Fault resilience ๐Ÿ›ก๏ธ

as we said earlier, things like usage-sensitive billing, cost allocation and auditing usually need an archival approach to accounting, because of financial and legal requirements ๐Ÿ“œ. losing accounting data can mean losing revenue, so there's a strong incentive to engineer a high degree of fault resilience ๐Ÿ’ฐ. the faults you might run into include:

  • Packet loss
  • Accounting server failures
  • Network failures
  • Device reboots

so far, most of the debate on accounting reliability has been about resilience against packet loss, and about the differences between UDP, SCTP and TCP-based transport ๐ŸฅŠ. but resilience against packet loss is only one part of meeting archival accounting requirements, so keep that in mind ๐Ÿง 

as noted in [18], "once the cable is cut you don't need more retransmissions, you need a lot more voltage." ๐Ÿ˜ญโšก so the choice of transport has no impact on resilience against faults like network partition, accounting server failures or device reboots. what does protect against those is non-volatile storage ๐Ÿ’พ

non-volatile storage is absolutely essential for reliable accounting systems, and I cannot stress that enough ๐Ÿ“ฃ. without it, event-driven systems will lose data once the transmission timeout has been exceeded, and batching designs will lose data once the internal memory used for accounting data storage has been exceeded ๐Ÿ˜ฑ. with non-volatile storage and internally stored interim records, most of those data losses can be avoided ๐ŸŽ‰

it could even be argued that non-volatile storage matters more to accounting reliability than network connectivity ๐Ÿคฏ. for many years, reliable accounting systems were built purely on physical storage, with no network connectivity at all. for example, phone usage data used to be stored on paper, film, or magnetic media, and then carried from where it was collected to a central location for bill processing ๐Ÿ“ผ๐Ÿš—

2.1.1. Interim accounting โœจ

Okay bestie, interim accounting is basically a checkpoint system ๐Ÿซถ. It protects against losing session summary data by sending checkpoint information that can be used to rebuild the session record if the summary gets lost ๐Ÿ’พ. This technique works with any data collection model (i.e. event-driven or polling), and it's supported in both RADIUS [25] and in TACACS+ ๐Ÿ”ฅ.

While interim accounting can give you resilience against packet loss, server failures, short-duration network failures, or device reboot ๐Ÿ›Ÿ, its applicability is limited ๐Ÿ™ˆ. Sending interim accounting data over the wire should not be thought of as a mainstream reliability improvement technique, since it increases bandwidth use in normal operation and only pays off when something goes wrong ๐Ÿ’€.

Since most packet loss on the Internet is due to congestion, sending interim accounting data over the wire can make the problem worse by increasing bandwidth usage ๐Ÿ˜ญ. So on-the-wire interim accounting is best restricted to high-value accounting data, such as information on long-lived sessions ๐Ÿ’œ. To protect against loss of data on those sessions, the interim reporting interval is typically set several standard deviations larger than the average session duration ๐Ÿ“. This means most sessions won't generate interim accounting events, and the extra bandwidth used by interim accounting stays limited โœจ. However, as the interim accounting interval decreases toward the average session time, the extra bandwidth consumed by interim accounting increases markedly, so the interval has to be set with caution โš ๏ธ.

Where non-volatile storage is unavailable, interim accounting can also eat up memory that could be better used to store session data ๐Ÿง . So implementors should be careful to make sure new interim accounting data overwrites previous data, rather than piling up extra interim records in memory and making the buffer exhaustion problem worse ๐Ÿ“.

Given how popular non-volatile storage has become in consumer devices like digital cameras, those devices are rapidly dropping in price ๐Ÿ“ท. That makes it increasingly feasible for network devices to have built-in support for non-volatile storage. This can be done, for example, by supporting compact PCMCIA cards ๐ŸŽ€.

Where non-volatile storage is available, it can be used to store interim accounting data. Stored interim events get replaced by updated interim events, or by session data when the session completes. The session data can itself be erased once it has been transmitted and acknowledged at the application layer ๐Ÿงน. This approach keeps interim data off the wire except in the case of a device reboot. When a device reboots, the internally stored interim records are transferred to the accounting server ๐Ÿฆ‹.


2.1.2. Multiple record sessions ๐ŸŒˆ

Generating multiple accounting records within a session can introduce scalability problems that the techniques available in interim accounting just can't control ๐Ÿ˜ค.

For example, when interim records are kept in non-volatile storage, you can overwrite previous interim records with the most recent one, or summarize them into a session record. Where interim updates are sent over the wire, you can control bandwidth usage by adjusting the interim accounting interval ๐ŸŽš๏ธ.

Those measures don't work when multiple session records are produced from a single session, because those records can't be summarized or overwritten without losing information ๐Ÿฅฒ. As a result, multiple record production can increase bandwidth and memory consumption. Implementors should be careful to make sure worst-case multiple record processing requirements don't exceed what their systems can handle ๐Ÿ’ช.

As an example, a tariff change at a particular time of day could, if implemented carelessly, cause a sudden spike in memory and bandwidth consumption as the records need to be stored and/or transported ๐Ÿ“ˆ. Instead of trying to send all the records at once, it may be smart to keep them in non-volatile storage and send all the related records together in a batch when the session completes ๐Ÿ“ฆ. It may also be useful to shape the accounting traffic flow so the peak bandwidth consumption goes down. This can be done by introducing a randomized delay interval ๐ŸŽฒ. If the home domain can also control the generation of multiple accounting records, estimating the worst-case processing requirements can get very difficult ๐Ÿซ .


2.1.3. Packet loss ๐Ÿซ 

Packet loss is a fact of life on the Internet, so accounting protocols that deal with session data need to be resilient against it ๐ŸŒง๏ธ. This matters even more in inter-domain accounting, where packets often pass through Network Access Points (NAPs), and packet loss there may be substantial. Resilience against packet loss can be built with a retry mechanism on top of UDP, or by using TCP [7] or SCTP [26]. On-the-wire interim accounting only provides limited benefits for mitigating packet loss.

UDP-based transport is used a lot in accounting applications. However, it isn't appropriate in every case ๐Ÿ™…โ€โ™€๏ธ. Where accounting data won't fit within a single UDP packet without fragmentation, using TCP or SCTP transport may be preferred over multiple round-trips in UDP. As noted in [47] and [49], this may be an issue when retrieving large tables ๐Ÿ“š.

In addition, where congestion is likely, such as in inter-domain accounting, TCP or SCTP congestion control and round-trip time estimation will be very useful, optimizing throughput ๐Ÿš€. In applications that need to maintain session state, such as simultaneous usage control, TCP and application-layer keep alive packets, or SCTP with its built-in heartbeat capabilities, provide a way to keep track of session state ๐Ÿ’“.

When implementing UDP retransmission, there are a few issues to keep in mind ๐Ÿ‘€:

  • Data model
  • Retry behavior
  • Congestion control
  • Timeout behavior

Accounting reliability can be influenced by how the data is modeled ๐Ÿงฉ. For example, it is almost always better to use cumulative variables than to express accounting data as a change from a previous data item. With cumulative data, the current state can be recovered by a successful retrieval, even after many packets have been lost. If the data is sent as a change, though, the state won't be recovered until the next cumulative update is sent. Those implementations are much more vulnerable to packet loss, so they should be avoided wherever possible ๐Ÿ™…โ€โ™€๏ธ.

When designing a UDP retry mechanism, it's important that the retry timers relate to the round-trip time, so retransmissions don't typically happen during the window when acknowledgments are expected to arrive โฑ๏ธ. Accounting bandwidth can be significant in some circumstances, so the extra traffic from unnecessary retransmissions may increase congestion levels ๐Ÿ“ถ.

Congestion control in accounting data transfer is a somewhat controversial topic ๐ŸŒถ๏ธ. Because accounting traffic is often considered mission-critical, some people argue congestion control isn't a requirement, and it's better to let other, less-critical traffic back off during congestion ๐Ÿคทโ€โ™€๏ธ. Also, without non-volatile storage, congestive back-off in accounting applications can lead to data loss due to buffer exhaustion ๐Ÿ˜ฌ.

However, it can also be argued that, in modern accounting implementations, congestion control is possible while still improving throughput and keeping reliability high ๐Ÿ’…. When packet loss is sustained, there simply isn't enough capacity to keep existing transmission rates going. So aggregate throughput will actually improve if congestive back-off is implemented. This comes from eliminating retransmissions and from being able to use techniques such as RED to desynchronize flows ๐ŸŒŠ. Plus, with QoS mechanisms such as differentiated services, accounting packets can be marked for preferential handling, which provides lower packet loss if desired ๐Ÿท๏ธ. So the network administrator has plenty of room to control how accounting packets are treated, and hard coding inelastic behavior is unnecessary ๐Ÿ™Œ. Typically, systems that implement non-volatile storage let backlogged accounting data be placed in non-volatile storage while it waits for transmission, so buffer exhaustion from congestive back-off doesn't need to be a concern ๐Ÿ’พ.

Since UDP isn't really a transport protocol, UDP-based accounting protocols such as [4] often don't prescribe timeout behavior ๐Ÿซฅ. So implementations may behave in wildly different ways. For example, one implementation might drop accounting data after three constant-duration retries to the same server, while another might use exponential back-off to a given server, then switch to another server, up to a total timeout interval of twelve hours, storing the untransmitted data in non-volatile storage โณ. The practical difference between these approaches is substantial. The former won't satisfy archival accounting requirements, while the latter may ๐Ÿ˜ฑ. More predictable behavior can be achieved by using SCTP or TCP transport ๐ŸŽ€.

2.1.4. Accounting server failover โœจ

okay so what if the main accounting server just... dies? ๐Ÿ’€ It's desirable for the device to failover to a secondary server. Having one or more secondaries removes a lot of the risk of server failure, which is why secondary servers are seriously everywhere now ๐Ÿซถ

For TCP-based protocols, the device can keep connections open to both the primary and secondary servers, and then use the secondary connection once a timer on the primary connection expires. Or, it can open a connection to the secondary after a timeout, after losing the primary connection, or when a timer expires. So TCP-based accounting protocols can respond to connectivity failures faster than TCP timeouts would normally allow ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ The tradeoff is an increased risk of duplicates ๐Ÿ™ˆ

With SCTP, the transport layer timeout behavior can be controlled, so the accounting application doesn't need its own timers ๐Ÿ’… SCTP also lets you multiplex several connections inside one transport connection, and they all share the same congestion control state. That dodges the "head of line blocking" problems that can happen with TCP ๐Ÿงš The catch is that SCTP isn't widely available, so using it can add extra implementation burden for the designer ๐Ÿ˜ฉ

For UDP-based protocols, sending to the secondary can happen after a number of retries or when a timer expires. To play nice with congestion avoidance, it's advisable to bring in techniques like round-trip-time estimation, slow start and congestive back-off. So a UDP designer often ends up re-inventing stuff TCP and SCTP already have ๐Ÿ’€ That's why raw UDP transport in accounting applications is not recommended ๐Ÿ™…โ€โ™€๏ธ

With any transport, the primary and secondary servers can both receive duplicate packets, so duplicate elimination is required ๐Ÿ”ฅ And since server failures can pile up data on accounting clients, non-volatile storage protects against data loss from transmission timeouts or buffer exhaustion ๐Ÿ’พ On-the-wire interim accounting only gives limited help with server failures ๐Ÿฅฒ


2.1.5. Application layer acknowledgments ๐ŸŽ€

it's possible for the accounting server to have partial failures, which is so rude ๐Ÿ˜ญ For example, a failure in the database back end could leave the retrieval process or thread working fine while the process or thread that stores the data is totally broken. Or the accounting application could run out of disk space and stop storing incoming session records ๐Ÿ’”

In those cases, it's desirable to tell apart a transport layer acknowledgment from an application layer acknowledgment ๐Ÿง Even if both are sent in the same packet (like a TCP segment carrying an application layer acknowledgment along with a piggy-backed ACK), they mean totally different things. A transport-layer acknowledgment means "the transport layer has taken responsibility for delivering the data to the application." An application-layer acknowledgment means "the application has taken responsibility for the data." ๐Ÿ‘‘

A big misconception is that using TCP guarantees the data reaches the application. But as noted in RFC 793 [7]:

An acknowledgment by TCP does not guarantee that the data has been delivered to the end user, but only that the receiving TCP has taken the responsibility to do so.

So if the receiving TCP fails after sending the ACK, the application may never get the data. And if the application fails before committing the data to stable storage, the data may be lost ๐Ÿ˜ฑ For a sending application to be sure the receiving application got its data, either a graceful close of the TCP connection or an application-layer acknowledgment is required. To protect against data loss, the application-layer acknowledgment needs to imply that the data has been written to stable storage or suitably processed so it's guarded against loss ๐Ÿ›ก๏ธ

In partial failures, the transport layer can acknowledge receipt with a transport layer acknowledgment without having delivered the data to the application. Similarly, the application might not finish the tasks it needs to take responsibility for the data ๐Ÿ™ƒ

For example, an accounting server might get data from the transport layer but be unable to store it because of a back end database problem or a disk fault. In that case, it should not send an application layer acknowledgment, even though a transport layer acknowledgment is appropriate. Instead, an application layer error message should be sent that says where the problem is, such as "Backend store unavailable" ๐Ÿšจ

So application-layer acknowledgment capability needs more than just being able to confirm when the application has taken responsibility for the data. It also needs to be able to say when the application hasn't taken responsibility, and why ๐Ÿ’…


2.1.6. Network failures ๐ŸŒง๏ธ

Network failures can cause partial or complete loss of connectivity for the accounting client. With partial connectivity loss, the primary accounting server might be unreachable, and then switching over to the secondary accounting server is necessary. With a network partition, it may be necessary to store accounting events in device memory or non-volatile storage until connectivity comes back ๐Ÿซ 

Same as with accounting server failures, on-the-wire interim accounting only gives limited benefits when it comes to network failures ๐Ÿฅฒ


2.1.7. Device reboots ๐Ÿ”„

When a device reboots, it's desirable to minimize data loss for sessions in progress. Those losses can be big even if the devices are super reliable, because long-lived sessions can make up a major chunk of total resource consumption ๐Ÿ“ˆ To protect these high-value sessions, interim accounting data is typically sent over the wire. But when interim accounting is combined with non-volatile storage, you can guard against data loss in much shorter sessions too ๐Ÿ™Œ

This works since interim accounting data only needs to be stored in non-volatile memory until the session completes. At that point, the interim data can be replaced by the session record. So interim accounting data never has to be sent over the wire, and the interim interval can be decreased to give a very high degree of protection against data loss ๐Ÿงš


2.1.8. Accounting proxies ๐Ÿฆ‹

To keep reliability high, it's important that accounting proxies pass through transport and application layer acknowledgments, and that they do not store and forward accounting packets ๐Ÿ“ฆ This lets the end-systems control retransmission behavior and use techniques like non-volatile storage and secondary servers to get better resilience ๐Ÿ’ช

Here's the catch ๐Ÿ‘€ If an accounting proxy sends a transport or application layer ACK to the device without getting one from the accounting server, it tricks the device into thinking the accounting request was accepted by the server, even though it wasn't. The device can then delete the accounting packet from non-volatile storage before the server has actually accepted it ๐Ÿ˜ฑ That leaves the accounting proxy responsible for delivering accounting packets. And if the proxy has moving parts (like a disk drive) while the devices don't, overall system reliability can go down ๐Ÿ“‰

Store and forward accounting proxies only add value when the accounting subsystem is unreliable. For example, if devices don't implement non-volatile storage and the accounting protocol lacks transport and application layer reliability, putting the accounting proxy (with its stable storage) close to the device can reduce the risk of data loss ๐Ÿซถ

However, such systems are inherently unreliable, so they are only appropriate for use in capacity planning or non-usage sensitive billing applications. If archival accounting reliability is desired, it is necessary to engineer a reliable accounting system from the start using the techniques described in this document, rather than attempting to patch an inherently unreliable system by adding store and forward accounting proxies. ๐Ÿšซ

2.1.9. Fault resilience summary ๐Ÿ“‹

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  Fault          |   Counter-measures                    |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  Packet         |   Retransmission based on RTT         |
|  loss           |   Congestion control                  |
|                 |   Well-defined timeout behavior       |
|                 |   Duplicate elimination               |
|                 |   Interim accounting*                 |
|                 |   Non-volatile storage                |
|                 |   Cumulative variables                |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  Accounting     |   Primary-secondary servers           |
|  server & net   |   Duplicate elimination               |
|  failures       |   Interim accounting*                 |
|                 |   Application layer ACK & error msgs. |
|                 |   Non-volatile storage                |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  Device         |   Interim accounting*                 |
|  reboots        |   Non-volatile storage                |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Key
* = limited usefulness without non-volatile storage

Note: Accounting proxies are not a reliability
enhancement mechanism.

Here's the whole fault resilience picture in one cute table ๐ŸŽ€ For packet loss, you get retransmission based on RTT, congestion control, well-defined timeout behavior, duplicate elimination, interim accounting, non-volatile storage and cumulative variables. For accounting server and network failures, you get primary-secondary servers, duplicate elimination, interim accounting, application layer ACK & error messages, and non-volatile storage. For device reboots, you get interim accounting and non-volatile storage ๐Ÿง


2.2. Resource consumption ๐Ÿ“ˆ

As accounting management systems grow to meet the needs of providers and customers, they consume a bunch of resources, including:

  • Network bandwidth
  • Memory
  • Non-volatile storage
  • State on the accounting management system
  • CPU on the management system and managed devices

To understand the limits to scaling, we're going to look at each of these resources one at a time ๐Ÿ”๐Ÿ’–

2.2.1. Network bandwidth โœจ

okay so accounting management systems eat up network bandwidth just by moving accounting data around ๐Ÿซถ how much they eat depends on how much data gets moved, plus the network overhead that comes along for the ride. an accounting record for a single event can be 100 octets or less, so if every event gets sent on its own, the overhead can become a huge chunk of the total bandwidth ๐Ÿ˜ญ that's why it's often a good idea to send accounting data in batches. the overhead gets spread across a bigger payload, and compression works way better too ๐Ÿ’… as [48] points out, compression can be turned on inside the accounting protocol, or it can be handled at the IP layer like [5] describes ๐ŸŽ€

2.2.2. Memory ๐ŸŒธ

in accounting systems that don't have non-volatile storage, the accounting data has to hang out in volatile memory from the moment it's generated until it gets transferred ๐Ÿ™ˆ how much memory that eats up depends on the retry and retransmission algorithms. systems built for high reliability usually want to keep retrying for a long time, or they might store interim accounting data, so the memory use can get seriously big ๐Ÿ’€ which is why, if non-volatile storage isn't available, compressing the accounting data that's waiting to be sent can be a smart move โœจ

as we mentioned earlier, anyone implementing interim accounting should be careful about excessive memory usage ๐Ÿ‘‘ the trick is to overwrite older interim accounting data with newer data for the same session, instead of piling everything up in the buffer ๐Ÿงš

2.2.3. Non-volatile storage ๐Ÿ’œ

accounting data that lives in memory usually gets lost during a device reboot or a timeout, so it can be really useful to have non-volatile storage for undelivered accounting data ๐Ÿซถ storage costs have been dropping super fast, so network devices are going to be more and more capable of supporting non-volatile storage over the next few years ๐Ÿ”ฅ

non-volatile storage can hold interim or session records. same as with memory, overwriting interim accounting data is the way to go so storage doesn't blow up ๐ŸŒˆ also, using an ASCII data representation lets you use really efficient text compression algorithms that can keep storage needs low ๐Ÿ“ these compression algorithms are typically only applied to session records, because that's what makes it possible to overwrite interim data ๐Ÿ’…

2.2.4. State on the accounting management system ๐Ÿฆ‹

to keep track of the accounting data it receives, an accounting management system may need to store state on the managed devices or on concurrent sessions ๐Ÿ™ˆ there are usually way fewer devices than concurrent sessions, so if it's possible, it's best to keep only per-device state ๐Ÿ’–

2.2.5. CPU requirements ๐ŸŽ€

the CPU usage of the managed and managing nodes scales with how complicated the accounting processing is ๐Ÿง  stuff like ASN.1 encoding and decoding, compression and decompression, and encryption and decryption can eat up a lot of resources, on both accounting clients and accounting servers ๐Ÿ˜ญ

please don't underestimate how much these operations can affect accounting system reliability ๐Ÿฅบ this is especially true for devices with moderate CPU resources. if devices get overworked by accounting tasks, overall device reliability is likely to suffer ๐Ÿ’€

2.2.6. Efficiency measures ๐Ÿ’…

here's the cheat sheet for which efficiency measures go with which resource ๐Ÿ“

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  Resource       |   Efficiency measures                 |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  Network        |   Batching                            |
|  Bandwidth      |   Compression                         |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  Memory         |   Compression                         |
|                 |   Interim accounting overwrite        |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  Non-volatile   |   Compression                         |
|  Storage        |   Interim accounting overwrite        |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  System         |   Per-device state                    |
|  state          |                                       |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                                       |
|  CPU            |   Hardware assisted                   |
|  requirements   |     compression/encryption            |
|                 |                                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

2.3. Data collection models ๐Ÿฆ‹

there are a few data collection models in use today for collecting accounting data ๐Ÿ’œ they include:

  • Polling model
  • Event-driven model without batching
  • Event-driven model with batching
  • Event-driven polling model

2.3.1. Polling model ๐Ÿงš

in the polling model, an accounting manager polls devices for accounting information at regular intervals ๐Ÿ” to avoid losing data, the polling interval has to be shorter than the maximum time accounting data can sit on the polled device ๐Ÿ˜ญ for devices without non-volatile storage, that maximum is usually set by available memory. for devices with non-volatile storage, it's set by how big the non-volatile storage is ๐Ÿ’…

the polling model piles up data inside each device, so the data usually gets transferred to the accounting manager in one batch, which makes the transfer really efficient ๐Ÿซถ when it comes to Accounting Manager state, polling systems scale with the number of managed devices, and system bandwidth usage scales with the amount of data transferred ๐ŸŒธ

without non-volatile storage, the polling model loses accounting data when devices reboot ๐Ÿ’€ it doesn't lose data to packet loss or network failures as long as they're short enough to be handled within available memory. that's because the Accounting Manager just keeps polling until the data gets received ๐Ÿ™Œ when operational problems happen, the amount of accounting data often goes up, which makes data loss more likely ๐Ÿ˜ฌ the good news is the polling model will notice the problem, since attempts to reach the managed devices will fail ๐ŸŽ€

the polling model scales poorly for shared use or roaming services, like wireless data, Internet telephony, QoS provisioning, or Internet access ๐Ÿ™ˆ that's because to get accounting data for users in a given domain, the Accounting Management station would have to keep polling every device in every domain, and most of them wouldn't have any relevant data at all ๐Ÿฅด there are also processing delay issues. using a polling interval means an average processing delay of half the polling interval ๐Ÿ˜ฉ that might be too high for accounting data that needs low processing delay. so for usage sensitive billing applications, like shared use or roaming implementations, the event-driven polling model or the pure event-driven approach is the better fit ๐Ÿ‘‘

polling-based network management systems usually have per-device state ๐Ÿง  they often do accounting management functions too, since network management systems need to keep track of the state of network devices for operational purposes ๐Ÿ” these systems have average processing delays equal to half the polling interval ๐Ÿ’œ

2.3.2. Event-driven model without batching ๐Ÿ’–

in the event-driven model, a device contacts the accounting server or manager when it's ready to transfer accounting data โœจ most event-driven accounting systems, like the RADIUS accounting ones described in [4], only transfer one accounting event per packet, which is pretty inefficient ๐Ÿ™ƒ

without non-volatile storage, a pure event-driven model usually keeps undelivered accounting events only until the timeout interval runs out ๐Ÿ˜ฑ that means this model has the smallest memory requirements ๐ŸŒท but once the timeout interval expires, the accounting event is lost, even if the device still has buffer space to keep storing it ๐Ÿ’€ which makes the event-driven model the least reliable one. accounting data gets lost because of device reboots, sustained packet loss, or network failures that last longer than the timeout interval ๐Ÿ˜ญ in event-driven protocols without a "keep alive" message, accounting servers can't assume a device has failed just because no messages have arrived for a long time ๐Ÿซ  so event-driven accounting systems usually aren't useful for monitoring device health ๐Ÿฉบ

the event-driven model is used a lot in shared use networks and roaming ๐ŸŒ it sends data to the recipient domains without making them poll a huge number of devices, most of which have nothing relevant to say ๐Ÿ™Œ since the event-driven model usually doesn't support batching, it can send accounting records with low processing delay, which makes fraud prevention techniques possible ๐Ÿ•ต๏ธโ€โ™€๏ธ but roaming accounting events are often really high value, so this model's poor reliability is a big problem ๐Ÿ˜ฌ that's why the event-driven polling model might be the better choice ๐ŸŒˆ

the event-driven approach without batching usually means per-session state, so it scales poorly โœจ still, event-driven systems offer the lowest processing delay, since events are processed right away and an event that needs low processing delay can never get stuck behind a batch transfer ๐Ÿ’…๐Ÿ”ฅ

2.3.3. Event-driven model with batching

okay so in the event-driven model with batching, the device reaches out to the accounting server or manager when it's ready to ship its accounting data ๐Ÿ“ฆโœจ It can reach out once a batch of a given size has been collected, when data of a certain type shows up, or after a minimum time period has passed. These systems can send more than one accounting event in a single packet, which makes them way more efficient ๐Ÿ’…

An event-driven system with batching stores accounting events that haven't been delivered yet, up to the limits of memory ๐Ÿง  So accounting data gets lost when the device reboots, but not because of packet loss or short network failures that memory can cover. Bestie, note this part ๐Ÿซถ Bigger batches mean better transfer efficiency, but without non-volatile storage, the data you could lose in a reboot also goes up ๐Ÿ˜ญ

When event-driven systems with batching have a keep-alive interval and run over reliable transport, the accounting server can assume a failure has happened if no messages come in during that keep-alive interval. So these implementations can be genuinely useful for monitoring device health ๐Ÿฉบ When they're used for that, the average delay before a failure gets detected is one half of the keep-alive interval.

With a scheduling algorithm, event-driven systems with batching can give fast service to accounting events that need low processing delay ๐Ÿ”ฅ For example, high-value inter-domain accounting events could be sent right away, which makes fraud-prevention techniques possible, while everything else gets batched. The catch is that an event needing low processing delay might get stuck behind a batch transfer that's already in progress ๐Ÿ™ˆ So the maximum processing delay is proportional to the maximum batch size divided by the link speed.

Event-driven systems with batching scale with the number of active devices ๐ŸŒธ That means this approach scales better than the pure event-driven approach, or even the polling approach, and it scales the same as the event-driven polling approach. But the event-driven batching approach has lower processing delay than event-driven polling, because delivering accounting data takes fewer round-trips, and events that need low processing delay can be accommodated if a scheduling algorithm is used ๐Ÿ’–

2.3.4. Event-driven polling model

In the event-driven polling model, an accounting manager only polls the device for accounting data when it gets an event ๐Ÿงš The accounting client can generate an event once a batch of a given size has been gathered, when data of a certain type is available, or after a minimum time period has elapsed. Again, bigger batches mean better transfer efficiency, but without non-volatile storage, the data lost in a device reboot also goes up ๐Ÿ˜ฌ

Without non-volatile storage, an event-driven polling model loses data when the device reboots, but not because of packet loss or short-duration network partitions ๐Ÿฆ‹ Unless a minimum delivery interval is set, event-driven polling systems aren't useful for monitoring device health, so keep that in mind ๐Ÿ™ˆ

The event-driven polling model can be a good fit for roaming, since it lets accounting data go to roaming partners with low processing delay ๐ŸŒˆ Meanwhile, non-roaming accounting can be handled with more efficient polling techniques, so you get the best of both worlds โœจ

Where batching can be implemented, the state required in event-driven polling can be reduced to scale with the number of active devices ๐Ÿ’œ If parts of the network vary a lot in usage, this state might actually end up being less than what the polling approach needs. Just know that processing delay in this approach is higher than in event-driven accounting with batching, because at least two round-trips are needed to deliver data: one for the event notification, and one for the resulting poll ๐Ÿฅฒ

2.3.5. Data collection summary

Here's the whole data collection lineup in one cute table, with the * marking what non-volatile storage fixes ๐ŸŽ€

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                   |                   |
|     Model       |       Pros        |      Cons         |
|                 |                   |                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Polling        | Per-device state  | Not robust        |
|                 | Robust against    |  against device   |
|                 |   packet loss     |  reboot, server   |
|                 | Batch transfers   |  or network       |
|                 |                   |  failures*        |
|                 |                   | Polling interval  |
|                 |                   |  determined by    |
|                 |                   |  storage limit    |
|                 |                   | High processing   |
|                 |                   |  delay            |
|                 |                   | Unsuitable for    |
|                 |                   |  use in roaming   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Event-driven,  | Lowest processing | Not robust        |
|   no batching   |  delay            |  against packet   |
|                 | Suitable for      |  loss, device     |
|                 |  use in roaming   |  reboot, or       |
|                 |                   |  network          |
|                 |                   |  failures*        |
|                 |                   | Low efficiency    |
|                 |                   | Per-session state |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Event-driven,  | Single round-trip | Not robust        |
|   with batching |  latency          |  against device   |
|      and        | Batch transfers   |  reboot, network  |
|   scheduling    | Suitable for      |  failures*        |
|                 |  use in roaming   |                   |
|                 | Per active device |                   |
|                 |  state            |                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Event-driven   | Batch transfers   | Not robust        |
|   polling       | Suitable for      |  against device   |
|                 |  use in roaming   |  reboot, network  |
|                 | Per active device |  failures*        |
|                 |  state            | Two round-trip    |
|                 |                   |  latency          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Key
* = addressed by non-volatile storage

3. Review of Accounting Protocols โœจ

Accounting systems have been successfully built on protocols like RADIUS, TACACS+, and SNMP ๐Ÿ‘‘ This section breaks down the characteristics of each one.

3.1. RADIUS

RADIUS accounting, described in [4], was built as an add-on to the RADIUS authentication protocol, described in [3] ๐ŸŽ€ Because of that, RADIUS accounting shares the event-driven approach of RADIUS authentication, with no support for batching or polling. So RADIUS accounting scales with the number of accounting events instead of the number of devices, and its transfers are inefficient ๐Ÿ˜ฉ

RADIUS accounting runs over UDP, and timeout and retry parameters aren't specified, so implementations vary wildly in how they handle reliability ๐ŸŽฒ Some keep retrying until delivery or buffer exhaustion, and others lose accounting data after a few retries. There are no application-layer acknowledgments or error messages in RADIUS accounting, so a RADIUS Accounting-Response is basically the same thing as a transport-layer acknowledgment, and it gives zero protection against application layer malfunctions ๐Ÿ’€ Because of this lack of reliability, you can't do simultaneous usage control with RADIUS accounting alone. You typically need another device data source too, like polling a session MIB or a command-line session over telnet ๐Ÿ“Ÿ

RADIUS accounting implementations are vulnerable to packet loss, application layer failures, network failures, and device reboots ๐Ÿ˜ญ These problems get even bigger in inter-domain accounting, which roaming requires ([1],[2]). On the flip side, the event-driven approach of RADIUS accounting is useful when low processing delay is needed, like for credit risk management or fraud detection ๐Ÿ”ฅ

RADIUS accounting does give hop-by-hop authentication and integrity protection, and IPSEC can be used for hop-by-hop confidentiality ๐Ÿ” But data object security isn't supported. So systems based on RADIUS accounting can't be deployed with untrusted proxies, or in situations that need auditability, as noted in [2] ๐Ÿ™…โ€โ™€๏ธ

RADIUS doesn't support compression, but IP compression, described in [5], can be used to provide it ๐Ÿ—œ๏ธ RADIUS is extensible with new attributes in principle, but it suffers from a really small standard attribute space of 256 attributes, which is lowkey a big limit ๐Ÿ˜ค

3.2. TACACS+

TACACS+ offers an accounting model with start, stop, and interim update messages ๐ŸŒท Since TACACS+ is based on TCP, implementations are typically resilient against packet loss and short-lived network partitions, and TACACS+ scales with the number of devices ๐Ÿ™Œ Because it runs over TCP, it supports both transport layer and application layer acknowledgments, so it's suitable for simultaneous usage control and for handling accounting events that need moderate, though not the lowest, processing delay ๐Ÿ’…

TACACS+ provides hop-by-hop authentication and integrity protection, as well as hop-by-hop confidentiality ๐Ÿ”’ Data object security isn't supported, so systems based on TACACS+ accounting can't be deployed in the presence of untrusted proxies ๐Ÿšซ TACACS+ doesn't support compression either, but IP compression, described in [5], can be used to provide it ๐Ÿซง

3.3. SNMP

SNMP, described in [19],[27]-[41], has been widely deployed in a huge variety of intra-domain accounting applications, usually using the polling data collection model ๐ŸŒ Polling lets data get collected on multiple accounting events at the same time, which results in per-device state ๐Ÿง Management applications can retry requests when a response isn't received, which gives resiliency against packet loss and even short-lived network partitions ๐Ÿ’ช Implementations without non-volatile storage aren't robust against device reboots or network failures, but when they're combined with non-volatile storage, they can be made highly reliable ๐Ÿฆ‹

SMIv1, the data modeling language of SNMPv1, has traps to permit trap-directed polling, but the traps aren't acknowledged, and lost traps can lead to a loss of data ๐Ÿ˜ต SMIv2, used by SNMPv2c and SNMPv3, has Inform Requests, which are acknowledged notifications โœ… That makes it possible to build a more reliable event-driven polling model or event-driven batching model ๐ŸŒŸ However, we aren't aware of any SNMP-based accounting implementations currently built on the use of Informs ๐Ÿฅบ

3.3.1. Security services โœจ

okay so SNMPv1 and SNMPv2c do per-packet authentication through the community string, and they give you read-only and read-write access profiles ๐Ÿ”. bestie, the community string is a clear-text password, so it's giving trivial authentication ๐Ÿ’€. There's no per-packet integrity checking, no replay protection, and no confidentiality. view-based access control [40] can be set up with the snmpCommunityMIB from [11] plus SNMPv1 or SNMPv2c messages ๐Ÿฆ‹. The updated SNMP architecture [rfc2571] is the glow-up ๐Ÿ’…: it gives you per-packet hop-by-hop authentication, integrity and replay protection, confidentiality, and access control all together ๐Ÿ‘‘.

The SNMP User Security Model (USM) [38] runs on shared secrets, and when you multiply the number of domains by the number of devices, like in inter-domain accounting apps, the number of secrets gets totally out of hand ๐Ÿ˜ญ. USM's localized key capability is the fix ๐Ÿงš. One manager can hold one central key and share it with lots of SNMP entities in a localized way, and the other entities still can't get at each other's data. If it's deployed properly, this can help with cross-domain security ๐ŸŒธ.

SNMPv3 doesn't give you end-to-end data object integrity and confidentiality, though ๐Ÿ™ˆ. SNMP proxy entities decrypt and re-encrypt the data they forward. If the proxy entity is untrusted, that's not enough protection.

3.3.2. Application layer acknowledgments ๐Ÿซถ

SNMP uses application-layer acknowledgments to show that data got processed ๐Ÿ’œ. Responses to get, get-next, or get-bulk requests send back the requested data, or an error code that tells you what went wrong.

A noError Response to a SET command means the application made the requested assignments ๐ŸŽ€. SETs are atomic, so the command either fully succeeds or fully fails. An error-response means the entity got the request but couldn't execute it ๐Ÿ“.

Notifications don't use acknowledgments to show that data was processed ๐ŸŒˆ. The Inform notification sends back an acknowledgment of receipt, not processing, and that's on purpose โœจ. The updated SNMP architecture treats entities as peers with different levels of functionality, so cooperating entities can use SETs in either direction to get processing acknowledgments. it's a whole vibe ๐Ÿ”ฅ.

There are eighteen SNMP error codes ๐Ÿฆ‹. SNMP's design makes service-specific error codes unnecessary, and honestly undesirable too ๐Ÿ’….

3.3.3. Proxy forwarders ๐Ÿงšโ€โ™€๏ธ

In the accounting management architecture, proxy forwarders are the main characters ๐Ÿ‘‘. They forward intra- and inter-domain accounting events to the right destinations. A proxy forwarder can also show up in a polling or event-driven polling architecture ๐Ÿ’–.

The functionality of an SNMP Proxy Forwarder is defined in [39] ๐Ÿ“–. For example, network devices can be configured to send notifications for all domains to the Proxy Forwarder, and they can also be configured to let the Proxy Forwarder access all MIB data ๐ŸŒธ.

Proxy forwarders can cut down on how many shared secrets you need for inter-domain accounting ๐Ÿ”‘. The domains share a secret with the Proxy Forwarder, and then the Proxy Forwarder shares a secret with each device. So the number of shared secrets scales with the sum of devices and domains, not the product ๐Ÿคฏ. iconic math.

The engine of an SNMP Proxy Forwarder doesn't look inside the PDU of a message, except to figure out which SNMP engine the PDU should go to or which local SNMP application should handle it ๐Ÿซฃ. The Proxy Forwarder doesn't modify varbind values ๐Ÿ™…โ€โ™€๏ธ. It doesn't modify the varbind list either, except to translate between SNMP versions. And it doesn't provide any varbind-level access control ๐Ÿ’€.

3.3.4. Domain-based access controls in SNMP ๐ŸŽ€

Domain-based access controls are required wherever multiple administrative domains are involved, like the shared use networks and roaming associations described in [1] ๐ŸŒ. Since the same device can be accessed by multiple organizations, you often need to control access to accounting data based on the user's organization ๐Ÿข. That way, an organization can see accounting data for its own users, but not for users of other organizations ๐Ÿ™…โ€โ™€๏ธ.

To apply domain-based access controls in inter-domain accounting, you first have to identify the data subset whose access is going to be controlled ๐Ÿ”. SNMP uses a few conceptual abstractions to identify subsets of data: engines, contexts, and views ๐Ÿงฉ. This section explains how that functionality can be applied in intra- and inter-domain accounting ๐Ÿ’œ.

3.3.4.1. Engines ๐Ÿš‚

The new SNMP architecture, described in [27], added the concept of an SNMP engine ๐ŸŒŸ. It improves mobility support and helps identify which data source is being referenced. The engine is the part of an SNMP entity that constructs messages, provides security functions, and maps to the transport layer. Traditional agents and traditional managers each contain an SNMP engine ๐Ÿค–. The engineID lets an SNMP engine be uniquely identified, no matter what address it's attached to on the network ๐Ÿฆ‹.

A securityEngineID field in a message identifies the engine that provides access to the security credentials in the message header ๐Ÿ”. A contextEngineID field identifies the engine that provides access to the data in the PDU ๐Ÿ“ฆ.

The SNMPv3 message format passes both explicitly โœจ. In SNMPv1 and SNMPv2c, the data origin is usually assumed to be the communications endpoint (the SNMP agent) ๐Ÿซถ. SNMPv1 and SNMPv2c messages carry a community name, and the community name plus the source address can be mapped to an engineID through the snmpCommunityTable, which is described in [11] ๐Ÿ—‚๏ธ.

3.3.4.2. Contexts ๐ŸŒธ

Contexts identify subsets of objects, within the scope of an engine, that are tied to instrumentation ๐Ÿ”ง. A contextName refers to one particular subset within an engine ๐ŸŽฏ.

Contexts are usually tied to hardware components, to logical entities related to those components, or to logical services ๐Ÿ’ป. For example, contextNames might be board5, board7, repeater1, repeater2, and so on ๐Ÿ“.

An SNMP agent fills in a read-only dynamic table to tell the manager which contexts it recognizes ๐Ÿ“‹. Contexts are normally defined by the agent instead of the manager, because if the manager defined them, the agent wouldn't know how to tie the contexts to the underlying instrumentation ๐Ÿ™ˆ. It's possible that MIB modules could be defined so a manager can assign contextNames to a logical subset of instrumentation ๐Ÿช„.

Each context can support instances of multiple MIB modules, but each contextName is limited to one instance of a particular MIB module ๐Ÿซง. If you need multiple instances of a MIB module per engine, then you have to define unique contextNames (like repeater1 and repeater2) ๐Ÿ”. The default context "" is used for engines that only support single instances of MIB modules. It's also used for MIB modules where it only makes sense to have one instance in an engine, and that instance has to be easy to find, like the system MIB or the security MIBs ๐Ÿง.

SNMPv3 messages contain contextNames, which are limited to the scope of the contextEngineID in the message ๐Ÿ’œ. SNMPv1 and SNMPv2c messages contain communities, which can be mapped to contextNames within the local engine, or to contextNames within other engines through the snmpCommunityTable, described in [11] ๐Ÿฆ‹.

3.3.4.3. Views ๐Ÿ‘€

Views are defined in the View-based Access Control Model ๐Ÿ›ก๏ธ. A view is a mask that decides who gets access to the managed objects in a particular context ๐ŸŽญ. The view says which objects are visible by specifying the OIDs of the subtrees that are included and excluded. There's also a mechanism for wildcards in the OID specification ๐ŸŒˆ.

For example, you can define one view that includes the RMON tables and another that includes only the SNMPv3 security-related tables ๐Ÿ“Š. With those views, you can give Joe and Josephine (the RMON administrators) access to the RMON view, and give Adam (the SNMP security administrator) access to the SNMPv3 security tables ๐Ÿ‘‘.

Views can be set up with wildcards ๐Ÿ’ซ. For a table indexed by IP addresses, Joe can be allowed access to all rows in certain RMON tables (for example, the RMON hostTable) that fall in the subnet 10.2.x.x, while Josephine gets access to all rows for the subnet 10.200.x.x ๐ŸŒ.

Views filter at the name level (OIDs), not the value level, so defining views based on the values of non-index data isn't supported ๐Ÿšซ. In this example, if the IP address were used merely as a data item instead of an index, view-based access control couldn't achieve the goal of delegating administrative responsibility by subnet ๐Ÿ˜ญ.

View-based access control doesn't depend on message version. Entities using SNMPv1, SNMPv2c, or SNMPv3 message formats can all use it ๐Ÿซถ.

3.3.5. Inter-domain access-control alternatives ๐Ÿ”€

As the number of network devices in a shared use or roaming network grows, the polling model of data collection becomes more and more impractical ๐Ÿข. Most devices won't carry data relating to the polling organization, so it's a lot of wasted effort ๐Ÿ™ƒ. Because of that, shared-use networks and roaming associations that rely on SNMP-based accounting have generally collected data for all organizations and then sorted the session records for delivery to each one ๐Ÿ“š. It works, but the processing delay keeps going up as the number of organizations and data records grows ๐Ÿ’€.

This issue can be addressed in SNMP using the event-driven, event-driven polling, or event-driven batching approaches ๐Ÿ””. Traps and Informs let SNMP-enabled devices notify domains that accounting data is waiting to be collected ๐Ÿ’Œ. SNMP Applications [39] defines a standard module for managing notifications ๐Ÿงพ.

To use the event-driven approaches, the device has to be able to tell when information is available for a domain โฐ. Domain-specific data can be told apart at the SNMP agent level by using the domain as an index, and by separating the data into domain-specific contexts ๐Ÿ—‚๏ธโœจ.

3.3.5.1. Domain as index โœจ

Okay bestie, view-based access control [40] lets you make lots of tiny, fine-grained views of an SNMP MIB and hand each one to a specific group of users. What you're allowed to see depends on who is asking ๐Ÿ‘€ main character energy.

For example, all the users of bigco.com who are allowed access to the device would be defined in the User-based security MIB module (or some other security model MIB module) ๐ŸŽ€. To keep access control easy to manage, you can group those users under a vacmGroupName, like bigco ๐Ÿ’–. A view of a subset of the data objects in the MIB can be defined in the vacmViewFamilyTreeTable ๐ŸŒธ, and the vacmAccessTable pairs groups with views ๐Ÿซถ. So messages from users in the bigco group only get access to the data that bigco users are permitted to view, as defined in the view family tree. The catch is that each domain accessing the data needs one or more separate vacmGroupNames, an appropriate ViewTable has to be defined, and the vacmAccessTable has to be configured for each group ๐Ÿ˜ญ.

Views filter at the name (OID) level, not at the data (value) level. So when you use views to filter by domain, it is necessary to use the domain as an index ๐Ÿ”ฅ. Standard view-based access control is not designed to filter based on the values of non-indexed fields ๐Ÿ’….

For example, a table of session data could be indexed by record number and domain. That lets you define a view that restricts bigco data to the administrators of the bigco domain ๐Ÿฆ‹.

An advantage of using domains as an index is that this technique can be used with SNMPv1 and SNMPv2c agents as well as with SNMPv3 agents ๐Ÿงš. A disadvantage is that the MIB modules must be specifically designed for this purpose ๐Ÿ’€. Since existing MIB modules rarely use the domain as an index, domain separation cannot be enabled within legacy MIB modules using this technique ๐Ÿ™ˆ.

Okay one more thing: SNMP does support a RowPointer convention ๐ŸŒˆ. It could be used to define a new table, indexed by domain, which holds tuples between the domain and existing rows of data. This would introduce issues of synchronization between tables, so keep that in mind ๐Ÿ“.

3.3.5.2. Contexts

ContextNames can be used to differentiate multiple instances of a MIB module within an engine ๐Ÿงฉ.

Individual domains, such as bigco.com, could be mapped to logical contexts, such as a bigco context ๐ŸŽ€. The agent would need to create and recognize new contexts, and to know which instrumentation is associated with the logical context. The agent needs to collect accounting data by domain and make the data accessible via distinct contexts, so that access control can be applied to the context and sensitive information isn't disclosed to the wrong domain ๐Ÿ”’. The VACM access control views are applied relative to the context, so an operation can be permitted or denied a user based on the context which contains the data โœจ.

Domain separation is handled by using contextName to differentiate multiple virtual tables ๐Ÿ’œ. For example, if accounting data has been collected on users with the bigco.com and smallco.com domains, then a separate virtual instance of the accounting session record table would exist for each domain, and each domain would have a corresponding contextName. When a get-bulk request is made with a contextName of bigco, then data from the virtual table in the bigco context, i.e. corresponding to the bigco.com domain, would be returned ๐Ÿฆ‹.

There are a number of design approaches to creating new contexts and associating them with appropriate instrumentation, most notably a sub-agent approach and a manager-configured MIB approach ๐Ÿง .

AgentX [51] is the one that standardizes a registration protocol between sub-agents and master agents to simplify SNMP agent implementation ๐Ÿ› ๏ธ. It allows for the creation and recognition of new contextNames when a subagent registers to provide support for a particular MIB subtree range. The sub-agent knows how to support a particular functionality, e.g. instrumentation exposed via a range of MIB objects. Based on values detected in the data, such as source=bigco.com, the sub-agent could determine that a new domain needed to be tracked, then create the appropriate context for collecting the data, plus the appropriate access control entries. That determination could be table-driven, using MIB configuration ๐ŸŒธ.

A manager-driven approach could use a MIB module to predefine contextNames corresponding to the domains of interest ๐Ÿ“‹. That same MIB module could indicate which objects should be collected, how to differentiate which domain the data should be applied to based on a specified condition, and what access control rules apply to the context ๐Ÿ’….

Either technique could associate existing MIB modules with domain-specific contexts, so domain separation can be applied to MIB modules not specifically designed with domain separation in mind ๐ŸŒˆ. Legacy agents would not be designed to do this, so they would need to be updated to support inter-domain separation and VACM access control ๐Ÿ™ˆ.

The use of contextNames for inter-domain separation represents new territory ๐Ÿ—บ๏ธ. So careful consideration would be needed when designing the MIB modules and applications that provide domain-to-context and context-to-instrumentation mappings, and you have to make sure security is not weakened ๐Ÿ”ฅ. This is a no-cap "be careful" moment, periodt ๐Ÿ˜ญ.

3.3.6. Outstanding issues

There are issues that arise when using SNMP for the transfer of bulk data, including issues of latency, network overhead, and table retrieval, as discussed in [49] ๐Ÿ“ฆ.

In accounting applications, management stations often must retrieve large tables ๐Ÿ“Š. Latency can be high, even with the get-bulk operation, because the response must fit into the largest supported packet size, which means multiple round-trips ๐Ÿข. Transfers may be serialized, so the resulting latency is a combination of multiple round-trip times, possible timeout and re-transmission delays, and processing overhead. That can result in unacceptable performance ๐Ÿ’€. Since data may change during the course of multiple retrievals, it can be difficult to get a consistent snapshot ๐Ÿ“ธ.

For bulk transfers, SNMP network overhead can be high ๐Ÿ˜ค. The reasons are the lack of compression, the inefficiency of BER encoding, the transmission of redundant OID prefixes, and the "get-bulk overshoot problem". In bulk transfer of a table, the OIDs transferred are redundant: all OID prefixes up to the column number are identical, as are the instance identifier postfixes of all entries of a single table row. Thus it may be possible to reduce this redundancy by compressing the OIDs, or by not transferring an OID with each variable ๐Ÿงƒ.

The "get-bulk overshoot problem", described in reference [50], occurs when using the get-bulk PDU ๐Ÿ™ƒ. The problem is that the manager typically does not know the number of rows in the table. As a result, it must either request too many rows, retrieving unneeded data, or too few, which means multiple get-bulk requests. Note that the "get-bulk overshoot" problem may be preventable on the agent side ๐Ÿ’ก. Reference [41] states that an agent can terminate the get-bulk because of "local constraints" (see items 1 and 3 on pages 15/16 of [41]). This could be interpreted to mean that it is possible to stop at the end of a table ๐Ÿ.

3.3.6.1. Ongoing research

To address issues of latency and efficiency, the Network Management Research Group (NMRG) was formed within the Internet Research Task Force (IRTF) ๐Ÿ”ฌ. Since the NMRG work is research and is not on the standards track, it should be understood that the NMRG proposals may never be standardized, or may change substantially during the standardization process. As a result, these proposals represent works in progress and are not readily available for use ๐Ÿšง.

The proposals under discussion in the IRTF Network Management Research Group (NMRG) are described in [46] ๐Ÿงช. These include an SNMP-over-TCP transport mapping, described in [47]; SNMP payload compression, described in [48]; and the addition of a "get subtree" PDU or the subtree retrieval MIB [50] ๐ŸŒท.

The SNMP-over-TCP transport mapping may result in substantial latency reductions in table retrieval ๐Ÿš€. The latency reduction of an SNMP-over-TCP transport mapping will likely show up primarily in the polling, event-driven polling and event-driven batching modes ๐Ÿ“ˆ.

Payload compression methods include compression of the IP packet, as described in [5], or compression of the SNMP payload, described in [48] ๐Ÿ—œ๏ธ.

Proposed improvements to table retrieval include a subtree retrieval MIB and the addition of a get-subtree PDU ๐ŸŒณ. The subtree retrieval MIB [50] requires no changes to the SNMP protocol or SNMP protocol engine, so it can be implemented and deployed more easily than a change to the protocol ๐Ÿฅฐ. The addition of a get-subtree PDU implies changes to the protocol and to the engines of all SNMP entities which would support it ๐Ÿ›‘. Since it may be possible to address the "get-bulk overshoot problem" without changes to the SNMP protocol, the necessity of this modification is controversial ๐Ÿฟ.

Reference [49] also discusses file-based storage of SNMP data, and the use of an FTP MIB, to enable storage of SNMP data in non-volatile storage and subsequent bulk transfer via FTP ๐Ÿ’พ. This approach would require implementation of additional MIB modules as well as FTP. It also requires separate security mechanisms such as IPSEC to provide authentication, replay, integrity protection and confidentiality for the data in transit ๐Ÿ”. The file-based transfer approach has an important benefit: compatibility with non-volatile storage โญ.

Issues of legacy support exist with the NMRG proposals ๐Ÿ˜ฌ. Devices which do not implement the new functionality would need to be accommodated. This is especially problematic for proxy forwarders, which may need to act as translators between new and legacy entities ๐Ÿงณ. In these situations, the overhead of translation may offset the benefits of the new technologies ๐Ÿซ .

3.3.6.2. On-going security extension research ๐Ÿ”ฎ

okay so bestie, the SNMP crew has been cooking up ways to make security way easier ๐Ÿ’… To simplify key management and enable certificate-based security in SNMPv3, a Kerberos Security Model (KSM) for SNMPv3 has been proposed in [44]. This memo is not on the standards track, and therefore is not yet readily available for use. ๐Ÿซถ

Using Kerberos with SNMPv3 means storing a key on the KDC for each device and domain, while dynamically generating a session key for conversations between domains and devices. For stored keys, the KSM approach scales with the sum of devices and domains. For dynamic session keys, it scales as the product of domains and devices. The math is giving a lot ๐Ÿงฎ

As Kerberos is extended to allow initial authentication via public key, as described in [42], and cross-realm authentication, as described in [43], the KSM inherits these capabilities. So this approach may have potential to reduce or even eliminate the shared secret management problem โœจ However, it should also be noted that certificate-based authentication can strain the limits of UDP packet sizes supported in SNMP implementations, so that alternate transport mappings may be required to support this. Not gonna lie, that's a real catch ๐Ÿ˜ญ

An IPSEC-based security model for SNMPv3 has been discussed too ๐Ÿฆ‹ Implementing it would require the SNMPv3 engine to be able to retrieve the properties of the IPSEC security association used to protect the SNMPv3 traffic. That includes the security services invoked, plus info about the other endpoint, like the authentication method and presented identity and certificate. Here's the tea: most of these APIs haven't been widely implemented yet, and most IPSEC implementations only support machine certificates, which may not give the granularity of identification that's needed. So an IPSEC-based security model for SNMPv3 would probably take several years to come to fruition ๐Ÿ’€


3.3.7. SNMP summary ๐ŸŒธ

Given the wealth of existing accounting-related MIB modules, it is likely that SNMP will remain a popular accounting protocol for the foreseeable future ๐Ÿ‘‘

Support for notifications makes it possible to implement the event-driven, event-driven polling and event-driven batching models. This makes it possible to notify domains of available data rather than requiring them to poll for it, which is critical in shared use networks and roaming ๐Ÿ”ฅ

Given the SNMPv3 security enhancements, it is desirable for SNMP-based intra-domain accounting implementations to upgrade to SNMPv3. Such an upgrade is virtually mandatory for inter-domain applications. Iykyk ๐Ÿ™ˆ

In inter-domain accounting, the burden of managing SNMPv3 shared secrets can be reduced via the localized key capability or via implementation of a Proxy Forwarder. In the long term, alternative security models such as the Kerberos Security Model may further reduce the effort required to manage security and enable streamlined inter-domain operation ๐Ÿงš

SNMP-based accounting has limitations in terms of efficiency and latency that may make it inappropriate for use in situations requiring low processing delay or low overhead. This includes usage sensitive billing applications where fraud detection may be required. These issues can be addressed via proposals under discussion in the IRTF Network Management Research Group (NMRG). The experimental SNMP over TCP transport mapping may prove helpful at reducing latency. Depending on the volume of data, some form of compression may also be worth considering. However, since these proposals are still in the research stage, and are not on the standards track, these capabilities are not readily available, and the specifications could change considerably before they reach their final form. โš ๏ธ

Heads up, bestie: these proposals are still baking, so the specs could change a LOT before they're final ๐Ÿ˜ญ

SNMP supports separation of accounting data by domain, using either of two general approaches with the VACM access control model. The domain as index approach can be used if the desired MIB module supports domain indexing, or it can implemented using an additional table. The domain-context approach can be used in agents which support dynamic logical contexts and a domain-to-context and context-to-instrumentation mapping mechanism. Either approach can be supported using SNMPv1, SNMPv2c, or SNMPv3 messages, by utilizing the snmpCommunitytable [11] to provide a community-to-context mapping. ๐ŸŽ€


4. Review of Accounting Data Transfer โœจ

In order for session records to be transmitted between accounting servers, a transfer protocol is required. Transfer protocols in use today include SMTP, FTP, and HTTP. For a review of accounting attributes and record formats, see [45] ๐Ÿ“

Reference [49] contains a discussion of alternative encodings for SMI data types, as well as alternative protocols for transmission of accounting data. For example, [49] describes how MIME tags and XML DTDs may be used for encoding of SNMP messages or SMI data types. This enables data from SNMP MIBs to be transported using any protocol that can encapsulate MIME or XML, including SMTP and HTTP. Main character energy ๐Ÿฆ‹

4.1. SMTP ๐Ÿ’Œ

To date, few accounting management systems have been built on SMTP since the implementation of a store-and-forward message system has traditionally required access to non-volatile storage which has not been widely available on network devices. However, SMTP-based implementations have many desirable characteristics, particularly with regards to security ๐Ÿซถ

Accounting management systems using SMTP for accounting transfer will typically support batching so that message processing overhead will be spread over multiple accounting records. As a result, these systems result in per-active device state. Since accounting systems using SMTP as a transfer mechanism have access to substantial non-volatile storage, they can generate, compress if necessary, and store accounting records until they are transferred to the collection site. As a result, accounting systems implemented using SMTP can be highly efficient and scalable. Using IPSEC, TLS or Kerberos, hop-by-hop security services such as authentication, integrity protection and confidentiality can be provided ๐Ÿ”

As described in [13] and [15], data object security is available for SMTP, and in addition, the facilities described in [12] make it possible to request and receive signed receipts, which enables non-repudiation as described in [12]-[17]. As a result, accounting systems utilizing SMTP for accounting data transfer are capable of satisfying the most demanding security requirements ๐Ÿ‘‘ However, such systems are not typically capable of providing low processing delay, although this may be addressed by the enhancements described in [20] ๐Ÿฅน

4.2. Other protocols ๐Ÿ“

File transfer protocols such as FTP and HTTP have been used for transfer of accounting data. For example, Reference [9] describes a means for representing ASN.1-based accounting data for storage on archival media. Through the use of the Bulk File MIB, accounting data from an SNMP MIB can be stored in ASN.1, bulk binary or Bulk ASCII format, and then subsequently retrieved as required using the FTP Client MIB ๐Ÿ“‚

Given access to sufficient non-volatile storage, accounting systems based on record formats and transfer protocols can avoid loss of data due to long-duration network partitions, server failures or device reboots. Since it is possible for the transfer to be driven from the collection site, the collector can retry transfers until successful, or with HTTP may even be able to restart partially completed transfers. As a result, file transfer-based systems can be made highly reliable, and the batching of accounting records makes possible efficient transfers and application of required security services with lessened overhead. It's giving reliability, periodt ๐Ÿ’–

5. Summary ๐Ÿ’…

Okay so, like I said earlier, accounting apps are NOT all the same vibe ๐Ÿ’€ Some only need authentication, integrity, replay protection, and modest reliability (think capacity planning ๐Ÿ“Š). Others, like inter-domain usage-sensitive billing, need the highest level of security and reliability, because the accounting data basically moves the money ๐Ÿ’ธ fr fr.

Since the requirements aren't uniform, there's no single accounting protocol and security service set that covers everything ๐Ÿ™…โ€โ™€๏ธ. The goal of accounting management should be to give you a toolbox ๐Ÿงฐ so you can build a system that fits your application. That means you gotta actually analyze the app to make sure your chosen methods meet its security and reliability needs ๐Ÿ”.

Based on the analysis, existing deployed protocols are capable of meeting the requirements for intra-domain capacity planning and non-usage sensitive billing ๐ŸŽ€. Efficient bulk transfer is useful here, though not critical, so SNMPv3 can handle these without the NMRG extensions. Those extensions are TCP transport mapping, sub-tree retrieval, and OID compression.

Inter-domain capacity planning and non-usage sensitive billing have way higher security and reliability needs, and no existing deployed protocol fully meets them ๐Ÿ˜ญ. Existing protocols lack data object security, and we need scalability upgrades for inter-domain authentication, like the Kerberos Security Model (KSM) for SNMPv3 ๐Ÿ”.

For usage sensitive billing, cost allocation, and auditing, the reliability requirement is even stronger ๐Ÿ“ˆ. Transport layer reliability is required to stay robust against packet loss, and application layer acknowledgments are needed to stay robust against accounting server failures. SNMP operations, except InforRequest, give application layer acknowledgments, and the TCP transport mapping proposed by NMRG gives robustness against packet loss. Inter-domain operation can benefit from data object security (which no existing protocol provides) and inter-domain security model enhancements (like the KSM) ๐ŸŒˆ.

When high-value sessions are involved, like roaming, Mobile IP, or telephony, you may need to put bounds on processing delay โฑ๏ธ. That means latency has to come down. So the NMRG extensions are required in time sensitive billing applications, including TCP transport mapping, get-subtree capabilities, and OID compression. High reliability is also required here, which means you need application layer as well as transport layer acknowledgments โœจ. SNMPv3 with the NMRG extensions and security scalability improvements like the KSM can satisfy the requirements for intra-domain use ๐Ÿฆ‹.

Inter-domain use, though, needs extra security precautions, like data object security and receipt support ๐Ÿšจ. No existing protocol can meet these requirements yet. A summary is given in the table below ๐Ÿ‘‡

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                     |                   |
|  Usage          |   Intra-domain      | Inter-domain      |
|                 |                     |                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                     |                   |
|  Capacity       | SNMPv3 &            | SNMPv3 &<*        |
|  Planning       | RADIUS #%@          |                   |
|                 | TACACS+ @           |                   |
|                 |                     |                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                     |                   |
|  Non-usage      | SNMPv3 &            | SNMPv3 &<*        |
|  Sensitive      | RADIUS #%@          |                   |
|  Billing        | TACACS+ @           |                   |
|                 |                     |                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                     |                   |
|  Usage          |                     |                   |
|  Sensitive      |                     |                   |
|  Billing,       | SNMPv3 &>$          | SNMPv3 &<>*$      |
|  Cost           | TACACS+ &$@         |                   |
|  Allocation &   |                     |                   |
|  Auditing       |                     |                   |
|                 |                     |                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 |                     |                   |
|  Time           |                     |                   |
|  Sensitive      | SNMPv3 &>$          |  No existing      |
|  Billing,       |                     |  protocol         |
|  fraud          |                     |                   |
|  detection,     |                     |                   |
|  roaming        |                     |                   |
|                 |                     |                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Key:

# = lacks confidentiality support
* = lacks data object security
% = limited robustness against packet loss
& = lacks application layer acknowledgment (e.g. SNMP InformRequest)
$ = requires non-volatile storage
@ = lacks batching support
< = lacks certificate support (KSM, work in progress)
> = lacks support for large packet sizes (TCP transport mapping,
    experimental)

6. Security Considerations ๐Ÿ”’

Security issues are discussed throughout this memo. Honestly, security is the main character of this whole doc ๐ŸŽญ, so keep your eyes peeled as you read through every section ๐Ÿ‘€.


7. Acknowledgments ๐Ÿซถ

The authors would like to thank Bert Wijnen (Lucent), Keith McCloghrie (Cisco Systems), Jan Melen (Ericsson) and Jarmo Savolainen (Ericsson) for useful discussions of this problem space ๐Ÿ’–.

8. References ๐Ÿ“š

okay bestie, this is the bibliography ๐Ÿค“ every source the RFC pulled from, all 51 of them, listed exactly as written so nothing gets lost ๐Ÿ’–

  • [1] Aboba, B., Lu J., Alsop J., Ding J. and W. Wang, "Review of Roaming Implementations", RFC 2194, September 1997.
  • [2] Aboba, B. and G. Zorn, "Criteria for Evaluating Roaming Protocols", RFC 2477, January 1999.
  • [3] Rigney, C., Rubens, A., Simpson, W. and S. Willens, "Remote Authentication Dial In User Service (RADIUS)", RFC 2138, April, 1997.
  • [4] Rigney, C., "RADIUS Accounting", RFC 2139, April 1997.
  • [5] Shacham, A., Monsour, R., Pereira, R. and M. Thomas, "IP Payload Compression Protocol (IPComp)", RFC 2393, December 1998.
  • [6] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
  • [7] Information Sciences Institute, "Transmission Control Protocol", RFC 793, September 1981.
  • [8] Aboba, B. and M. Beadles, "The Network Access Identifier", RFC 2486, January 1999.
  • [9] McCloghrie, K., Heinanen, J., Greene, W. and A. Prasad, "Accounting Information for ATM Networks", RFC 2512, February 1999.
  • [10] McCloghrie, K., Heinanen, J., Greene, W., and A. Prasad, "Managed Objects for Controlling the Collection and Storage of Accounting Information for Connection-Oriented Networks", RFC 2513, February 1999.
  • [11] Frye, R., Levi, D., Routhier, S. and B. Wijnen, "Coexistence between Version 1, Version 2, and Version 3 of the Internet-standard Management Framework", RFC 2576, March 2000.
  • [12] Fajman, R., "An Extensible Message Format for Message Disposition Notifications", RFC 2298, March 1998.
  • [13] Elkins, M., "MIME Security with Pretty Good Privacy (PGP)", RFC 2015, October 1996.
  • [14] Vaudreuil, G., "The Multipart/Report Content Type for the Reporting of Mail System Administrative Messages", RFC 1892, January 1996.
  • [15] Galvin, J., Murphy, S., Crocker, S. and N. Freed, "Security Multiparts for MIME: Multi-part/Signed and Multipart/Encrypted", RFC 1847, October 1995.
  • [16] Crocker, D., "MIME Encapsulation of EDI Objects", RFC 1767, March 1995.
  • [17] Borenstein, N. and N. Freed, "MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies", RFC 1521, December 1993.
  • [18] Rose, M.T., The Simple Book, Second Edition, Prentice Hall, Upper Saddle River, NJ, 1996.
  • [19] Case, J., Mundy, R., Partain, D. and B. Stewart, "Introduction to Version 3 of the Internet-standard Network Management Framework", RFC 2570, April 1999.
  • [20] Klyne, G., "Timely Delivery for Facsimile Using Internet Mail", Work in Progress.
  • [21] Johnson, H. T., Kaplan, R. S., Relevance Lost: The Rise and Fall of Management Accounting, Harvard Business School Press, Boston, Massachusetts, 1987.
  • [22] Horngren, C. T., Foster, G., Cost Accounting: A Managerial Emphasis. Prentice Hall, Englewood Cliffs, New Jersey, 1991.
  • [23] Kaplan, R. S., Atkinson, Anthony A., Advanced Management Accounting, Prentice Hall, Englewood Cliffs, New Jersey, 1989.
  • [24] Cooper, R., Kaplan, R. S., The Design of Cost Management Systems. Prentice Hall, Englewood Cliffs, New Jersey, 1991.
  • [25] Rigney, C., Willats, S. and P. Calhoun, "RADIUS Extensions", RFC 2869, June 2000.
  • [26] Stewart, R., et al., "Simple Control Transmission Protocol", RFC 2960, October 2000.
  • [27] Harrington, D., Presuhn, R., and B. Wijnen, "An Architecture for Describing SNMP Management Frameworks", RFC 2571, April 1999.
  • [28] Rose, M., and K. McCloghrie, "Structure and Identification of Management Information for TCP/IP-based Internets", STD 16, RFC 1155, May 1990.
  • [29] Rose, M. and K. McCloghrie, "Concise MIB Definitions", STD 16, RFC 1212, March 1991.
  • [30] Rose, M., "A Convention for Defining Traps for use with the SNMP", RFC 1215, March 1991.
  • [31] McCloghrie, K., Perkins, D. and J. Schoenwaelder, "Structure of Management Information Version 2 (SMIv2)", STD 58, RFC 2578, April 1999.
  • [32] McCloghrie, K., Perkins, D. and J. Schoenwaelder, "Textual Conventions for SMIv2", STD 58, RFC 2579, April 1999.
  • [33] McCloghrie, K., Perkins, D. and J. Schoenwaelder, "Conformance Statements for SMIv2", STD 58, RFC 2580, April 1999.
  • [34] Case, J., Fedor, M., Schoffstall, M. and J. Davin, "Simple Network Management Protocol", STD 15, RFC 1157, May 1990.
  • [35] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Introduction to Community-based SNMPv2", RFC 1901, January 1996.
  • [36] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Transport Mappings for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1906, January 1996.
  • [37] Case, J., Harrington D., Presuhn R. and B. Wijnen, "Message Processing and Dispatching for the Simple Network Management Protocol (SNMP)", RFC 2572, April 1999.
  • [38] Blumenthal, U. and B. Wijnen, "User-based Security Model (USM) for version 3 of the Simple Network Management Protocol (SNMPv3)", RFC 2574, April 1999.
  • [39] Levi, D., Meyer, P. and B. Stewart, "SNMPv3 Applications", RFC 2573, April 1999.
  • [40] Wijnen, B., Presuhn, R. and K. McCloghrie, "View-based Access Control Model (VACM) for the Simple Network Management Protocol (SNMP)", RFC 2575, April 1999.
  • [41] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Protocol Operations for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1905, January 1996.
  • [42] Tung, B., Neuman, C., Hur, M., Medvinsky, A., Medvinsky, S., Wray, J. and J. Trostle, "Public Key Cryptography for Initial Authentication in Kerberos", Work in Progress.
  • [43] Tung, B., Ryutov, T., Neuman, C., Tsudik, G., Sommerfeld, B., Medvinsky, A. and M. Hur, "Public Key Cryptography for Cross-Realm Authentication in Kerberos", Work in Progress.
  • [44] Hornstein, K. and W. Hardaker, "A Kerberos Security Model for SNMPv3", Work in Progress.
  • [45] Brownlee, N. and A. Blount, "Accounting Attributes and Record Formats", RFC 2924, September 2000.
  • [46] Network Management Research Group Web page, http://www.ibr.cs.tu-bs.de/projects/nmrg/
  • [47] Schoenwaelder, J., "SNMP-over-TCP Transport Mapping", Work in Progress.
  • [48] Schoenwaelder, J., "SNMP Payload Compression", Work in Progress.
  • [49] Sprenkels, R., Martin-Flatin, J., "Bulk Transfers of MIB Data", Simple Times, http://www.simple-times.org/pub/simple-times/issues/7-1.html, March 1999.
  • [50] Thaler, D., "Get Subtree Retrieval MIB", Work in Progress.
  • [51] Daniele, M., Wijnen, B., Ellison, M. and D. Francisco, "Agent Extensibility (AgentX) Protocol Version 1", RFC 2741, January 2000.

9. Authors' Addresses ๐ŸŽ€

meet the squad who wrote this thing ๐Ÿซถ here's how to reach each of them โœจ

Bernard Aboba
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
USA

Phone: +1 425 936 6605
EMail: bernarda@microsoft.com


Jari Arkko
Oy LM Ericsson Ab
02420 Jorvas
Finland

Phone: +358 40 5079256
EMail: Jari.Arkko@ericsson.com


David Harrington
Cabletron Systems Inc.
P.O.Box 5005
Rochester NH 03867-5005
USA

Phone: +1 603 337 7357
EMail: dbh@cabletron.com

10. Intellectual Property Statement ๐Ÿ”ฅ

okay this part is about who owns what ๐Ÿ’… The IETF doesn't take a side on whether any intellectual property or other rights someone might claim over the technology in this document apply to implementing or using it. It also doesn't say whether any license under those rights is available, and it doesn't claim it went looking for any such rights either. If you want the IETF's procedures for rights in standards-track and standards-related documents, check out BCP-11. Copies of rights claims that were submitted for publication, assurances of licenses that will be made available, and the results of any attempt to get a general license or permission for implementors or users to use those proprietary rights can all be obtained from the IETF Secretariat.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology needed to practice this standard. Send that info to the IETF Executive Director ๐Ÿ“ฌ


the legal stuff, but make it cute ๐Ÿ’œ

Copyright (C) The Internet Society (2000). All Rights Reserved. ๐ŸŒˆ

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, as long as the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations. The exceptions are when it's needed for developing Internet standards, in which case the copyright procedures in the Internet Standards process must be followed, or when it's required to translate it into languages other than English.

The limited permissions above are perpetual and won't be revoked by the Internet Society or its successors or assigns โœจ

This document and the information in it is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ๐Ÿ’€


Acknowledgement ๐Ÿซถ

last but definitely not least ๐ŸŒธ Funding for the RFC Editor function is currently provided by the Internet Society. Thank you for sticking with me through all 12 parts, bestie ๐Ÿฆ‹๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from