7 Network Working Group C. Rigney
8 Request for Comments: 2866 Livingston
9 Category: Informational June 2000
17 This memo provides information for the Internet community. It does
18 not specify an Internet standard of any kind. Distribution of this
23 Copyright (C) The Internet Society (2000). All Rights Reserved.
27 This document describes a protocol for carrying accounting
28 information between a Network Access Server and a shared Accounting
33 This memo documents the RADIUS Accounting protocol. The early
34 deployment of RADIUS Accounting was done using UDP port number 1646,
35 which conflicts with the "sa-msg-port" service. The officially
36 assigned port number for RADIUS Accounting is 1813.
40 1. Introduction .................................... 2
41 1.1 Specification of Requirements ................. 3
42 1.2 Terminology ................................... 3
43 2. Operation ....................................... 4
44 2.1 Proxy ......................................... 4
45 3. Packet Format ................................... 5
46 4. Packet Types ................................... 7
47 4.1 Accounting-Request ............................ 8
48 4.2 Accounting-Response ........................... 9
49 5. Attributes ...................................... 10
50 5.1 Acct-Status-Type .............................. 12
51 5.2 Acct-Delay-Time ............................... 13
52 5.3 Acct-Input-Octets ............................. 14
53 5.4 Acct-Output-Octets ............................ 15
54 5.5 Acct-Session-Id ............................... 15
58 Rigney Informational [Page 1]
60 RFC 2866 RADIUS Accounting June 2000
63 5.6 Acct-Authentic ................................ 16
64 5.7 Acct-Session-Time ............................. 17
65 5.8 Acct-Input-Packets ............................ 18
66 5.9 Acct-Output-Packets ........................... 18
67 5.10 Acct-Terminate-Cause .......................... 19
68 5.11 Acct-Multi-Session-Id ......................... 21
69 5.12 Acct-Link-Count ............................... 22
70 5.13 Table of Attributes ........................... 23
71 6. IANA Considerations ............................. 25
72 7. Security Considerations ......................... 25
73 8. Change Log ...................................... 25
74 9. References ...................................... 26
75 10. Acknowledgements ................................ 26
76 11. Chair's Address ................................. 26
77 12. Author's Address ................................ 27
78 13. Full Copyright Statement ........................ 28
82 Managing dispersed serial line and modem pools for large numbers of
83 users can create the need for significant administrative support.
84 Since modem pools are by definition a link to the outside world, they
85 require careful attention to security, authorization and accounting.
86 This can be best achieved by managing a single "database" of users,
87 which allows for authentication (verifying user name and password) as
88 well as configuration information detailing the type of service to
89 deliver to the user (for example, SLIP, PPP, telnet, rlogin).
91 The RADIUS (Remote Authentication Dial In User Service) document [2]
92 specifies the RADIUS protocol used for Authentication and
93 Authorization. This memo extends the use of the RADIUS protocol to
94 cover delivery of accounting information from the Network Access
95 Server (NAS) to a RADIUS accounting server.
97 This document obsoletes RFC 2139 [1]. A summary of the changes
98 between this document and RFC 2139 is available in the "Change Log"
101 Key features of RADIUS Accounting are:
105 A Network Access Server (NAS) operates as a client of the
106 RADIUS accounting server. The client is responsible for
107 passing user accounting information to a designated RADIUS
114 Rigney Informational [Page 2]
116 RFC 2866 RADIUS Accounting June 2000
119 The RADIUS accounting server is responsible for receiving the
120 accounting request and returning a response to the client
121 indicating that it has successfully received the request.
123 The RADIUS accounting server can act as a proxy client to
124 other kinds of accounting servers.
128 Transactions between the client and RADIUS accounting server
129 are authenticated through the use of a shared secret, which is
130 never sent over the network.
134 All transactions are comprised of variable length Attribute-
135 Length-Value 3-tuples. New attribute values can be added
136 without disturbing existing implementations of the protocol.
138 1.1. Specification of Requirements
140 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
141 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
142 document are to be interpreted as described in RFC 2119 [3]. These
143 key words mean the same thing whether capitalized or not.
147 This document uses the following terms:
149 service The NAS provides a service to the dial-in user, such as PPP
152 session Each service provided by the NAS to a dial-in user
153 constitutes a session, with the beginning of the session
154 defined as the point where service is first provided and
155 the end of the session defined as the point where service
156 is ended. A user may have multiple sessions in parallel or
157 series if the NAS supports that, with each session
158 generating a separate start and stop accounting record with
159 its own Acct-Session-Id.
162 This means the implementation discards the packet without
163 further processing. The implementation SHOULD provide the
164 capability of logging the error, including the contents of
165 the silently discarded packet, and SHOULD record the event
166 in a statistics counter.
170 Rigney Informational [Page 3]
172 RFC 2866 RADIUS Accounting June 2000
177 When a client is configured to use RADIUS Accounting, at the start of
178 service delivery it will generate an Accounting Start packet
179 describing the type of service being delivered and the user it is
180 being delivered to, and will send that to the RADIUS Accounting
181 server, which will send back an acknowledgement that the packet has
182 been received. At the end of service delivery the client will
183 generate an Accounting Stop packet describing the type of service
184 that was delivered and optionally statistics such as elapsed time,
185 input and output octets, or input and output packets. It will send
186 that to the RADIUS Accounting server, which will send back an
187 acknowledgement that the packet has been received.
189 The Accounting-Request (whether for Start or Stop) is submitted to
190 the RADIUS accounting server via the network. It is recommended that
191 the client continue attempting to send the Accounting-Request packet
192 until it receives an acknowledgement, using some form of backoff. If
193 no response is returned within a length of time, the request is re-
194 sent a number of times. The client can also forward requests to an
195 alternate server or servers in the event that the primary server is
196 down or unreachable. An alternate server can be used either after a
197 number of tries to the primary server fail, or in a round-robin
198 fashion. Retry and fallback algorithms are the topic of current
199 research and are not specified in detail in this document.
201 The RADIUS accounting server MAY make requests of other servers in
202 order to satisfy the request, in which case it acts as a client.
204 If the RADIUS accounting server is unable to successfully record the
205 accounting packet it MUST NOT send an Accounting-Response
206 acknowledgment to the client.
210 See the "RADIUS" RFC [2] for information on Proxy RADIUS. Proxy
211 Accounting RADIUS works the same way, as illustrated by the following
214 1. The NAS sends an accounting-request to the forwarding server.
216 2. The forwarding server logs the accounting-request (if desired),
217 adds its Proxy-State (if desired) after any other Proxy-State
218 attributes, updates the Request Authenticator, and forwards the
219 request to the remote server.
226 Rigney Informational [Page 4]
228 RFC 2866 RADIUS Accounting June 2000
231 3. The remote server logs the accounting-request (if desired),
232 copies all Proxy-State attributes in order and unmodified from
233 the request to the response packet, and sends the accounting-
234 response to the forwarding server.
236 4. The forwarding server strips the last Proxy-State (if it added
237 one in step 2), updates the Response Authenticator and sends
238 the accounting-response to the NAS.
240 A forwarding server MUST not modify existing Proxy-State or Class
241 attributes present in the packet.
243 A forwarding server may either perform its forwarding function in a
244 pass through manner, where it sends retransmissions on as soon as it
245 gets them, or it may take responsibility for retransmissions, for
246 example in cases where the network link between forwarding and remote
247 server has very different characteristics than the link between NAS
248 and forwarding server.
250 Extreme care should be used when implementing a proxy server that
251 takes responsibility for retransmissions so that its retransmission
252 policy is robust and scalable.
256 Exactly one RADIUS Accounting packet is encapsulated in the UDP Data
257 field [4], where the UDP Destination Port field indicates 1813
260 When a reply is generated, the source and destination ports are
263 This memo documents the RADIUS Accounting protocol. The early
264 deployment of RADIUS Accounting was done using UDP port number 1646,
265 which conflicts with the "sa-msg-port" service. The officially
266 assigned port number for RADIUS Accounting is 1813.
268 A summary of the RADIUS data format is shown below. The fields are
269 transmitted from left to right.
282 Rigney Informational [Page 5]
284 RFC 2866 RADIUS Accounting June 2000
288 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
289 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
290 | Code | Identifier | Length |
291 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
296 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
298 +-+-+-+-+-+-+-+-+-+-+-+-+-
303 The Code field is one octet, and identifies the type of RADIUS
304 packet. When a packet is received with an invalid Code field, it
305 is silently discarded.
307 RADIUS Accounting Codes (decimal) are assigned as follows:
310 5 Accounting-Response
314 The Identifier field is one octet, and aids in matching requests
315 and replies. The RADIUS server can detect a duplicate request if
316 it has the same client source IP address and source UDP port and
317 Identifier within a short span of time.
321 The Length field is two octets. It indicates the length of the
322 packet including the Code, Identifier, Length, Authenticator and
323 Attribute fields. Octets outside the range of the Length field
324 MUST be treated as padding and ignored on reception. If the
325 packet is shorter than the Length field indicates, it MUST be
326 silently discarded. The minimum length is 20 and maximum length
331 The Authenticator field is sixteen (16) octets. The most
332 significant octet is transmitted first. This value is used to
333 authenticate the messages between the client and RADIUS accounting
338 Rigney Informational [Page 6]
340 RFC 2866 RADIUS Accounting June 2000
343 Request Authenticator
345 In Accounting-Request Packets, the Authenticator value is a 16
346 octet MD5 [5] checksum, called the Request Authenticator.
348 The NAS and RADIUS accounting server share a secret. The Request
349 Authenticator field in Accounting-Request packets contains a one-
350 way MD5 hash calculated over a stream of octets consisting of the
351 Code + Identifier + Length + 16 zero octets + request attributes +
352 shared secret (where + indicates concatenation). The 16 octet MD5
353 hash value is stored in the Authenticator field of the
354 Accounting-Request packet.
356 Note that the Request Authenticator of an Accounting-Request can
357 not be done the same way as the Request Authenticator of a RADIUS
358 Access-Request, because there is no User-Password attribute in an
361 Response Authenticator
363 The Authenticator field in an Accounting-Response packet is called
364 the Response Authenticator, and contains a one-way MD5 hash
365 calculated over a stream of octets consisting of the Accounting-
366 Response Code, Identifier, Length, the Request Authenticator field
367 from the Accounting-Request packet being replied to, and the
368 response attributes if any, followed by the shared secret. The
369 resulting 16 octet MD5 hash value is stored in the Authenticator
370 field of the Accounting-Response packet.
374 Attributes may have multiple instances, in such a case the order
375 of attributes of the same type SHOULD be preserved. The order of
376 attributes of different types is not required to be preserved.
380 The RADIUS packet type is determined by the Code field in the first
394 Rigney Informational [Page 7]
396 RFC 2866 RADIUS Accounting June 2000
399 4.1. Accounting-Request
403 Accounting-Request packets are sent from a client (typically a
404 Network Access Server or its proxy) to a RADIUS accounting server,
405 and convey information used to provide accounting for a service
406 provided to a user. The client transmits a RADIUS packet with the
407 Code field set to 4 (Accounting-Request).
409 Upon receipt of an Accounting-Request, the server MUST transmit an
410 Accounting-Response reply if it successfully records the
411 accounting packet, and MUST NOT transmit any reply if it fails to
412 record the accounting packet.
414 Any attribute valid in a RADIUS Access-Request or Access-Accept
415 packet is valid in a RADIUS Accounting-Request packet, except that
416 the following attributes MUST NOT be present in an Accounting-
417 Request: User-Password, CHAP-Password, Reply-Message, State.
418 Either NAS-IP-Address or NAS-Identifier MUST be present in a
419 RADIUS Accounting-Request. It SHOULD contain a NAS-Port or NAS-
420 Port-Type attribute or both unless the service does not involve a
421 port or the NAS does not distinguish among its ports.
423 If the Accounting-Request packet includes a Framed-IP-Address,
424 that attribute MUST contain the IP address of the user. If the
425 Access-Accept used the special values for Framed-IP-Address
426 telling the NAS to assign or negotiate an IP address for the user,
427 the Framed-IP-Address (if any) in the Accounting-Request MUST
428 contain the actual IP address assigned or negotiated.
430 A summary of the Accounting-Request packet format is shown below.
432 The fields are transmitted from left to right.
435 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
436 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
437 | Code | Identifier | Length |
438 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
440 | Request Authenticator |
443 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
445 +-+-+-+-+-+-+-+-+-+-+-+-+-
450 Rigney Informational [Page 8]
452 RFC 2866 RADIUS Accounting June 2000
457 4 for Accounting-Request.
461 The Identifier field MUST be changed whenever the content of the
462 Attributes field changes, and whenever a valid reply has been
463 received for a previous request. For retransmissions where the
464 contents are identical, the Identifier MUST remain unchanged.
466 Note that if Acct-Delay-Time is included in the attributes of an
467 Accounting-Request then the Acct-Delay-Time value will be updated
468 when the packet is retransmitted, changing the content of the
469 Attributes field and requiring a new Identifier and Request
472 Request Authenticator
474 The Request Authenticator of an Accounting-Request contains a 16-octet
475 MD5 hash value calculated according to the method described in
476 "Request Authenticator" above.
480 The Attributes field is variable in length, and contains a list of
483 4.2. Accounting-Response
487 Accounting-Response packets are sent by the RADIUS accounting
488 server to the client to acknowledge that the Accounting-Request
489 has been received and recorded successfully. If the Accounting-
490 Request was recorded successfully then the RADIUS accounting
491 server MUST transmit a packet with the Code field set to 5
492 (Accounting-Response). On reception of an Accounting-Response by
493 the client, the Identifier field is matched with a pending
494 Accounting-Request. The Response Authenticator field MUST contain
495 the correct response for the pending Accounting-Request. Invalid
496 packets are silently discarded.
498 A RADIUS Accounting-Response is not required to have any
501 A summary of the Accounting-Response packet format is shown below.
502 The fields are transmitted from left to right.
506 Rigney Informational [Page 9]
508 RFC 2866 RADIUS Accounting June 2000
512 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
513 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
514 | Code | Identifier | Length |
515 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
517 | Response Authenticator |
520 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
522 +-+-+-+-+-+-+-+-+-+-+-+-+-
526 5 for Accounting-Response.
530 The Identifier field is a copy of the Identifier field of the
531 Accounting-Request which caused this Accounting-Response.
533 Response Authenticator
535 The Response Authenticator of an Accounting-Response contains a
536 16-octet MD5 hash value calculated according to the method
537 described in "Response Authenticator" above.
541 The Attributes field is variable in length, and contains a list of
542 zero or more Attributes.
546 RADIUS Attributes carry the specific authentication, authorization
547 and accounting details for the request and response.
549 Some attributes MAY be included more than once. The effect of this
550 is attribute specific, and is specified in each attribute
553 The end of the list of attributes is indicated by the Length of the
556 A summary of the attribute format is shown below. The fields are
557 transmitted from left to right.
562 Rigney Informational [Page 10]
564 RFC 2866 RADIUS Accounting June 2000
568 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
569 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
570 | Type | Length | Value ...
571 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
576 The Type field is one octet. Up-to-date values of the RADIUS Type
577 field are specified in the most recent "Assigned Numbers" RFC [6].
578 Values 192-223 are reserved for experimental use, values 224-240
579 are reserved for implementation-specific use, and values 241-255
580 are reserved and should not be used. This specification concerns
581 the following values:
583 1-39 (refer to RADIUS document [2])
587 43 Acct-Output-Octets
591 47 Acct-Input-Packets
592 48 Acct-Output-Packets
593 49 Acct-Terminate-Cause
594 50 Acct-Multi-Session-Id
596 60+ (refer to RADIUS document [2])
600 The Length field is one octet, and indicates the length of this
601 attribute including the Type, Length and Value fields. If an
602 attribute is received in an Accounting-Request with an invalid
603 Length, the entire request MUST be silently discarded.
607 The Value field is zero or more octets and contains information
608 specific to the attribute. The format and length of the Value
609 field is determined by the Type and Length fields.
611 Note that none of the types in RADIUS terminate with a NUL (hex
612 00). In particular, types "text" and "string" in RADIUS do not
613 terminate with a NUL (hex 00). The Attribute has a length field
614 and does not use a terminator. Text contains UTF-8 encoded 10646
618 Rigney Informational [Page 11]
620 RFC 2866 RADIUS Accounting June 2000
623 [7] characters and String contains 8-bit binary data. Servers and
624 servers and clients MUST be able to deal with embedded nulls.
625 RADIUS implementers using C are cautioned not to use strcpy() when
628 The format of the value field is one of five data types. Note
629 that type "text" is a subset of type "string."
631 text 1-253 octets containing UTF-8 encoded 10646 [7]
632 characters. Text of length zero (0) MUST NOT be sent;
633 omit the entire attribute instead.
635 string 1-253 octets containing binary data (values 0 through 255
636 decimal, inclusive). Strings of length zero (0) MUST NOT
637 be sent; omit the entire attribute instead.
639 address 32 bit value, most significant octet first.
641 integer 32 bit unsigned value, most significant octet first.
643 time 32 bit unsigned value, most significant octet first --
644 seconds since 00:00:00 UTC, January 1, 1970. The
645 standard Attributes do not use this data type but it is
646 presented here for possible use in future attributes.
648 5.1. Acct-Status-Type
652 This attribute indicates whether this Accounting-Request marks the
653 beginning of the user service (Start) or the end (Stop).
655 It MAY be used by the client to mark the start of accounting (for
656 example, upon booting) by specifying Accounting-On and to mark the
657 end of accounting (for example, just before a scheduled reboot) by
658 specifying Accounting-Off.
660 A summary of the Acct-Status-Type attribute format is shown below.
661 The fields are transmitted from left to right.
664 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
665 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
666 | Type | Length | Value
667 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
669 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
674 Rigney Informational [Page 12]
676 RFC 2866 RADIUS Accounting June 2000
681 40 for Acct-Status-Type.
689 The Value field is four octets.
696 9-14 Reserved for Tunnel Accounting
697 15 Reserved for Failed
703 This attribute indicates how many seconds the client has been
704 trying to send this record for, and can be subtracted from the
705 time of arrival on the server to find the approximate time of the
706 event generating this Accounting-Request. (Network transit time
709 Note that changing the Acct-Delay-Time causes the Identifier to
710 change; see the discussion under Identifier above.
712 A summary of the Acct-Delay-Time attribute format is shown below.
713 The fields are transmitted from left to right.
716 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
717 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
718 | Type | Length | Value
719 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
721 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
730 Rigney Informational [Page 13]
732 RFC 2866 RADIUS Accounting June 2000
737 41 for Acct-Delay-Time.
745 The Value field is four octets.
747 5.3. Acct-Input-Octets
751 This attribute indicates how many octets have been received from
752 the port over the course of this service being provided, and can
753 only be present in Accounting-Request records where the Acct-
754 Status-Type is set to Stop.
756 A summary of the Acct-Input-Octets attribute format is shown below.
757 The fields are transmitted from left to right.
760 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
761 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
762 | Type | Length | Value
763 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
765 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
769 42 for Acct-Input-Octets.
777 The Value field is four octets.
786 Rigney Informational [Page 14]
788 RFC 2866 RADIUS Accounting June 2000
791 5.4. Acct-Output-Octets
795 This attribute indicates how many octets have been sent to the
796 port in the course of delivering this service, and can only be
797 present in Accounting-Request records where the Acct-Status-Type
800 A summary of the Acct-Output-Octets attribute format is shown below.
801 The fields are transmitted from left to right.
804 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
805 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
806 | Type | Length | Value
807 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
809 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
813 43 for Acct-Output-Octets.
821 The Value field is four octets.
827 This attribute is a unique Accounting ID to make it easy to match
828 start and stop records in a log file. The start and stop records
829 for a given session MUST have the same Acct-Session-Id. An
830 Accounting-Request packet MUST have an Acct-Session-Id. An
831 Access-Request packet MAY have an Acct-Session-Id; if it does,
832 then the NAS MUST use the same Acct-Session-Id in the Accounting-
833 Request packets for that session.
835 The Acct-Session-Id SHOULD contain UTF-8 encoded 10646 [7]
842 Rigney Informational [Page 15]
844 RFC 2866 RADIUS Accounting June 2000
847 For example, one implementation uses a string with an 8-digit
848 upper case hexadecimal number, the first two digits increment on
849 each reboot (wrapping every 256 reboots) and the next 6 digits
850 counting from 0 for the first person logging in after a reboot up
851 to 2^24-1, about 16 million. Other encodings are possible.
853 A summary of the Acct-Session-Id attribute format is shown below.
854 The fields are transmitted from left to right.
857 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
858 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
859 | Type | Length | Text ...
860 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
864 44 for Acct-Session-Id.
872 The String field SHOULD be a string of UTF-8 encoded 10646 [7]
879 This attribute MAY be included in an Accounting-Request to
880 indicate how the user was authenticated, whether by RADIUS, the
881 NAS itself, or another remote authentication protocol. Users who
882 are delivered service without being authenticated SHOULD NOT
883 generate Accounting records.
885 A summary of the Acct-Authentic attribute format is shown below. The
886 fields are transmitted from left to right.
889 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
890 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
891 | Type | Length | Value
892 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
894 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
898 Rigney Informational [Page 16]
900 RFC 2866 RADIUS Accounting June 2000
905 45 for Acct-Authentic.
913 The Value field is four octets.
919 5.7. Acct-Session-Time
923 This attribute indicates how many seconds the user has received
924 service for, and can only be present in Accounting-Request records
925 where the Acct-Status-Type is set to Stop.
927 A summary of the Acct-Session-Time attribute format is shown below.
928 The fields are transmitted from left to right.
931 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
932 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
933 | Type | Length | Value
934 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
936 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
940 46 for Acct-Session-Time.
948 The Value field is four octets.
954 Rigney Informational [Page 17]
956 RFC 2866 RADIUS Accounting June 2000
959 5.8. Acct-Input-Packets
963 This attribute indicates how many packets have been received from
964 the port over the course of this service being provided to a
965 Framed User, and can only be present in Accounting-Request records
966 where the Acct-Status-Type is set to Stop.
968 A summary of the Acct-Input-packets attribute format is shown below.
969 The fields are transmitted from left to right.
972 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
973 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
974 | Type | Length | Value
975 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
977 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
981 47 for Acct-Input-Packets.
989 The Value field is four octets.
991 5.9. Acct-Output-Packets
995 This attribute indicates how many packets have been sent to the
996 port in the course of delivering this service to a Framed User,
997 and can only be present in Accounting-Request records where the
998 Acct-Status-Type is set to Stop.
1000 A summary of the Acct-Output-Packets attribute format is shown below.
1001 The fields are transmitted from left to right.
1010 Rigney Informational [Page 18]
1012 RFC 2866 RADIUS Accounting June 2000
1016 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1017 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1018 | Type | Length | Value
1019 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1021 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1025 48 for Acct-Output-Packets.
1033 The Value field is four octets.
1035 5.10. Acct-Terminate-Cause
1039 This attribute indicates how the session was terminated, and can
1040 only be present in Accounting-Request records where the Acct-
1041 Status-Type is set to Stop.
1043 A summary of the Acct-Terminate-Cause attribute format is shown
1044 below. The fields are transmitted from left to right.
1047 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1048 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1049 | Type | Length | Value
1050 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1052 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1066 Rigney Informational [Page 19]
1068 RFC 2866 RADIUS Accounting June 2000
1073 49 for Acct-Terminate-Cause
1081 The Value field is four octets, containing an integer specifying
1082 the cause of session termination, as follows:
1098 15 Service Unavailable
1103 The termination causes are as follows:
1105 User Request User requested termination of service, for
1106 example with LCP Terminate or by logging out.
1108 Lost Carrier DCD was dropped on the port.
1110 Lost Service Service can no longer be provided; for
1111 example, user's connection to a host was
1114 Idle Timeout Idle timer expired.
1116 Session Timeout Maximum session length timer expired.
1118 Admin Reset Administrator reset the port or session.
1122 Rigney Informational [Page 20]
1124 RFC 2866 RADIUS Accounting June 2000
1127 Admin Reboot Administrator is ending service on the NAS,
1128 for example prior to rebooting the NAS.
1130 Port Error NAS detected an error on the port which
1131 required ending the session.
1133 NAS Error NAS detected some error (other than on the
1134 port) which required ending the session.
1136 NAS Request NAS ended session for a non-error reason not
1137 otherwise listed here.
1139 NAS Reboot The NAS ended the session in order to reboot
1140 non-administratively ("crash").
1142 Port Unneeded NAS ended session because resource usage fell
1143 below low-water mark (for example, if a
1144 bandwidth-on-demand algorithm decided that
1145 the port was no longer needed).
1147 Port Preempted NAS ended session in order to allocate the
1148 port to a higher priority use.
1150 Port Suspended NAS ended session to suspend a virtual
1153 Service Unavailable NAS was unable to provide requested service.
1155 Callback NAS is terminating current session in order
1156 to perform callback for a new session.
1158 User Error Input from user is in error, causing
1159 termination of session.
1161 Host Request Login Host terminated session normally.
1163 5.11. Acct-Multi-Session-Id
1167 This attribute is a unique Accounting ID to make it easy to link
1168 together multiple related sessions in a log file. Each session
1169 linked together would have a unique Acct-Session-Id but the same
1170 Acct-Multi-Session-Id. It is strongly recommended that the Acct-
1171 Multi-Session-Id contain UTF-8 encoded 10646 [7] characters.
1173 A summary of the Acct-Session-Id attribute format is shown below.
1174 The fields are transmitted from left to right.
1178 Rigney Informational [Page 21]
1180 RFC 2866 RADIUS Accounting June 2000
1184 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
1185 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1186 | Type | Length | String ...
1187 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1191 50 for Acct-Multi-Session-Id.
1199 The String field SHOULD contain UTF-8 encoded 10646 [7] characters.
1201 5.12. Acct-Link-Count
1205 This attribute gives the count of links which are known to have been
1206 in a given multilink session at the time the accounting record is
1207 generated. The NAS MAY include the Acct-Link-Count attribute in any
1208 Accounting-Request which might have multiple links.
1210 A summary of the Acct-Link-Count attribute format is show below. The
1211 fields are transmitted from left to right.
1214 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1215 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1216 | Type | Length | Value
1217 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1219 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1234 Rigney Informational [Page 22]
1236 RFC 2866 RADIUS Accounting June 2000
1241 51 for Acct-Link-Count.
1249 The Value field is four octets, and contains the number of links
1250 seen so far in this Multilink Session.
1252 It may be used to make it easier for an accounting server to know
1253 when it has all the records for a given Multilink session. When
1254 the number of Accounting-Requests received with Acct-Status-Type =
1255 Stop and the same Acct-Multi-Session-Id and unique Acct-Session-
1256 Id's equals the largest value of Acct-Link-Count seen in those
1257 Accounting-Requests, all Stop Accounting-Requests for that
1258 Multilink Session have been received.
1260 An example showing 8 Accounting-Requests should make things
1261 clearer. For clarity only the relevant attributes are shown, but
1262 additional attributes containing accounting information will also
1263 be present in the Accounting-Request.
1265 Multi-Session-Id Session-Id Status-Type Link-Count
1275 5.13. Table of Attributes
1277 The following table provides a guide to which attributes may be found
1278 in Accounting-Request packets. No attributes should be found in
1279 Accounting-Response packets except Proxy-State and possibly Vendor-
1290 Rigney Informational [Page 23]
1292 RFC 2866 RADIUS Accounting June 2000
1295 0-1 NAS-IP-Address [Note 1]
1299 0-1 Framed-IP-Address
1300 0-1 Framed-IP-Netmask
1304 0+ Framed-Compression
1312 0-1 Framed-IPX-Network
1318 0-1 Termination-Action
1319 0-1 Called-Station-Id
1320 0-1 Calling-Station-Id
1321 0-1 NAS-Identifier [Note 1]
1323 0-1 Login-LAT-Service
1326 0-1 Framed-AppleTalk-Link
1327 0-1 Framed-AppleTalk-Network
1328 0-1 Framed-AppleTalk-Zone
1331 0-1 Acct-Input-Octets
1332 0-1 Acct-Output-Octets
1335 0-1 Acct-Session-Time
1336 0-1 Acct-Input-Packets
1337 0-1 Acct-Output-Packets
1338 0-1 Acct-Terminate-Cause
1339 0+ Acct-Multi-Session-Id
1346 Rigney Informational [Page 24]
1348 RFC 2866 RADIUS Accounting June 2000
1355 [Note 1] An Accounting-Request MUST contain either a NAS-IP-Address
1356 or a NAS-Identifier (or both).
1358 The following table defines the above table entries.
1360 0 This attribute MUST NOT be present
1361 0+ Zero or more instances of this attribute MAY be present.
1362 0-1 Zero or one instance of this attribute MAY be present.
1363 1 Exactly one instance of this attribute MUST be present.
1365 6. IANA Considerations
1367 The Packet Type Codes, Attribute Types, and Attribute Values defined
1368 in this document are registered by the Internet Assigned Numbers
1369 Authority (IANA) from the RADIUS name spaces as described in the
1370 "IANA Considerations" section of RFC 2865 [2], in accordance with BCP
1373 7. Security Considerations
1375 Security issues are discussed in sections concerning the
1376 authenticator included in accounting requests and responses, using a
1377 shared secret which is never sent over the network.
1381 US-ASCII replaced by UTF-8.
1383 Added notes on Proxy.
1385 Framed-IP-Address should contain the actual IP address of the user.
1387 If Acct-Session-ID was sent in an access-request, it must be used in
1388 the accounting-request for that session.
1390 New values added to Acct-Status-Type.
1392 Added an IANA Considerations section.
1396 Text strings identified as a subset of string, to clarify use of
1402 Rigney Informational [Page 25]
1404 RFC 2866 RADIUS Accounting June 2000
1409 [1] Rigney, C., "RADIUS Accounting", RFC 2139, April 1997.
1411 [2] Rigney, C., Willens, S., Rubens, A. and W. Simpson, "Remote
1412 Authentication Dial In User Service (RADIUS)", RFC 2865, June
1415 [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement
1416 Levels", BCP 14, RFC 2119, March, 1997.
1418 [4] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August
1421 [5] Rivest, R. and S. Dusse, "The MD5 Message-Digest Algorithm", RFC
1424 [6] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, RFC 1700,
1427 [7] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC
1430 [8] Alvestrand, H. and T. Narten, "Guidelines for Writing an IANA
1431 Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
1433 10. Acknowledgements
1435 RADIUS and RADIUS Accounting were originally developed by Steve
1436 Willens of Livingston Enterprises for their PortMaster series of
1437 Network Access Servers.
1441 The RADIUS working group can be contacted via the current chair:
1444 Livingston Enterprises
1446 Pleasanton, California 94588
1448 Phone: +1 925 737 2100
1449 EMail: cdr@telemancy.com
1458 Rigney Informational [Page 26]
1460 RFC 2866 RADIUS Accounting June 2000
1463 12. Author's Address
1465 Questions about this memo can also be directed to:
1468 Livingston Enterprises
1470 Pleasanton, California 94588
1472 EMail: cdr@telemancy.com
1514 Rigney Informational [Page 27]
1516 RFC 2866 RADIUS Accounting June 2000
1519 13. Full Copyright Statement
1521 Copyright (C) The Internet Society (2000). All Rights Reserved.
1523 This document and translations of it may be copied and furnished to
1524 others, and derivative works that comment on or otherwise explain it
1525 or assist in its implementation may be prepared, copied, published
1526 and distributed, in whole or in part, without restriction of any
1527 kind, provided that the above copyright notice and this paragraph are
1528 included on all such copies and derivative works. However, this
1529 document itself may not be modified in any way, such as by removing
1530 the copyright notice or references to the Internet Society or other
1531 Internet organizations, except as needed for the purpose of
1532 developing Internet standards in which case the procedures for
1533 copyrights defined in the Internet Standards process must be
1534 followed, or as required to translate it into languages other than
1537 The limited permissions granted above are perpetual and will not be
1538 revoked by the Internet Society or its successors or assigns.
1540 This document and the information contained herein is provided on an
1541 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
1542 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
1543 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
1544 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
1545 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1549 Funding for the RFC Editor function is currently provided by the
1570 Rigney Informational [Page 28]