<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>

<!--
     ASCII to XML transformation by Invisible Worlds, Inc.
     http://invisible.net/
     Last transformation: 03-Feb-1999, 02:04:05

     Cannonical version of this document is at:
     http://info.internet.isi.edu/in-notes/rfc/files/rfc2139.txt

     Implementors should verify all content with
     cannonical version.  Failure to do so may result in
     protocol failures.
-->

<rfc number="2139"
     category="info"
     obsoletes="2059">
<front>
<title>RADIUS Accounting</title>
<author initials="C." surname="Rigney" fullname="Carl Rigney">
<organization>Livingston Enterprises</organization>
<address>
<postal>
<street>4464 Willow Road</street>
<street>Pleasanton</street>
<street>California  94588</street>
</postal>
<phone>+1 510 426 0770</phone>
<email>cdr@livingston.com</email>
</address>
</author>
<author initials="C." surname="Rigney" fullname="Carl Rigney">
<organization>Livingston Enterprises</organization>
<address>
<postal>
<street>4464 Willow Road</street>
<street>Pleasanton</street>
<street>California  94588</street>
</postal>
<email>cdr@livingston.com</email>
</address>
</author>
<date month="April" year="1997"/>
<area>Security</area>
<keyword>Radius</keyword>
<keyword>accounting</keyword>
<keyword>authentication</keyword>
<keyword>remote authentication dial in user service</keyword>
<abstract>
<t>
   This document describes a protocol for carrying accounting
   information between a Network Access Server and a shared Accounting
   Server.
</t>
</abstract>
</front>
<middle>
<!-- RFC original section: (1.) -->
<section title="Introduction">
<t>
   Managing dispersed serial line and modem pools for large numbers of
   users can create the need for significant administrative support.
   Since modem pools are by definition a link to the outside world, they
   require careful attention to security, authorization and accounting.
   This can be best achieved by managing a single &quot;database&quot; of users,
   which allows for authentication (verifying user name and password) as
   well as configuration information detailing the type of service to
   deliver to the user (for example, SLIP, PPP, telnet, rlogin).
</t>
<t>
   The RADIUS (Remote Authentication Dial In User Service) document <xref target="_XREF_4"/>
   specifies the RADIUS protocol used for Authentication and
   Authorization.  This memo extends the use of the RADIUS protocol to
   cover delivery of accounting information from the Network Access
   Server (NAS) to a RADIUS accounting server.
</t>
<t>
   Key features of RADIUS Accounting are:
<list>
<t>
      Client/Server Model
<list>
<t>
         A Network Access Server (NAS) operates as a client of the
         RADIUS accounting server.  The client is responsible for
         passing user accounting information to a designated RADIUS
         accounting server.
</t>
<t>
         The RADIUS accounting server is responsible for receiving the
         accounting request and returning a response to the client
         indicating that it has successfully received the request.
</t>
<t>
         The RADIUS accounting server can act as a proxy client to other
         kinds of accounting servers.
</t></list>
</t>
<t>
      Network Security
<list>
<t>
         Transactions between the client and RADIUS accounting server
         are authenticated through the use of a shared secret, which is
         never sent over the network.
</t></list>
</t>
<t>
      Extensible Protocol
<list>
<t>
         All transactions are comprised of variable length Attribute-
         Length-Value 3-tuples.  New attribute values can be added
         without disturbing existing implementations of the protocol.
</t></list>
</t></list>
</t>
<!-- RFC original section: (1.1.) -->
<section title="Specification of Requirements">
<t>
   In this document, several words are used to signify the requirements
   of the specification.  These words are often capitalized.
</t>
<figure><artwork>
   MUST      This word, or the adjective &quot;required&quot;, means that the
             definition is an absolute requirement of the specification.

   MUST NOT  This phrase means that the definition is an absolute
             prohibition of the specification.

   SHOULD    This word, or the adjective &quot;recommended&quot;, means that there
             may exist valid reasons in particular circumstances to
             ignore this item, but the full implications must be
             understood and carefully weighed before choosing a
             different course.

   MAY       This word, or the adjective &quot;optional&quot;, means that this
             item is one of an allowed set of alternatives.  An
             implementation which does not include this option MUST be
             prepared to interoperate with another implementation which
             does include the option.
