rfc2059.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 1,404 行 · 第 1/3 页

TXT
1,404 行
字号
   +-+-+-+-+-+-+-+-+-+-+-+-+-


   Code

      5 for Accounting-Response.

   Identifier

      The Identifier field is a copy of the Identifier field of the
      Accounting-Request which caused this Accounting-Response.

   Response Authenticator

      The Response Authenticator of an Accounting-Response contains a
      16-octet MD5 hash value calculated according to the method
      described in "Response Authenticator" above.

   Attributes

      The Attributes field is variable in length, and contains a list of
      zero or more Attributes.

5.  Attributes

   RADIUS Attributes carry the specific authentication, authorization
   and accounting details for the request and response.

   Some attributes MAY be included more than once.  The effect of this
   is attribute specific, and is specified in each attribute
   description.

   The end of the list of attributes is indicated by the Length of the
   RADIUS packet.



Rigney                       Informational                      [Page 9]

RFC 2059                   RADIUS Accounting                January 1997


   A summary of the attribute format is shown below.  The fields are
   transmitted from left to right.

    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 ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type

      The Type field is one octet.  Up-to-date values of the RADIUS Type
      field are specified in the most recent "Assigned Numbers" RFC [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:

           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])

   Length

      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.

   Value

      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.

      The format of the value field is one of four data types.



Rigney                       Informational                     [Page 10]

RFC 2059                   RADIUS Accounting                January 1997


      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.

5.1.  Acct-Status-Type

   Description

      This attribute indicates whether this Accounting-Request marks the
      beginning of the user service (Start) or the end (Stop).

      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.

   A summary of the Acct-Status-Type attribute format is shown below.
   The fields are transmitted from left to right.

    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)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type

      40 for Acct-Status-Type.

   Length

      6









Rigney                       Informational                     [Page 11]

RFC 2059                   RADIUS Accounting                January 1997


   Value

      The Value field is four octets.

       1      Start
       2      Stop
       7      Accounting-On
       8      Accounting-Off


5.2.  Acct-Delay-Time

   Description

      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.)

      Note that changing the Acct-Delay-Time causes the Identifier to
      change; see the discussion under Identifier above.

   A summary of the Acct-Delay-Time attribute format is shown below.
   The fields are transmitted from left to right.

    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)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type

      41 for Acct-Delay-Time.

   Length

      6

   Value

      The Value field is four octets.





Rigney                       Informational                     [Page 12]

RFC 2059                   RADIUS Accounting                January 1997


5.3.  Acct-Input-Octets

   Description

      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.

   A summary of the Acct-Input-Octets attribute format is shown below.
   The fields are transmitted from left to right.

    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)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type

      42 for Acct-Input-Octets.

   Length

      6

   Value

      The Value field is four octets.

5.4.  Acct-Output-Octets

   Description

      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.










Rigney                       Informational                     [Page 13]

RFC 2059                   RADIUS Accounting                January 1997


   A summary of the Acct-Output-Octets attribute format is shown below.
   The fields are transmitted from left to right.

    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)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type

      43 for Acct-Output-Octets.

   Length

      6

   Value

      The Value field is four octets.

5.5.  Acct-Session-Id

   Description

      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.

      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.












Rigney                       Informational                     [Page 14]

RFC 2059                   RADIUS Accounting                January 1997


   A summary of the Acct-Session-Id attribute format is shown below.
   The fields are transmitted from left to right.

    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 ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type

      44 for Acct-Session-Id.

   Length

      >= 3

   String

      The String field SHOULD be a string of printable ASCII characters.

5.6.  Acct-Authentic

   Description

      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.

   A summary of the Acct-Authentic attribute format is shown below.  The
   fields are transmitted from left to right.

    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)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type

      45 for Acct-Authentic.




Rigney                       Informational                     [Page 15]

RFC 2059                   RADIUS Accounting                January 1997


   Length

      6

   Value

      The Value field is four octets.

       1      RADIUS
       2      Local
       3      Remote

5.7.  Acct-Session-Time

   Description

      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.

   A summary of the Acct-Session-Time attribute format is shown below.
   The fields are transmitted from left to right.

    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)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Type

      46 for Acct-Session-Time.

   Length

      6

   Value

      The Value field is four octets.









Rigney                       Informational                     [Page 16]

RFC 2059                   RADIUS Accounting                January 1997


5.8.  Acct-Input-Packets

   Description

      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.

   A summary of the Acct-Input-packets attribute format is shown below.
   The fields are transmitted from left to right.

    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)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type

      47 for Acct-Input-Packets.

   Length

      6

   Value

      The Value field is four octets.

5.9.  Acct-Output-Packets

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?