</artwork></figure>
</section>
<!-- RFC original section: (1.2.) -->
<section title="Terminology">
<t>
      This document uses the following terms:
</t>
<figure><artwork>
   service   The NAS provides a service to the dial-in user, such as PPP
             or Telnet.
   session   Each service provided by the NAS to a dial-in user
             constitutes a session, with the beginning of the session
             defined as the point where service is first provided and
             the end of the session defined as the point where service
             is ended.  A user may have multiple sessions in parallel or
             series if the NAS supports that, with each session
             generating a separate start and stop accounting record with
             its own Acct-Session-Id.
   silently discard
      This means the implementation discards the packet without
      further processing.  The implementation SHOULD provide the
      capability of logging the error, including the contents of
      the silently discarded packet, and SHOULD record the event
      in a statistics counter.
</artwork></figure>
</section>
</section>
<!-- RFC original section: (2.) -->
<section title="Operation">
<t>
   When a client is configured to use RADIUS Accounting, at the start of
   service delivery it will generate an Accounting Start packet
   describing the type of service being delivered and the user it is
   being delivered to, and will send that to the RADIUS Accounting
   server, which will send back an acknowledgement that the packet has
   been received.  At the end of service delivery the client will
   generate an Accounting Stop packet describing the type of service
   that was delivered and optionally statistics such as elapsed time,
   input and output octets, or input and output packets.  It will send
   that to the RADIUS Accounting server, which will send back an
   acknowledgement that the packet has been received.
</t>
<t>
   The Accounting-Request (whether for Start or Stop) is submitted to
   the RADIUS accounting server via the network. It is recommended that
   the client continue attempting to send the Accounting-Request packet
   until it receives an acknowledgement, using some form of backoff.  If
   no response is returned within a length of time, the request is re-
   sent a number of times.  The client can also forward requests to an
   alternate server or servers in the event that the primary server is
   down or unreachable.  An alternate server can be used either after a
   number of tries to the primary server fail, or in a round-robin
   fashion.  Retry and fallback algorithms are the topic of current
   research and are not specified in detail in this document.
</t>
<t>
   The RADIUS accounting server MAY make requests of other servers in
   order to satisfy the request, in which case it acts as a client.
</t>
<t>
   If the RADIUS accounting server is unable to successfully record the
   accounting packet it MUST NOT send an Accounting-Response
   acknowledgment to the client.
</t>
</section>
<!-- RFC original section: (3.) -->
<section title="Packet Format">
<t>
   Exactly one RADIUS Accounting packet is encapsulated in the UDP Data
   field <xref target="_XREF_1"/>, where the UDP Destination Port field indicates 1813
   (decimal).
</t>
<t>
   When a reply is generated, the source and destination ports are
   reversed.
</t>
<t>
   This memo documents the RADIUS Accounting protocol.  There has been
   some confusion in the assignment of port numbers for this protocol.
   The early deployment of RADIUS Accounting was done using the
   erroneously chosen port number 1646, which conflicts with the &quot;sa-
   msg-port&quot; service.  The officially assigned port number for RADIUS
   Accounting is 1813.
</t>
<t>
   A summary of the RADIUS data format is shown below.  The fields are
   transmitted from left to right.
</t>
<figure><artwork>
 0                   1                   2                   3
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Code      |  Identifier   |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                         Authenticator                         |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Attributes ...
+-+-+-+-+-+-+-+-+-+-+-+-+-
</artwork></figure>
<section title="Code">
<t>
   The Code field is one octet, and identifies the type of RADIUS
   packet.  When a packet is received with an invalid Code field, it is
   silently discarded.
</t>
<t>
   RADIUS Accounting Codes (decimal) are assigned as follows:
</t>
<figure><artwork>
      4       Accounting-Request
      5       Accounting-Response
</artwork></figure>
</section>
<section title="Identifier">
<t>
   The Identifier field is one octet, and aids in matching requests and
   replies.
</t>
</section>
<section title="Length">
<t>
   The Length field is two octets.  It indicates the length of the
   packet including the Code, Identifier, Length, Authenticator and
   Attribute fields.  Octets outside the range of the Length field
   should be treated as padding and should be ignored on reception.  If
   the packet is shorter than the Length field indicates, it should be
   silently discarded.  The minimum length is 20 and maximum length is
   4096.
</t>
</section>
<section title="Authenticator">
<t>
   The Authenticator field is sixteen (16) octets.  The most significant
   octet is transmitted first.  This value is used to authenticate the
   messages between the client and RADIUS accounting server.
</t>
</section>
<section title="Request Authenticator">
<t>
   In Accounting-Request Packets, the Authenticator value is a 16 octet
   MD5 <xref target="_XREF_3"/> checksum, called the Request Authenticator.
</t>
<t>
   The NAS and RADIUS accounting server share a secret.  The Request
   Authenticator field in Accounting-Request packets contains a one- way
   MD5 hash calculated over a stream of octets consisting of the Code +
   Identifier + Length + 16 zero octets + request attributes + shared
   secret (where + indicates concatenation).  The 16 octet MD5 hash
   value is stored in the Authenticator field of the Accounting-Request
   packet.
<list>
<t>
      Note that the Request Authenticator of an Accounting-Request can
      not be done the same way as the Request Authenticator of a RADIUS
      Access-Request, because there is no User-Password attribute in an
      Accounting-Request.
</t></list>
</t>
</section>
<section title="Response Authenticator">
<t>
   The Authenticator field in an Accounting-Response packet is called
   the Response Authenticator, and contains a one-way MD5 hash
   calculated over a stream of octets consisting of the Accounting-
   Response Code, Identifier, Length, the Request Authenticator field
   from the Accounting-Request packet being replied to, and the response
   attributes if any, followed by the shared secret.  The resulting 16
   octet MD5 hash value is stored in the Authenticator field of the
   Accounting-Response packet.
</t>
</section>
<section title="Attributes">
<t>
   Attributes may have multiple instances, in such a case the order of
   attributes of the same type SHOULD be preserved.  The order of
   attributes of different types is not required to be preserved.
</t>
</section>
</section>
<!-- RFC original section: (4.) -->
<section title="Packet Types">
<t>
   The RADIUS packet type is determined by the Code field in the first
   octet of the packet.
</t>
<!-- RFC original section: (4.1.) -->
<section title="Accounting-Request">
<t>
   Description
<list>
<t>
      Accounting-Request packets are sent from a client (typically a
      Network Access Server or its proxy) to a RADIUS accounting server,
      and convey information used to provide accounting for a service
      provided to a user.  The client transmits a RADIUS packet with the
      Code field set to 4 (Accounting-Request).
</t>
<t>
      Upon receipt of an Accounting-Request, the server MUST transmit an
      Accounting-Response reply if it successfully records the
      accounting packet, and MUST NOT transmit any reply if it fails to
      record the accounting packet.
</t>
<t>
      Any attribute valid in a RADIUS Access-Request or Access-Accept
      packet is valid in a RADIUS Accounting-Request packet, except that
      the following attributes MUST NOT be present in an Accounting-
      Request: User-Password, CHAP-Password, Reply-Message, State.
      Either NAS-IP-Address or NAS-Identifier MUST be present in a
      RADIUS Accounting-Request.  It SHOULD contain a NAS-Port or NAS-
      Port-Type attribute or both unless the service does not involve a
      port or the NAS does not distinguish among its ports.
</t></list>
</t>
<t>
   A summary of the Accounting-Request packet format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                     Request Authenticator                     |
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Attributes ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-
</artwork></figure>
<t>
   Code
<list>
<t>
      4 for Accounting-Request.
</t></list>
</t>
<t>
   Identifier
<list>
<t>
      The Identifier field MUST be changed whenever the content of the
      Attributes field changes, and whenever a valid reply has been
      received for a previous request.  For retransmissions where the
      contents are identical, the Identifier MUST remain unchanged.
</t>
<t>
      Note that if Acct-Delay-Time is included in the attributes of an
      Accounting-Request then the Acct-Delay-Time value will be updated
      when the packet is retransmitted, changing the content of the
      Attributes field and requiring a new Identifier and Request
      Authenticator.
</t></list>
</t>
<t>
   Request Authenticator
<list>
<t>
      The Request Authenticator of an Accounting-Request contains a 16-
      octet MD5 hash value calculated according to the method described
      in &quot;Request Authenticator&quot; above.
</t></list>
</t>
<t>
   Attributes
<list>
<t>
      The Attributes field is variable in length, and contains a list of
      Attributes.
</t></list>
</t>
</section>
<!-- RFC original section: (4.2.) -->
<section title="Accounting-Response">
<t>
   Description
<list>
<t>
      Accounting-Response packets are sent by the RADIUS accounting
      server to the client to acknowledge that the Accounting-Request
      has been received and recorded successfully.  If the Accounting-
      Request was recorded successfully then the RADIUS accounting
      server MUST transmit a packet with the Code field set to 5
      (Accounting-Response).  On reception of an Accounting-Response by
      the client, the Identifier field is matched with a pending
      Accounting-Request.  Invalid packets are silently discarded.
</t>
<t>
      A RADIUS Accounting-Response is not required to have any
      attributes in it.
</t></list>
</t>
<t>
   A summary of the Accounting-Response packet format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |  Identifier   |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                     Response Authenticator                    |
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Attributes ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-
</artwork></figure>
<t>
   Code
<list>
<t>
      5 for Accounting-Response.
</t></list>
</t>
<t>
   Identifier
<list>
<t>
      The Identifier field is a copy of the Identifier field of the
      Accounting-Request which caused this Accounting-Response.
</t></list>
</t>
<t>
   Response Authenticator
<list>
<t>
      The Response Authenticator of an Accounting-Response contains a
      16-octet MD5 hash value calculated according to the method
      described in &quot;Response Authenticator&quot; above.
</t></list>
</t>
<t>
   Attributes
<list>
<t>
      The Attributes field is variable in length, and contains a list of
      zero or more Attributes.
</t></list>
</t>
</section>
</section>
<!-- RFC original section: (5.) -->
<section title="Attributes">
<t>
   RADIUS Attributes carry the specific authentication, authorization
   and accounting details for the request and response.
</t>
<t>
   Some attributes MAY be included more than once.  The effect of this
   is attribute specific, and is specified in each attribute
   description.
</t>
<t>
   The end of the list of attributes is indicated by the Length of the
   RADIUS packet.
</t>
<t>
   A summary of the attribute format is shown below.  The fields are
   transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |  Value ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      The Type field is one octet.  Up-to-date values of the RADIUS Type
      field are specified in the most recent &quot;Assigned Numbers&quot; RFC <xref target="_XREF_2"/>.
      Values 192-223 are reserved for experimental use, values 224-240
      are reserved for implementation-specific use, and values 241-255
      are reserved and should not be used.  This specification concerns
      the following values:
</t></list>
</t>
<figure><artwork>
           1-39   (refer to RADIUS document [4])
          40      Acct-Status-Type
          41      Acct-Delay-Time
          42      Acct-Input-Octets
          43      Acct-Output-Octets
          44      Acct-Session-Id
          45      Acct-Authentic
          46      Acct-Session-Time
          47      Acct-Input-Packets
          48      Acct-Output-Packets
          49      Acct-Terminate-Cause
          50      Acct-Multi-Session-Id
          51      Acct-Link-Count
          60+     (refer to RADIUS document [4])
</artwork></figure>
<t>
   Length
<list>
<t>
      The Length field is one octet, and indicates the length of this
      attribute including the Type, Length and Value fields.  If an
      attribute is received in an Accounting-Request with an invalid
      Length, the entire request should be silently discarded.
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is zero or more octets and contains information
      specific to the attribute.  The format and length of the Value
      field is determined by the Type and Length fields.
</t>
<t>
      The format of the value field is one of four data types.
</t></list>
</t>
<figure><artwork>
      string    0-253 octets

      address   32 bit value, most significant octet first.

      integer   32 bit value, most significant octet first.

      time      32 bit value, most significant octet first -- seconds
                since 00:00:00 GMT, January 1, 1970.  The standard
                Attributes do not use this data type but it is presented
                here for possible use within Vendor-Specific attributes.
</artwork></figure>
<!-- RFC original section: (5.1.) -->
<section title="Acct-Status-Type">
<t>
   Description
<list>
<t>
      This attribute indicates whether this Accounting-Request marks the
      beginning of the user service (Start) or the end (Stop).
</t>
<t>
      It MAY be used by the client to mark the start of accounting (for
      example, upon booting) by specifying Accounting-On and to mark the
      end of accounting (for example, just before a scheduled reboot) by
      specifying Accounting-Off.
</t></list>
</t>
<t>
   A summary of the Acct-Status-Type attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      40 for Acct-Status-Type.
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets.
</t></list>
</t>
<figure><artwork>
       1      Start
       2      Stop
       7      Accounting-On
       8      Accounting-Off
</artwork></figure>
</section>
<!-- RFC original section: (5.2.) -->
<section title="Acct-Delay-Time">
<t>
   Description
<list>
<t>
      This attribute indicates how many seconds the client has been
      trying to send this record for, and can be subtracted from the
      time of arrival on the server to find the approximate time of the
      event generating this Accounting-Request.  (Network transit time
      is ignored.)
</t>
<t>
      Note that changing the Acct-Delay-Time causes the Identifier to
      change; see the discussion under Identifier above.
</t></list>
</t>
<t>
   A summary of the Acct-Delay-Time attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
          0                   1                   2                   3
          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
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         |     Type      |    Length     |             Value
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                    Value (cont)         |
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      41 for Acct-Delay-Time.
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets.
</t></list>
</t>
</section>
<!-- RFC original section: (5.3.) -->
<section title="Acct-Input-Octets">
<t>
   Description
<list>
<t>
      This attribute indicates how many octets have been received from
      the port over the course of this service being provided, and can
      only be present in Accounting-Request records where the Acct-
      Status-Type is set to Stop.
</t></list>
</t>
<t>
   A summary of the Acct-Input-Octets attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      42 for Acct-Input-Octets.
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets.
</t></list>
</t>
</section>
<!-- RFC original section: (5.4.) -->
<section title="Acct-Output-Octets">
<t>
   Description
<list>
<t>
      This attribute indicates how many octets have been sent to the
      port in the course of delivering this service, and can only be
      present in Accounting-Request records where the Acct-Status-Type
      is set to Stop.
</t></list>
</t>
<t>
   A summary of the Acct-Output-Octets attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      43 for Acct-Output-Octets.
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets.
</t></list>
</t>
</section>
<!-- RFC original section: (5.5.) -->
<section title="Acct-Session-Id">
<t>
   Description
<list>
<t>
      This attribute is a unique Accounting ID to make it easy to match
      start and stop records in a log file.  The start and stop records
      for a given session MUST have the same Acct-Session-Id.  It is
      strongly recommended that the Acct-Session-Id be a printable ASCII
      string.
</t>
<t>
      For example, one implementation uses a string with an 8-digit
      upper case hexadecimal number, the first two digits increment on
      each reboot (wrapping every 256 reboots) and the next 6 digits
      counting from 0 for the first person logging in after a reboot up
      to 2^24-1, about 16 million.  Other encodings are possible.
</t></list>
</t>
<t>
   A summary of the Acct-Session-Id attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      44 for Acct-Session-Id.
</t></list>
</t>
<t>
   Length
<list>
<t>
      &gt;= 3
</t></list>
</t>
<t>
   String
<list>
<t>
      The String field SHOULD be a string of printable ASCII characters.
</t></list>
</t>
</section>
<!-- RFC original section: (5.6.) -->
<section title="Acct-Authentic">
<t>
   Description
<list>
<t>
      This attribute MAY be included in an Accounting-Request to
      indicate how the user was authenticated, whether by RADIUS, the
      NAS itself, or another remote authentication protocol.  Users who
      are delivered service without being authenticated SHOULD NOT
      generate Accounting records.
</t></list>
</t>
<t>
   A summary of the Acct-Authentic attribute format is shown below.  The
   fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      45 for Acct-Authentic.
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets.
</t></list>
</t>
<figure><artwork>
       1      RADIUS
       2      Local
       3      Remote
</artwork></figure>
</section>
<!-- RFC original section: (5.7.) -->
<section title="Acct-Session-Time">
<t>
   Description
<list>
<t>
      This attribute indicates how many seconds the user has received
      service for, and can only be present in Accounting-Request records
      where the Acct-Status-Type is set to Stop.
</t></list>
</t>
<t>
   A summary of the Acct-Session-Time attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      46 for Acct-Session-Time.
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets.
</t></list>
</t>
</section>
<!-- RFC original section: (5.8.) -->
<section title="Acct-Input-Packets">
<t>
   Description
<list>
<t>
      This attribute indicates how many packets have been received from
      the port over the course of this service being provided to a
      Framed User, and can only be present in Accounting-Request records
      where the Acct-Status-Type is set to Stop.
</t></list>
</t>
<t>
   A summary of the Acct-Input-packets attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      47 for Acct-Input-Packets.
</t></list>
</t>
<t>
   Length
<list>
<t>
       6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets.
</t></list>
</t>
</section>
<!-- RFC original section: (5.9.) -->
<section title="Acct-Output-Packets">
<t>
   Description
<list>
<t>
      This attribute indicates how many packets have been sent to the
      port in the course of delivering this service to a Framed User,
      and can only be present in Accounting-Request records where the
      Acct-Status-Type is set to Stop.
</t></list>
</t>
<t>
   A summary of the Acct-Output-Packets attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      48 for Acct-Output-Packets.
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets.
</t></list>
</t>
</section>
<!-- RFC original section: (5.10.) -->
<section title="Acct-Terminate-Cause">
<t>
   Description
<list>
<t>
      This attribute indicates how the session was terminated, and can
      only be present in Accounting-Request records where the Acct-
      Status-Type is set to Stop.
</t></list>
</t>
<t>
   A summary of the Acct-Terminate-Cause attribute format is shown
   below.  The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      49 for Acct-Terminate-Cause
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets, containing an integer specifying
      the cause of session termination, as follows:
</t></list>
</t>
<figure><artwork>
      1       User Request
      2       Lost Carrier
      3       Lost Service
      4       Idle Timeout
      5       Session Timeout
      6       Admin Reset
      7       Admin Reboot
      8       Port Error
      9       NAS Error
      10      NAS Request
      11      NAS Reboot
      12      Port Unneeded
      13      Port Preempted
      14      Port Suspended
      15      Service Unavailable
      16      Callback
      17      User Error
      18      Host Request
</artwork></figure>
<t>
      The termination causes are as follows:
</t>
<figure><artwork>
      User Request         User requested termination of service, for
                           example with LCP Terminate or by logging out.

      Lost Carrier         DCD was dropped on the port.

      Lost Service         Service can no longer be provided; for
                           example, user&apos;s connection to a host was
                           interrupted.

      Idle Timeout         Idle timer expired.

      Session Timeout      Maximum session length timer expired.

      Admin Reset          Administrator reset the port or session.

      Admin Reboot         Administrator is ending service on the NAS,
                           for example prior to rebooting the NAS.

      Port Error           NAS detected an error on the port which
                           required ending the session.
      NAS Error            NAS detected some error (other than on the
                           port) which required ending the session.

      NAS Request          NAS ended session for a non-error reason not
                           otherwise listed here.

      NAS Reboot           The NAS ended the session in order to reboot
                           non-administratively (&quot;crash&quot;).

      Port Unneeded        NAS ended session because resource usage fell
                           below low-water mark (for example, if a
                           bandwidth-on-demand algorithm decided that
                           the port was no longer needed).

      Port Preempted       NAS ended session in order to allocate the
                           port to a higher priority use.

      Port Suspended       NAS ended session to suspend a virtual
                           session.

      Service Unavailable  NAS was unable to provide requested service.

      Callback             NAS is terminating current session in order
                           to perform callback for a new session.

      User Error           Input from user is in error, causing
                           termination of session.

      Host Request         Login Host terminated session normally.
</artwork></figure>
</section>
<!-- RFC original section: (5.11.) -->
<section title="Acct-Multi-Session-Id">
<t>
   Description
<list>
<t>
      This attribute is a unique Accounting ID to make it easy to link
      together multiple related sessions in a log file.  Each session
      linked together would have a unique Acct-Session-Id but the same
      Acct-Multi-Session-Id.  It is strongly recommended that the Acct-
      Multi-Session-Id be a printable ASCII string.
</t></list>
</t>
<t>
   A summary of the Acct-Session-Id attribute format is shown below.
   The fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |  String ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      50 for Acct-Multi-Session-Id.
</t></list>
</t>
<t>
   Length
<list>
<t>
      &gt;= 3
</t></list>
</t>
<t>
   String
<list>
<t>
      The String field SHOULD be a string of printable ASCII characters.
</t></list>
</t>
</section>
<!-- RFC original section: (5.12.) -->
<section title="Acct-Link-Count">
<t>
   Description
<list>
<t>
      This attribute gives the count of links which are known to have
      been in a given multilink session at the time the accounting
      record is generated.  The NAS MAY include the Acct-Link-Count
      attribute in any Accounting-Request which might have multiple
      links.
</t></list>
</t>
<t>
   A summary of the Acct-Link-Count attribute format is show below.  The
   fields are transmitted from left to right.
</t>
<figure><artwork>
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Value
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              Value (cont)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>
<t>
   Type
<list>
<t>
      51 for Acct-Link-Count.
</t></list>
</t>
<t>
   Length
<list>
<t>
      6
</t></list>
</t>
<t>
   Value
<list>
<t>
      The Value field is four octets, and contains the number of links
      seen so far in this Multilink Session.
</t>
<t>
      It may be used to make it easier for an accounting server to know
      when it has all the records for a given Multilink session.  When
      the number of Accounting-Requests received with Acct-Status-Type =
      Stop and the same Acct-Multi-Session-Id and unique Acct-Session-
      Id&apos;s equals the largest value of Acct-Link-Count seen in those
      Accounting-Requests, all Stop Accounting-Requests for that
      Multilink Session have been received.
</t>
<t>
      An example showing 8 Accounting-Requests should make things
      clearer.  For clarity only the relevant attributes are shown, but
      additional attributes containing accounting information will also
      be present in the Accounting-Request.
</t></list>
</t>
<figure><artwork>
      Multi-Session-Id   Session-Id   Status-Type   Link-Count
      &quot;10&quot;               &quot;10&quot;         Start         1
      &quot;10&quot;               &quot;11&quot;         Start         2
      &quot;10&quot;               &quot;11&quot;         Stop          2
      &quot;10&quot;               &quot;12&quot;         Start         3
      &quot;10&quot;               &quot;13&quot;         Start         4
      &quot;10&quot;               &quot;12&quot;         Stop          4
      &quot;10&quot;               &quot;13&quot;         Stop          4
      &quot;10&quot;               &quot;10&quot;         Stop          4
</artwork></figure>
</section>
<!-- RFC original section: (5.13.) -->
<section title="Table of Attributes">
<t>
   The following table provides a guide to which attributes may be found
   in Accounting-Request packets.  No attributes should be found in
   Accounting-Response packets except Proxy-State and possibly Vendor-
   Specific.
</t>
<figure><artwork>
                      #     Attribute
                      0-1   User-Name
                      0     User-Password
                      0     CHAP-Password
                      0-1   NAS-IP-Address [5]
                      0-1   NAS-Port
                      0-1   Service-Type
                      0-1   Framed-Protocol
                      0-1   Framed-IP-Address
                      0-1   Framed-IP-Netmask
                      0-1   Framed-Routing
                      0+    Filter-Id
                      0-1   Framed-MTU
                      0+    Framed-Compression
                      0+    Login-IP-Host
                      0-1   Login-Service
                      0-1   Login-TCP-Port
                      0     Reply-Message
                      0-1   Callback-Number
                      0-1   Callback-Id
                      0+    Framed-Route
                      0-1   Framed-IPX-Network
                      0     State
                      0+    Class
                      0+    Vendor-Specific
                      0-1   Session-Timeout
                      0-1   Idle-Timeout
                      0-1   Termination-Action
                      0-1   Called-Station-Id
                      0-1   Calling-Station-Id
                      0-1   NAS-Identifier [4]
                      0+    Proxy-State
                      0-1   Login-LAT-Service
                      0-1   Login-LAT-Node
                      0-1   Login-LAT-Group
                      0-1   Framed-AppleTalk-Link
                      0-1   Framed-AppleTalk-Network
                      0-1   Framed-AppleTalk-Zone
                      1     Acct-Status-Type
                      0-1   Acct-Delay-Time
                      0-1   Acct-Input-Octets
                      0-1   Acct-Output-Octets
                      1     Acct-Session-Id
                      0-1   Acct-Authentic
                      0-1   Acct-Session-Time
                      0-1   Acct-Input-Packets
                      0-1   Acct-Output-Packets
                      0-1   Acct-Terminate-Cause
                      0+    Acct-Multi-Session-Id
                      0+    Acct-Link-Count
                      0     CHAP-Challenge
                      0-1   NAS-Port-Type
                      0-1   Port-Limit
                      0-1   Login-LAT-Port
</artwork></figure>
<t>
   [5] An Accounting-Request MUST contain either a NAS-IP-Address or a
   NAS-Identifier, and it is permitted (but not recommended) for it to
   contain both.
</t>
<t>
   The following table defines the above table entries.
</t>
<figure><artwork>
      0     This attribute MUST NOT be present
      0+    Zero or more instances of this attribute MAY be present.
      0-1   Zero or one instance of this attribute MAY be present.
      1     Exactly one instance of this attribute MUST be present.
</artwork></figure>
</section>
</section>
<section title="Security Considerations">
<t>
   Security issues are briefly discussed in sections concerning the
   authenticator included in accounting requests and responses, using a
   shared secret which is never sent over the network.
</t>
</section>
<section title="Acknowledgments">
<t>
   RADIUS and RADIUS Accounting were originally developed by Livingston
   Enterprises for their PortMaster series of Network Access Servers.
</t>
</section>
</middle>
<back>
<!-- BEGIN INCLUDE REFERENCES ** DO NOT REMOVE -->
<references>
<reference anchor="_XREF_1">
<front>
<title abbrev="User Datagram Protocol">User Datagram Protocol, &quot;, USC/Information Sciences Institute</title>
<author initials="J." surname="Postel" fullname="J. Postel">
<organization/>
</author>
<date month="August" year="1980"/>
</front>
<seriesInfo>STD 6</seriesInfo>
<seriesInfo>RFC 768</seriesInfo>
</reference>
<reference anchor="_XREF_2">
<front>
<title abbrev="and Postel">and Postel, J., &quot;Assigned Numbers&quot;, USC/Information Sciences Institute</title>
<author initials="J." surname="Reynolds" fullname="J. Reynolds">
<organization/>
</author>
<date month="October" year="1994"/>
</front>
<seriesInfo>STD 2</seriesInfo>
<seriesInfo>RFC 1700</seriesInfo>
</reference>
<reference anchor="_XREF_3">
<front>
<title abbrev="and Dusse">and Dusse, S., &quot;The MD5 Message-Digest Algorithm&quot;, MIT Laboratory for Computer Science, RSA Data Security Inc</title>
<author initials="R." surname="Rivest" fullname="R. Rivest">
<organization/>
</author>
<date month="April" year="1992"/>
</front>
<seriesInfo>RFC 1321</seriesInfo>
</reference>
<reference anchor="_XREF_4">
<front>
<title abbrev="and Willens">and Willens, S., &quot;Remote Authentication Dial In User Service (RADIUS)&quot;</title>
<author initials="C." surname="Rigney" fullname="C. Rigney">
<organization/>
</author>
<author initials="A." surname="Rubens" fullname="A. Rubens">
<organization/>
</author>
<author initials="W." surname="Simpson" fullname="W. Simpson">
<organization/>
</author>
<date month="April" year="1997"/>
</front>
<seriesInfo>RFC 2138</seriesInfo>
</reference>
</references>
<!-- END INCLUDE REFERENCES ** DO NOT REMOVE -->
</back>
</rfc>
