idnits 2.17.1 draft-calhoun-diameter-11.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories -- however, there's a paragraph with a matching beginning. Boilerplate error? == The page length should not exceed 58 lines per page, but there was 41 longer pages, the longest (page 2) being 60 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 42 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 28 instances of too long lines in the document, the longest one being 9 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 612 has weird spacing: '...invalid clea...' == Line 622 has weird spacing: '...eceived clea...' == Line 627 has weird spacing: '...eceived clea...' == Line 644 has weird spacing: '...eceived clea...' == Line 1867 has weird spacing: '... copied and ...' == (9 more instances...) == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: A vendor ID value of zero (0) corresponds to the IETF adopted AVP values, as managed by the IANA. Since the absence of the vendor ID field implies that the AVP in question is not vendor specific, implementations SHOULD not use the zero (0) vendor ID. -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: '3' is defined on line 1748, but no explicit reference was found in the text == Unused Reference: '4' is defined on line 1749, but no explicit reference was found in the text == Unused Reference: '5' is defined on line 1751, but no explicit reference was found in the text == Unused Reference: '19' is defined on line 1786, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2138 (ref. '1') (Obsoleted by RFC 2865) ** Obsolete normative reference: RFC 1700 (ref. '2') (Obsoleted by RFC 3232) ** Downref: Normative reference to an Informational RFC: RFC 1321 (ref. '4') -- Possible downref: Non-RFC (?) normative reference: ref. '5' ** Downref: Normative reference to an Informational RFC: RFC 2104 (ref. '6') == Outdated reference: A later version (-06) exists of draft-calhoun-diameter-nasreq-00 -- Possible downref: Normative reference to a draft: ref. '7' ** Obsolete normative reference: RFC 2486 (ref. '8') (Obsoleted by RFC 4282) == Outdated reference: A later version (-09) exists of draft-calhoun-diameter-framework-05 -- Possible downref: Normative reference to a draft: ref. '9' == Outdated reference: A later version (-12) exists of draft-calhoun-diameter-mobileip-04 -- Possible downref: Normative reference to a draft: ref. '10' -- No information found for draft-calhoun-diameter-strong-security - is the name correct? -- Possible downref: Normative reference to a draft: ref. '11' ** Obsolete normative reference: RFC 2434 (ref. '12') (Obsoleted by RFC 5226) ** Obsolete normative reference: RFC 2560 (ref. '14') (Obsoleted by RFC 6960) == Outdated reference: A later version (-09) exists of draft-calhoun-diameter-accounting-02 -- Possible downref: Normative reference to a draft: ref. '15' ** Obsolete normative reference: RFC 2373 (ref. '16') (Obsoleted by RFC 3513) ** Obsolete normative reference: RFC 2030 (ref. '18') (Obsoleted by RFC 4330) ** Obsolete normative reference: RFC 2459 (ref. '19') (Obsoleted by RFC 3280) ** Downref: Normative reference to an Informational RFC: RFC 2477 (ref. '20') == Outdated reference: A later version (-06) exists of draft-ietf-nasreq-criteria-03 ** Downref: Normative reference to an Informational draft: draft-ietf-nasreq-criteria (ref. '21') -- No information found for draft-hiller-cdma2000-AAA - is the name correct? -- Possible downref: Normative reference to a draft: ref. '22' == Outdated reference: A later version (-04) exists of draft-ietf-mobileip-aaa-reqs-01 ** Downref: Normative reference to an Informational draft: draft-ietf-mobileip-aaa-reqs (ref. '23') ** Obsolete normative reference: RFC 2279 (ref. '24') (Obsoleted by RFC 3629) == Outdated reference: A later version (-05) exists of draft-calhoun-diameter-impl-guide-00 -- Possible downref: Normative reference to a draft: ref. '25' Summary: 20 errors (**), 0 flaws (~~), 22 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 INTERNET DRAFT Pat R. Calhoun 2 Category: Standards Track Sun Microsystems, Inc. 3 Title: draft-calhoun-diameter-11.txt Allan C. Rubens 4 Date: December 1999 Tut Systems, Inc. 5 Haseeb Akhtar 6 Nortel Networks 7 Erik Guttman 8 Sun Microsystems, Inc. 10 DIAMETER Base Protocol 12 Status of this Memo 14 This document is an individual contribution for consideration by the 15 AAA Working Group of the Internet Engineering Task Force. Comments 16 should be submitted to the diameter@ipass.com mailing list. 18 Distribution of this memo is unlimited. 20 This document is an Internet-Draft and is in full conformance with 21 all provisions of Section 10 of RFC2026. Internet-Drafts are working 22 documents of the Internet Engineering Task Force (IETF), its areas, 23 and its working groups. Note that other groups may also distribute 24 working documents as Internet-Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at: 33 http://www.ietf.org/ietf/1id-abstracts.txt 35 The list of Internet-Draft Shadow Directories can be accessed at: 37 http://www.ietf.org/shadow.html. 39 Copyright (C) The Internet Society 1999. All Rights Reserved. 41 Abstract 43 The DIAMETER base protocol is intended to provide a AAA framework for 44 Mobile-IP, NASREQ and ROAMOPS. This draft specifies the message 45 format, transport, error reporting and security services to be used 46 by all DIAMETER extensions and MUST be supported by all DIAMETER 47 implementations. 49 Table of Contents 51 1.0 Introduction 52 1.1 Requirements language 53 1.2 Terminology 54 2.0 Protocol Overview 55 2.1 Header Format 56 2.1.1 ZLB Message Format 57 2.2 AVP Format 58 2.2.1 AVP Header 59 2.2.2 Optional Header Elements 60 2.2.3 AVP Value Formats 61 2.2.4 DIAMETER Base Protocol AVPs 62 2.3 Mandatory AVPs 63 2.3.1 Command-Code AVP 64 2.3.2 Host-IP-Address AVP 65 2.3.3 Host-Name AVP 66 2.4 The art of AVP Tagging 67 2.5 State Machine 68 2.6 Device-Reboot-Ind (DRI) Command 69 2.6.1 Vendor-Name AVP 70 2.6.2 Firmware-Revision AVP 71 2.6.3 Reboot-Type AVP 72 2.6.4 Reboot-Time AVP 73 2.6.5 Extension-Id AVP 74 2.7 Device-Watchdog-Ind (DWI) Command 75 3.0 "User" Sessions 76 3.1 Session-Id AVP 77 3.2 Session-Timeout AVP 78 3.3 User-Name AVP 79 4.0 Reliable Transport 80 4.1 Flow Control 81 4.1.1 Receive-Window AVP 82 4.2 Peer failure recovery 83 5.0 Error Reporting 84 5.1 Message-Reject-Ind (MRI) Command 85 5.1.1 Failed-AVP AVP 86 5.2 Result-Code AVP 87 6.0 DIAMETER Message Routing 88 6.1 Message Proxying 89 6.1.1 Proxy-State AVP 90 6.1.2 Destination-NAI AVP 92 6.2 Message Redirection 93 6.2.1 Redirected-Host AVP 94 7.0 DIAMETER Message Security 95 7.1 Hop-by-Hop Security 96 7.1.1 Integrity-Check-Value AVP 97 7.1.2 Encrypted-Payload AVP 98 7.2 Nonce AVP 99 7.3 Timestamp AVP 100 8.0 IANA Considerations 101 8.1 AVP Attributes 102 8.2 Command Code AVP Values 103 8.3 Extension Identifier Values 104 8.4 Result-Code AVP Values 105 8.5 Integrity-Check-Value AVP Transform Values 106 8.6 Reboot-Type AVP Values 107 8.7 AVP Header Bits 108 9.0 Open Issues 109 10.0 DIAMETER protocol related configurable parameters 110 11.0 Security Considerations 111 12.0 References 112 13.0 Acknowledgements 113 14.0 Author's Addresses 114 15.0 Full Copyright Statement 116 1.0 Introduction 118 The DIAMETER protocol allows peers to exchange a variety of messages. 119 The base protocol provides the following facilities: 121 - Delivery of AVPs (attribute value pairs) 122 - Capabilities negotiation, as required in [20] 123 - Error notification 124 - Sequenced in-order reliable delivery of UDP datagram messages 125 - Support for congestion control (receiver window), as required in 126 [21] 127 - Timely detection of failed or unresponsive peers, as required in 128 [21, 22, 23] 129 - Extensibility, through addition of new commands and AVPs, as 130 required in [21] 132 All data delivered by the protocol is in the form of an AVP. Some of 133 these AVP values are used by the DIAMETER protocol itself, while 134 others deliver data associated with particular applications which 135 employ DIAMETER. AVPs may be added arbitrarily to DIAMETER messages, 136 so long as the required AVPs are included and AVPs which are 137 explicitly excluded are not included. AVPs are used by base DIAMETER 138 protocol to support the following required features: 140 - If application-level security is required, all messages MUST 141 include an Integrity Check Vector (ICV). If the ICV is present, 142 the message MUST also carry a timestamp and a nonce to aid in 143 providing replay protection. 144 - To carry user authentication information, for the purposes of 145 enabling the DIAMETER server to authenticate the user. 146 - To allow authorization information to be exchanged for a 147 particular user's session between a DIAMETER client and server. 148 - To exchange resource usage information, which MAY be used for 149 accounting purposes, capacity planning, etc. 151 The DIAMETER base protocol provides the minimum requirements needed 152 for an AAA transport protocol, as required by NASREQ [21], Mobile IP 153 [22, 23], and ROAMOPS [20]. The base protocol is not intended to be 154 used by itself, and must be used with an application-specific 155 extension, such as Mobile IP. The DIAMETER protocol was heavily 156 inspired and builds upon the tradition of the RADIUS [1] protocol. 158 Any node can initiate a request. In that sense, DIAMETER is a peer to 159 peer protocol. In this document, a DIAMETER client is the device that 160 normally initiates a request for authentication and/or authorization 161 of a user. A DIAMETER server is the device that performs the actual 162 authentication and/or authorization of the user based on some 163 profile. A server MAY issue an unsolicited message to a client, but 164 this is typically not a request for authentication and/or 165 authorization, but rather for something else, such as an accounting 166 update. 168 1.1 Requirements language 170 In this document, the key words "MAY", "MUST, "MUST NOT", "optional", 171 "recommended", "SHOULD", and "SHOULD NOT", are to be interpreted as 172 described in [13]. 174 1.2 Terminology 176 Refer to [9] for terminology used in this document. 178 2.0 Protocol Overview 180 The base DIAMETER protocol is never used on its own. It is always 181 extended for a particular application. The base DIAMETER protocol 182 concerns itself with capabilities negotiation, and how messages are 183 sent, resent and how peers may eventually be abandoned. The base 184 protocol also defines certain rules which apply to all exchanges of 185 messages between DIAMETER peers. It is important to note that the 186 base protocol provides an optional application-level security AVPs 187 (Integrity-Check-Value) which MAY be used in absence of an underlying 188 security protocol (e.g. IP Security). 190 Communication between DIAMETER peers begins with one peer sending a 191 message to another DIAMETER peer. The set of AVPs included in the 192 message is determined by a particular application of or extension to 193 DIAMETER. (We will refer to this as the DIAMETER extension). One 194 AVP which is included in the initial communication is the Session-Id. 196 The communicating party may accept or reject the request which 197 contains a new Session-Id, or return Result-Code if the request 198 cannot be processed. The behavior of the communicating peer depends 199 on the DIAMETER extension employed. 201 Exchanges of messages are either request/reply oriented, or in some 202 special cases, do not require replies. All such messages which do 203 not require replies (or acknowledgments) have names which end with 204 '-Ind' (short for Indication). All messages require a transport 205 level acknowledgement, either through a Zero Length Body (ZLB), or by 206 piggybacking an acknowledgement in a non-ZLB message. 208 Communicating DIAMETER peers retain state relating to transport 209 (sequence numbers and the like). This state information may be 210 discarded when the communicating peer is determined to be 211 unreachable. This occurs when the peer does not acknowledge receipt 212 of a DIAMETER message that has been retransmitted a maximum number of 213 times. The Device-Watchdog-Ind is used to pro-actively probe peers to 214 ensure that communication is still possible. 216 Freeing the transport state associated with a communication with a 217 DIAMETER peer is entirely independent of freeing session state 218 (associated with a Session-Id). The latter MUST only be done 219 according to rules established in a particular extension/application 220 of DIAMETER. 222 DIAMETER extensions SHOULD define an explicit exchange of messages 223 which allow a peer to inform the other party that a session has been 224 terminated. 226 2.1 Header Format 228 The base DIAMETER protocol is run over UDP port 1812. Implementations 229 MAY send packets from any source port, but MUST be prepared to 230 receive packets on port 1812. When a request is received, in order to 231 send a reply, the source and destination ports in the reply are 232 reversed. 234 A given DIAMETER process SHOULD use the same port number to send all 235 messages to aid in identifying which process sent a given message. 236 More than one DIAMETER process MAY exist within a single host, so the 237 sender's port number is needed to discriminate them. 239 A summary of the DIAMETER data format is shown below. The fields are 240 transmitted in network byte order. 242 0 1 2 3 243 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 244 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 245 |RADIUS PCC=254|Flags|A|W| Ver | Message Length | 246 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 247 | Identifier | 248 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 249 | Next Send (Ns) | Next Received (Nr) | 250 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 251 | AVPs ... 252 +-+-+-+-+-+-+-+-+-+-+-+-+- 254 RADIUS PCC 255 The RADIUS Packet Compatibility Code (PCC) field is a one octet 256 field which is used for backward compatibility with RADIUS and 257 MUST be set to 254. In order to easily distinguish DIAMETER 258 messages from RADIUS, the value of 254 has been reserved and 259 allows implementations to support both protocols by using the 260 first octet in the header. 262 Flags 263 The Message Flags field is five bits, and is used in order to 264 identify any options. This field MUST be initialized to zero. The 265 'W' bit (Window-Present) is set when the Next Send (Ns) and Next 266 Received (Nr) fields are present in the header. The 'A' bit is set 267 to indicate that the message is an acknowledgement only (ZLB) and 268 does not contain a Command-Code AVP following the header. Note 269 that the Security AVPs, if required, MUST still be present within 270 a ZLB. 272 In the event that the DIAMETER protocol is implemented over a 273 reliable transport, the 'W' and 'A' bits MUST NOT be set. 275 Version 276 This Version field MUST be set to 1 to indicate DIAMETER Version 277 1. 279 Message Length 280 The Message Length field is two octets and indicates the length of 281 the DIAMETER message including the header fields. DIAMETER 282 implementations MUST be ready to receive UDP packets of at least 283 8192 octets in length. 285 Identifier 286 The Identifier field is four octets, and aids in matching requests 287 and replies. The sender MUST ensure that the identifier in a 288 message is locally unique (to the sender) at any given time, and 289 MAY attempt to ensure that the number is unique across reboots. 290 The identifier is normally a monotonically increasing number, 291 whose start value was randomly generated. DIAMETER servers should 292 consider a message to be unique by examining the source address, 293 source port and Identifier field of the message. 295 Next Send 296 This field is present when the Window-Present bit is set in the 297 header flags. The Next Send (Ns) is copied from the send sequence 298 number state variable, Ss, at the time the message is transmitted. 299 The variable Ss is incremented after copying into the header if 300 the message is not a ZLB. 302 Next Received 303 This field is present when the Window-Present bit is set in the 304 header flags. Nr is copied from the receive sequence number state 305 variable, Sr, and indicates the sequence number, Ns, +1 of the 306 highest (modulo 2^16) in-sequence message received. See section 307 4.0 for more information. 309 AVPs 310 AVPs is a method of encapsulating information relevant to the 311 DIAMETER message. See section 2.2 for more information on AVPs. 313 2.1.1 ZLB Message Format 315 Zero Length Body (ZLB) messages are used to explicitly acknowledge 316 one or more DIAMETER message, and contain no additional 317 Authentication, Authorization or Accounting related AVPs. ZLB 318 messages must contain authentication AVPs, otherwise attacks could be 319 mounted against DIAMETER nodes. 321 The format of a ZLB message is as follows: 323 ::= 324 [ 325 326 ] 328 2.2 AVP Format 330 DIAMETER AVPs carry specific authentication, accounting and 331 authorization information, security information as well as 332 configuration details for the request and reply. 334 Some AVPs MAY be listed more than once. The effect of this is AVP 335 specific, and is specified in each case by the AVP description. 337 Each AVP of type 'string' and 'data' MUST be padded to align on a 32 338 bit boundary, while other AVP types align naturally. Zero bytes are 339 added to the end of the AVP value till a word boundary is reached. 340 The length of the padding is not reflected in the AVP Length field. 342 2.2.1 AVP Header 344 The AVP format is shown below and MUST be sent in network byte order. 346 0 1 2 3 347 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 348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 349 | AVP Code | 350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 351 | AVP Length | Reserved |P|T|V|R|M| 352 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 353 | Vendor ID (opt) | 354 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 355 | Tag (opt) | 356 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 357 | Data ... 358 +-+-+-+-+-+-+-+-+ 360 AVP Code 361 The AVP Code identifies the attribute uniquely. If the Vendor- 362 Specific bit is set, the AVP Code is allocated from the vendor's 363 private address space. 365 The first 256 AVP numbers are reserved for backward compatibility 366 with RADIUS and are to be interpreted as per RADIUS [1]. AVP 367 numbers 256 and above are used for DIAMETER, which are allocated 368 by IANA (see section 8.1). 370 AVP Length 371 The AVP Length field is two octets, and indicates the length of 372 this Attribute including the AVP Code, AVP Length, AVP Flags, 373 Reserved, the Tag and Vendor ID fields if present and the AVP 374 data. If a message is received with an Invalid attribute length, 375 the message SHOULD be rejected. 377 AVP Flags 378 The AVP Flags field informs the DIAMETER host how each attribute 379 must be handled. Note that subsequent DIAMETER extensions MAY 380 define bits to be used within the AVP Header, and an unrecognized 381 bit should be considered an error. The 'R' and the reserved bits 382 should be set to 0 and ignored on receipt, while the 'P' bit is 383 defined in [11]. 385 The 'M' Bit, known as the Mandatory bit, indicates whether support 386 of the AVP is required. If an AVP is received with the 'M' bit 387 enabled and the receiver does not support the AVP, the message 388 MUST be rejected. AVPs without the 'M' bit enabled are 389 informational only and a receiver that receives a message with 390 such an AVP that is not supported MAY simply ignore the AVP. 392 The 'V' bit, known as the Vendor-Specific bit, indicates whether 393 the optional Vendor ID field is present in the AVP header. When 394 set the AVP Code belongs to the specific vendor code address 395 space. 397 The 'T' bit, known as the Tag bit, is used to group sets of AVPs 398 together. Grouping of AVPs is necessary when more than one AVP is 399 needed to express a condition. If this bit is set, the optional 400 Tag field will be present. 402 Unless otherwise noted, AVPs will have the following default AVP 403 Flags field settings: 404 The 'M' bit MUST be set. The 'V' bit MUST NOT be set. The 'T' 405 bit MAY be set. 407 2.2.2 Optional Header Elements 409 The AVP Header consists of several optional fields. These fields are 410 only present if their respective bit-flags are enabled. 412 Vendor ID 413 The Vendor ID field is present in the 'V' bit is set in the AVP 414 Flags field. The optional four octet Vendor ID field contains the 415 IANA assigned "SMI Network Management Private Enterprise Codes" 416 [2] value, encoded in network byte order. Any vendor wishing to 417 implement DIAMETER extensions MUST use their own Vendor ID along 418 with private Attribute values, guaranteeing that they will not 419 collide with any other vendor's extensions, nor with future IETF 420 extensions. 422 A vendor ID value of zero (0) corresponds to the IETF adopted AVP 423 values, as managed by the IANA. Since the absence of the vendor ID 424 field implies that the AVP in question is not vendor specific, 425 implementations SHOULD not use the zero (0) vendor ID. 427 Tag 428 The Tag field is four octet in length and is intended to provide a 429 means of grouping attributes in the same message which refer to 430 the same set. If the Tag field is unused, the 'T' bit MUST NOT be 431 set. 433 2.2.3 AVP Value Formats 435 The Data field is zero or more octets and contains information 436 specific to the Attribute. The format and length of the Data field is 437 determined by the AVP Code and AVP Length fields. Note that messages 438 which are larger than the path MTU will cause IP fragmentation and 439 messages SHOULD be kept to that size wherever possible. In any case 440 UDP limits messages to 2^16 bytes. 442 The format of the value field MAY be one of seven data types. 444 Data 445 The data contains a variable length of arbitrary data. Unless 446 otherwise noted, the AVP Length field MUST be set to at least 447 9. 449 String 450 The data contains a non-NULL terminated variable length string 451 using the UTF-8 [24] character set. Unless otherwise noted, 452 the AVP Length field MUST be set to at least 9. 454 Address 455 32 bit (IPv4) [17] or 128 bit (IPv6) [16] address, most 456 significant octet first. The format of the address (IPv4 or 457 IPv6) is determined by the length. If the attribute value is an 458 IPv4 address, the AVP Length field MUST be 12, otherwise the 459 AVP Length field MUST be set to 24 for IPv6 addresses. 461 Integer32 462 32 bit value, in network byte order. The AVP Length field MUST 463 be set to 12. 465 Integer64 466 64 bit value, in network byte order. The AVP Length field MUST 467 be set to 16. 469 Time 470 32 bit unsigned value, In network byte order, and contains the 471 seconds since 00:00:00 GMT, January 1, 1900. The AVP Length 472 field MUST be set to 12. 474 Complex 475 The complex data type is reserved for AVPs that includes 476 multiple information fields, and therefore do not fit within 477 any of the AVP types defined above. Complex AVPs MUST provide 478 the data format, and the expected length of the AVP. 480 2.2.4 DIAMETER Base Protocol AVPs 482 The following table describes the DIAMETER AVPs defined in the base 483 protocol, their AVP Code values, types, possible flag values and 484 whether the AVP MAY be encrypted. 486 Irregular AVP Flag rules 487 +-----+-----+------+-----+----+ 488 Attribute Section Value | | |SHOULD| MUST|Encr| 489 Attribute Name Code Defined Type | MUST| MAY | NOT | NOT|Cand| 490 --------------------------------------------------+-----+------+----------+ 491 User-Name [1] 1 3.3 String | | | | | Y | 492 Host-IP-Address[1] 4 2.3.2 Address | M | | | T,V | N | 493 Session-Timeout[1] 27 3.2 Integer32| | | | | Y | 494 Host-Name [1] 32 2.3.3 String | M | | | T,V | N | 495 Proxy-State [1] 33 6.1.1 Complex | M | | | T,V | N | 496 Command-Code 256 2.3.1 Integer32| M | V | | T | N | 497 Extension-Id 258 2.6.5 Integer32| | | | | Y | 498 Integrity-Check 259 7.1.1 Complex | | | | | N | 499 -Value | | | | | | 500 Encrypted-Payload 260 7.1.2 Data | | | | | N | 501 Nonce 261 7.2 Data | | | | | N | 502 Timestamp 262 7.3 Time | | | | | N | 503 Session-Id 263 3.3 Data | | | | | Y | 504 Vendor-Name 266 2.6.1 String | | | |T,V,M| Y | 505 Firmware 267 2.6.2 Integer32| | | |T,V,M| Y | 506 -Revision | | | | | | 507 Result-Code 268 5.2 Complex | | | | | N | 508 Destination-NAI 269 6.1.2 String | | | | | Y | 509 Reboot-Type 271 2.6.3 Integer32| | | | | N | 510 Reboot-Time 272 2.6.4 Integer32| | | | | N | 511 Failed-AVP 279 5.1.1 Data | | | | | Y | 512 Receive-Window 277 4.1.1 Integer32| | | | | Y | 513 Redirect-Host 278 6.2.1 Address | | | | | Y | 515 2.3 Mandatory AVPs 517 This section defines the DIAMETER AVPs that MUST be present in all 518 DIAMETER messages, with the exception of the ZLB. 520 2.3.1 Command-Code AVP 522 The Command-Code AVP (AVP Code 256) is of type Integer32 and MUST be 523 the first AVP following the DIAMETER header (except for ZLB 524 messages). A DIAMETER message MUST have at most one Command-Code 525 AVP, and it is used in order to communicate the command associated 526 with the message. The Command Code 32-bit address space is managed 527 by IANA (see section 8.2). 529 The following Command Codes are currently defined in the DIAMETER 530 protocol: 532 Command-Name Abbrev. Code Reference 533 -------------------------------------------------------- 534 Device-Reboot-Ind DRI 257 2.6 535 Device-Watchdog-Ind DWI 258 2.7 536 Message-Reject-Ind MRI 259 5.1 537 AA-Mobile-Node-Request AMR 260 [10] 538 AA-Mobile-Node-Answer AMA 261 [10] 539 Home-Agent-MIP-Request HAR 262 [10] 540 Home-Agent-MIP-Answer HAA 263 [10] 541 Mobile-Node-Terminate-Ind MTI 264 [10] 542 AA-Request AAR 265 [7] 543 AA-Answer AAA 266 [7] 544 AA-Challenge-Ind ACI 267 [7] 545 DIAMETER-EAP-Request DER 268 [7] 546 DIAMETER-EAP-Answer DEA 269 [7] 547 DIAMETER-EAP-Ind DEI 270 [7] 548 Accounting-Request ACR 271 [15] 549 Accounting-Answer ACA 272 [15] 550 Accounting-Poll-Ind ACP 273 [15] 552 2.3.2 Host-IP-Address AVP 554 The Host-IP-Address AVP (AVP Code 4) is of type Address and is used 555 to inform a DIAMETER peer of the sender's IP address. All DIAMETER 556 messages, except for ZLBs, MUST include either the Host-IP-Address or 557 the Host-Name (section 2.3.3) AVPs, or both. 559 2.3.3 Host-Name AVP 561 The Host-Name AVP (AVP Code 32) is of type String, and is used to 562 inform a DIAMETER peer of the sender's identity. All DIAMETER 563 messages, except for ZLBs, MUST include either the Host-IP-Address or 564 the Host-Name (section 2.3.2) AVPs, or both. This AVP contains the 565 host name of the originator of the DIAMETER message that MUST follow 566 the NAI [8] naming conventions. 568 2.4 The art of AVP Tagging 570 The AVP Header provides the 'T' bit, which is used to group AVPs 571 together. All AVPs with the same tag value are part of the same 572 "group", and there are no guidelines or rules on which tag values are 573 used. The base protocol defines the Redirect-Host AVP (see section 574 6.2.1), and [11] defines how the associated certificate MAY be 575 carried within the DIAMETER protocol. This allows a single request to 576 include information about more than one host. In the case where 577 multiple AVPs are needed to indicate a specific authorization "rule" 578 tagging is appropriate. In some cases, more than one such rule MAY be 579 present, and the tagging mechanism allows the sets of AVPs to be 580 easily grouped. 582 Some Command Codes require certain AVPs to be tagged and use the '(' 583 and ')' characters in the BNF command definition, such as: 584 ::= 585 586 ( 587 588 ) 590 2.5 State Machine 592 A DIAMETER node initially considers all known peers to be in the 593 closed state, and should not process any DIAMETER message with the 594 exception of the Device-Reboot-Ind (DRI). Once the DIAMETER peer is 595 set to the open state, any DIAMETER message may be accepted and 596 processed. This section provides the DIAMETER base protocol state 597 machine. 599 If at any time no transport level acknowledgement is received and the 600 message was retransmitted the maximum number of times, the session 601 with the peer MUST be closed, and all associated state with the peer 602 MUST be freed. 604 State Event Action New State 605 ----- ----- ------ --------- 606 closed Local Open send DRI wait-ack1 607 Request 609 closed receive DRI send ACK wait-ack2 610 send DRI 612 closed receive invalid cleanup closed 613 DRI 615 wait-ack1 receive ACK accept Incoming wait-ack1 616 Messages 618 wait-ack1 receive DRI send ACK open 619 Accept Incoming 620 Messages 622 wait-ack1 no ACK received cleanup closed 624 wait-ack2 received ACK Accept Incoming open 625 Messages 627 wait-ack2 no ACK received cleanup closed 629 open receive DRI send ACK wait-ack2 630 Rebooted send DRI 632 open receive DRI cleanup closed 633 Imminent-Reboot 635 open receive DWI send ACK open 637 open receive other send ACK open 638 messages 640 open inactivity period send DWI open 641 hits watchdog 642 timer 644 open no ACK received cleanup closed 646 2.6 Device-Reboot-Ind (DRI) Command 648 A DIAMETER device sends the Device-Reboot-Ind message, by including 649 the Command-Code AVP with a value of 257, to inform a peer either of 650 an upcoming reboot, or that it has just rebooted. The Reboot-Type AVP 651 MUST be present and indicates the type of reboot associated with this 652 command. Note that a DIAMETER device should only send this message 653 when it is able to receive network traffic. 655 The receiver of a DRI message with the Reboot-Type AVP set to 656 REBOOT_IMMINENT SHOULD make an attempt to send packets to an 657 alternate peer, if one is available. The optional Reboot-Time AVP 658 will contain an estimate of how long before the peer will be ready to 659 re-establish communication. In the case of a software implementation 660 (server) running on a general purpose operating system, the Reboot- 661 Time AVP will probably not be present since it is possible that the 662 DIAMETER server has been stopped and it is not possible to know how 663 long before (and if) it will be restarted. 665 The DRI message is also used for capabilities negotiation, such as 666 the supported protocol version number, and the locally supported 667 extensions. The receiver uses the extensions advertised in order to 668 determine whether it SHOULD send certain application-specific 669 DIAMETER commands. A DIAMETER node MUST retain the supported 670 extensions in order to ensure that unrecognized commands and/or AVPs 671 are not sent to a peer. Note that in a proxy environment, it is still 672 possible for this problem to occur, and the DIAMETER base protocol 673 provides this error reporting message. 675 Upon reboot, the host MUST issue a DRI message with the Reboot-Type 676 AVP set to REBOOTED to all configured peers. If a peer is no longer 677 reachable, a DIAMETER device SHOULD periodically transmit a DRI until 678 an acknowledgement is received. The retransmission timer SHOULD be 679 different from the retransmission timer used when communication has 680 been established, and SHOULD be configurable. 682 Upon receipt of this message the peer's Ss and Sr variables MUST be 683 reset. It is possible for this message to be received outside the 684 window (Ns and Nr set to zero) when it follows a reboot. 686 The DIAMETER Reboot-Ind message does not require a reply. The message 687 is acknowledged using DIAMETER's reliable transport. See [25] for 688 more information. 690 Message Format 692 ::= 693 694 { || 695 } 696 697 698 699 [] 700 [] 701 [] 702 [ 703 704 ] 706 2.6.1 Vendor-Name AVP 708 The Vendor-Name AVP (AVP Code 266) is of type String and is used to 709 inform a DIAMETER peer of the Vendor Name of the DIAMETER device. 710 This MAY be used in order to know which vendor specific attributes 711 may be sent to the peer. It is also envisioned that the combination 712 of the Vendor-Name and the Firmware-Revision (section 2.6.2) AVPs MAY 713 provide very useful debugging information. 715 2.6.2 Firmware-Revision AVP 717 The Firmware-Revision AVP (AVP Code 267) is of type Integer32 and is 718 used to inform a DIAMETER peer of the firmware revision of the 719 issuing device. 721 For devices that do not have a firmware revision (general purpose 722 computers running DIAMETER software modules, for instance), the 723 revision of the DIAMETER software module may be reported instead. 725 2.6.3 Reboot-Type AVP 727 The Reboot-Type AVP (AVP Code 271) is of type Integer32 and MUST be 728 present in the Device-Reboot-Indication message. This AVP contains an 729 indication of the type of reboot that has or will occur. The 730 following values are currently supported: 732 REBOOT_IMMINENT 1 733 When the Reboot-Type AVP is set to this value it is an 734 indication that the DIAMETER peer is about to reboot and should 735 not be sent any additional DIAMETER messages after the 736 acknowledgement for this Device-Reboot-Ind message. 738 REBOOTED 2 739 When the Reboot-Type AVP is set to this value it is an 740 indication that the DIAMETER peer has recently rebooted and is 741 ready to accept new DIAMETER messages. 743 2.6.4 Reboot-Time AVP 745 The Reboot-Time AVP (AVP Code 272) is of type Integer32 and MAY be 746 present in the DRI. The value of this AVP indicates the number of 747 seconds before the issuer expects to be ready to receive new DIAMETER 748 messages. This AVP MUST only be present when the Reboot-Type AVP is 749 set to REBOOT_IMMINENT. The value indicated by this AVP should be 750 used as an estimate and is not a hard rule. 752 2.6.5 Extension-Id AVP 754 The Extension-Id AVP (AVP Code 258) is of type Integer32 and is used 755 in order to identify a specific DIAMETER extension. This AVP is used 756 in the Device-Reboot-Ind command in order to inform the peer what 757 extensions are locally supported. 759 Each DIAMETER extension draft MUST have an Extension-Id assigned to 760 it by the IANA (see section 8.3). The base protocol does not require 761 an Extension-Id since its support is mandatory. 763 There MAY be more than one Extension-Id AVP within a DIAMETER 764 Device-Reboot-Ind message. The following values are recognized: 766 NASREQ 1 [7] 767 Strong Security 2 [11] 768 Mobile-IP 4 [10] 769 Accounting 5 [15] 771 2.7 Device-Watchdog-Ind (DWI) Command 773 The Device-Watchdog-Ind (DWI), indicated by the Command-Code AVP set 774 to 258, is OPTIONAL and is used as a keepalive mechanism between two 775 DIAMETER peers. If implemented, it SHOULD be sent during after a 776 configurable period of inactivity. Communicating peers are not 777 required to have the same DWI timer values set, as each entity MAY 778 have different requirements. 780 A DIAMETER node MAY use this mechanism to ensure that fail-over to an 781 alternate server occurs in the absence of AAA traffic. This pro- 782 active approach may minimize the possible latency involved in the 783 fail-over that would otherwise occur. 785 The lower the timer value is set to, the quicker a host will pro- 786 actively detect that a peer is no longer reachable. However, the 787 timer SHOULD NOT be set to a value that is considered too low (e.g. 2 788 seconds), since it will generate considerable traffic. 790 The DIAMETER Device-Watchdog-Ind message does not require a reply. 791 The message is acknowledged using DIAMETER's reliable transport. See 792 [25 for more information. 794 Message Format 796 ::= 797 798 { || 799 } 800 [ 801 802 ] 804 3.0 "User" Sessions 805 When a user requests access to the network, a DIAMETER client issues 806 an authentication and authorization request to its local server. The 807 request contains a Session-Id AVP, which is used in subsequent 808 messages (e.g. subsequent authorization, accounting, etc) relating to 809 the user's session. The Session-Id AVP is a means for the client and 810 servers to correlate a DIAMETER message with a user session. 812 When a DIAMETER server authorizes a user to use network resources, it 813 SHOULD add the Session-Timeout AVP to the response. The Session- 814 Timeout AVP defines the maximum amount of time a user MAY make use of 815 the resources before another authorization request is to be 816 transmitted to the server. If the server does not receive another 817 authorization request before the timeout occurs, it SHOULD release 818 any state information related to the user's session. Note that the 819 Session-Timeout AVP implies how long the DIAMETER server is willing 820 to pay for the services rendered, therefore a DIAMETER client SHOULD 821 NOT expect payment for services rendered past the session expiration 822 time. 824 The base protocol does not include any authorization request 825 messages, since these are largely application-specific and are 826 defined in a DIAMETER protocol extension document. Such extensions 827 SHOULD provide a message that allows a client to inform a server that 828 the user's session has been released. This would enable the server to 829 free state information instead of having to wait for the timeout to 830 occur. 832 3.1 Session-Id AVP 834 The Session-Id AVP (AVP Code 263) is of type Data and is used to 835 identify a specific session (see section 3.0). All messages 836 pertaining to a specific session MUST include only one Session-Id AVP 837 and the same value MUST be used throughout the life of a session. 838 When present, the Session-Id SHOULD appear immediately following the 839 Command-Code AVP. 841 For messages that do not pertain to a specific session, multiple 842 Session-Id AVPs MAY be present as long as the 'T' bit is set. 844 The Session-Id MUST be globally unique at any given time since it is 845 used by the server to identify the session (or flow). The format of 846 the session identifier SHOULD be as follows: 848 851 The monotonically increasing 32 bit value SHOULD NOT start at zero 852 upon reboot, but rather start at a random value. This will minimize 853 the possibility of overlapping Session-Ids after a reboot. 854 Alternatively, an implementation MAY keep track of the increasing 855 value in non-volatile memory. The optional value is implementation 856 specific but may include a modem's device Id, a layer 2 address, 857 timestamp, etc. 859 The session Id is created by the DIAMETER device initiating the 860 session, which in most cases is done by the client. Note that a 861 Session-Id MAY be used by more than one extension (e.g. 862 authentication for a specific service and accounting, both of which 863 have separate extensions). 865 3.2 Session-Timeout AVP 867 The Session-Timeout AVP (AVP Code 27) is of type Integer32 and 868 contains the maximum number of seconds of service to be provided to 869 the user before termination of the session. A value of zero means 870 that this session has an unlimited number of seconds before 871 termination. 873 This AVP MAY be provided by the client as a hint of the maximum 874 duration that it is willing to accept. However, the server DOES NOT 875 have to observe the hint and MAY return any value. A value of zero 876 provided by a client DOES NOT imply that service is being terminated. 878 3.3 User-Name AVP 880 The User-Name AVP (AVP Code 1) is of type String and contains the 881 User-Name in a format consistent with the NAI specification [8]. All 882 DIAMETER systems SHOULD support usernames of at least 72 octets in 883 length. 885 4.0 Reliable Transport 887 This section provides a detailed overview of how DIAMETER is reliably 888 transported over UDP. DIAMETER provides its own reliable transport 889 due to its unique requirements, which include: 891 - Rapid discovery of the failure of a communicating peer. 892 - Transactions of few messages will be the norm, so the TCP slow 893 start algorithm is not appropriate. 894 - The retransmission scheme required is more aggressive than TCP 895 provides. 897 4.1 Flow Control 899 The DIAMETER header contains two fields used for reliable transport: 900 Nr (Next Received) and Ns (Next Send). The sequence number state for 901 each peer is represented (for clarity of discussion) as Sr (the next 902 in-sequence message expected to be received) and Ss (the next in- 903 sequence message to be sent). Sr and Ss are initialized to 0. 905 The sequence number is a free ranging counter modulo 65536. For 906 purposes of detecting duplication, a received sequence value is 907 considered less than or equal to the last received value if its value 908 lies in the range of the last value and its 32767 successor values. 909 For example if the last received sequence number was 15, the packets 910 received with Ns values in the range 32783..65535, or 0..15 would be 911 considered duplicates. Duplicate messages are silently discarded. 913 ZLB messages are used to acknowledge DIAMETER messages to the 914 communicating peer. Each subsequent non-ZLB message is sent with a 915 sequence number incremented by one (modulo 2^16). The following rules 916 apply: 918 - When a non-ZLB message is received with a Ns value which matches 919 the peer's Sr value, Sr is incremented by one. Sr is not 920 modified if a message is received with a Ns value greater than 921 the current Sr value. 923 - In messages which are sent to a peer, Nr is set to reflect one 924 higher than the Ns value of the highest (module 2^16) in-order 925 message received from the peer. 927 - Every time a peer sends a non-ZLB message, it sends the message 928 with Ns set to the current value of Ss. The value of Ss for 929 that peer is then incremented by one (modulo 2^16). 931 - Every time a peer receives an in-order non-ZLB message, the 932 receiving peer must increment its Sr value. The peer MUST 933 acknowledge the message, either by sending a ZLB message with 934 the updated Nr value, or by piggybacking the acknowledgement in 935 any outgoing message sent to the communicating peer. In this 936 piggybacked message, the Nr field will be set to its updated 937 value. The implementation guidelines [25] defines an OPTIONAL 938 algorithm for delaying acknowledgments, to wait for outgoing 939 messages to piggyback acknowledgements on. 941 - Messages which are sent MUST be queued and retransmitted till 942 the peer sends an acknowledgement. Messages SHOULD be 943 retransmitted at least three times. The implmentation 944 guidelines specification [25] recommends a retransmission timer 945 algorithm. 947 Retransmitted messages SHOULD include the current value of Sr in the 948 Nr field. An implementation MAY choose not to update Nr field (and 949 Timestamp AVP) for retransmitted messages, in order to avoid having 950 to perform another hash in the Integrity-Check- Value AVP. The 951 message identifier in the retransmitted message MUST NOT be changed. 953 A DIAMETER implementation MAY queue out of order DIAMETER messages 954 for subsequent processing. 956 The receive window is the maximum number of unacknowledged packets 957 that are to be outstanding to a DIAMETER peer. When transmitting 958 packets, a DIAMETER peer must obey the receive window size offered by 959 its peer. The default window size is 7. Once the number of 960 unacknowledged messages equals the window size, the window is 961 'closed.' Previously transmitted packets may be retransmitted when 962 the peer's window is closed. A peer MAY explicitly specify its 963 window size in the Device-Reboot-Ind message in the Receive-Window 964 AVP. 966 A peer MAY return a Nr value in a ZLB or piggybacked in a non-ZLB 967 message which is less than the latest Sr value, due to congestion. 968 Returning a value in Nr of the first value in the window will have 969 the effect of preventing the communicating peer from sending any new 970 messages. 972 See [25] for some examples of how sequence numbers progress. 974 4.1.1 Receive-Window AVP 976 The Receive-Window AVP (AVP Code 277) is of type Integer32 and 977 contains the maximum number of outstanding unacknowledged messages 978 that it is willing to accept for a given peer. Once the number of 979 unacknowledged messages has reached this number, the receive window 980 is considered closed. The default value for the receive window is 7, 981 and SHOULD be configurable. A simple implementation that does not 982 require a high number of transactions per second MAY send a Receive- 983 Window AVP set to one (1). 985 A node MUST stop sending messages when it detects that the number of 986 unacknowledged messages is equal to the peer's receive window size. 988 4.2 Peer failure recovery 990 A DIAMETER message with the Command-Code AVP set to Device-Reboot-Ind 991 and the Ns and Nr values set to zero (0) indicates that the peer has 992 rebooted. This message MUST be recognized and supported by a 993 DIAMETER implementation. When this event occurs, the Ss and Sr values 994 must be reset and the retransmission queue MUST be cleared. Since the 995 protocol requires that all new messages include a random identifier 996 in the protocol header, a Device-Reboot-Ind that is received with the 997 same identifier as the last processed Device-Reboot-Ind is considered 998 a retransmission and SHOULD NOT change the peer's state to closed. 1000 Messages other than the Device-Reboot-Ind MUST NOT be sent to the 1001 peer until both the acknowledgement for the transmitted Device- 1002 Reboot-Ind AND the peer's Device-Reboot-Ind have been received. When 1003 both of these have been received, the peer is considered to be in the 1004 active state. 1006 5.0 Error Reporting 1008 There are five different types of errors within DIAMETER. The first 1009 being where a DIAMETER message is poorly formatted and 1010 unrecognizable, indicated below by "Bad Message". This error 1011 condition applies if a received message creates a fatal error (e.g. 1012 fails transport level authentication, cannot be parsed, etc). 1014 The second case involves receiving a Command-Code AVP that is not 1015 supported, which is shown below by "Unknown Command". The third case 1016 is where an AVP is received, marked mandatory and is unknown by the 1017 receiver, which is labeled below as "Unknown AVP". 1019 This fourth case involves receiving a message with a known AVP, yet 1020 the value is either unknown or illegal, which is shown below as "Bad 1021 Value". The last case occurs when an error occurs while processing a 1022 specific extension command, which is not related to the message 1023 format and is labeled "Extension Error" below. 1025 Error Type Ignore Message Send Extension 1026 Message-Reject-Ind Response + 1027 Result-Code 1028 Bad Message X 1029 Unknown Command X 1030 Unknown AVP X 1031 Bad Value X 1032 Extension Error X 1034 "Ignore Message" indicates that the message is simply dropped. The 1035 "Message-Reject-Ind" indicates that a Message-Reject-Ind message MUST 1036 be sent to the peer as described in the appropriate section. The 1037 "Extension Response + Result-Code" indicates that the appropriate 1038 Response to the message MUST be sent with the Result-Code AVP set to 1039 a value that enables the peer to understand the nature of the 1040 problem. 1042 5.1 Message-Reject-Ind (MRI) Command 1044 The Message-Reject-Ind (MRI), indicated by the Command-Code AVP set 1045 to 256, provides a generic means of completing transactions by 1046 indicating errors in the messages that initiated them. The Message- 1047 Reject-Ind command is a possible response to any DIAMETER command. 1048 Some DIAMETER commands MAY expect more specialized error messages, 1049 depending on the error type. 1051 The Message-Reject-Ind message MUST contain the same identification 1052 in the header and include the Session-Id if it was present in the 1053 original message that it is responding to, even if the identification 1054 is erroneous. The receiver of a Message-Reject-Ind SHOULD examine the 1055 Result-Code AVP provided before processing the identification, in 1056 order to handle the latter appropriately. 1058 Message Format 1060 The structure of the Message-Reject-Ind message is defined as 1061 follows: 1063 ::= 1064 1065 1066 [] 1067 [] 1068 1069 1070 [ 1071 1072 ] 1074 where the Identifier value in the message header and optionally 1075 the Session-Id AVP are copied from the message being rejected. The 1076 Result-Code AVP indicate the nature of the error causing 1077 rejection, and the Failed-AVP AVP provides some minimal debugging 1078 data by indicating a specific AVP type which caused the problem. 1079 See the description of the Result-Code AVP for indication of when 1080 the Failed-AVP AVP MUST be present in the message. See [25] for 1081 more information. 1083 5.1.1 Failed-AVP AVP 1084 The Failed-AVP AVP (AVP Code 279) is of type Data and provides 1085 debugging information in cases where a request is rejected or not 1086 fully processed due to erroneous information in a specific AVP. The 1087 value of the Result-Code AVP will provide information on the reason 1088 for the Failed-AVP AVP. 1090 A DIAMETER message MAY contain one or more Failed-AVP, each 1091 containing a complete AVP that could not be processed successfully. 1092 The possible reasons for this AVP are the presence of an improperly 1093 constructed AVP, an unsupported or unrecognized AVP or an invalid AVP 1094 value (e.g. unknown Command-Code AVP). 1096 5.2 Result-Code AVP 1098 The Result-Code AVP (AVP Code 268) is of type Complex and indicates 1099 whether a particular request was completed successfully or whether an 1100 error occurred. All DIAMETER messages of type *-Response or *-Answer 1101 MUST include one Result-Code AVP. 1103 0 1 2 3 1104 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 1105 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1106 AVP Header (AVP Code = 268) 1107 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1108 | Result Code | 1109 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1110 | String ... 1111 +-+-+-+-+-+-+-+-+ 1113 The Result Code field contains an IANA-managed 32-bit address space 1114 representing errors. The String field contains an OPTIONAL string 1115 field containing a human readable error message. The base protocol 1116 defines the following error codes, and others MAY be defined in 1117 separate DIAMETER extensions: 1119 DIAMETER_SUCCESS 0 1120 The Request was successfully completed. 1122 DIAMETER_FAILURE 1 1123 The Request was not successfully completed for an unspecified 1124 reason. A DIAMETER Message-Reject message returning this 1125 result SHOULD whenever possible also contain one or more 1126 Failed-AVP AVPs indicating the attributes which caused the 1127 failure. 1129 DIAMETER_POOR_REQUEST 2 1130 The Request was poorly constructed. 1132 DIAMETER_INVALID_AUTH 3 1133 The Request did not contain a valid Integrity-Check-Value or 1134 CMS-Data [11] AVP. 1136 DIAMETER_UNKNOWN_SESSION_ID 4 1137 The Request contained an unknown Session-Id. This error is sent 1138 only due to conditions that arise due to command messages in 1139 DIAMETER extensions, the base protocol does not include command 1140 codes that require the Session-Id AVP. 1142 DIAMETER_USER_UNKNOWN 5 1143 A request was received for a user that is unknown, therefore 1144 authentication failed. This error is sent only due to 1145 conditions that arise due to command messages in DIAMETER 1146 extensions, the base protocol does not include command codes 1147 that require the User-Name AVP. 1149 DIAMETER_COMMAND_UNSUPPORTED 6 1150 The Request contained a Command-Code AVP that the receiver did 1151 not recognize or support. The Message-Reject-Ind message MUST 1152 also contain a Failed-AVP AVP containing the unrecognized 1153 Command-Code AVP. 1155 DIAMETER_TIMEOUT 7 1156 This error MAY be returned if a request has been received that 1157 has a Timestamp AVP that is older than the maximum age that the 1158 communicating peer is willing to accept. 1160 DIAMETER_AVP_UNSUPPORTED 8 1161 The peer received a message that contained an AVP that is not 1162 recognized or supported and was marked with the Mandatory bit. 1163 A Message-Reject-Ind message with this error MUST contain one 1164 or more Failed-AVP AVP containing the AVPs that caused the 1165 failure. 1167 DIAMETER_REDIRECT_INDICATION 9 1168 A proxy or broker has determined that the request could not be 1169 satisfied locally and the initiator of the request should 1170 direct the request directly to the server, whose contact 1171 information has been added to the response. This error code 1172 MUST NOT be sent in a Message-Reject-Ind message. 1174 DIAMETER_DOMAIN_NOT_SERVED 10 1175 A proxy or broker has determined that it is unable to forward 1176 the request or provide redirect information since the realm 1177 portion of the NAI requested is unknown. 1179 DIAMETER_UNSUPPORTED_TRANSFORM 11 1180 A message was received that included an Integrity-Check-Value 1181 or CMS-Data AVP [11] that made use of an unsupported transform. 1183 DIAMETER_AUTHENTICATION_REJECTED 12 1184 The authentication process for the user failed, most likely due 1185 to an invalid password used by the user. 1187 DIAMETER_AUTHORIZATION_REJECTED 13 1188 A request was received for which the user could not be 1189 authorized. This error could occur when the user has already 1190 expended allowed resources, or if the service requested is not 1191 permitted to the user. 1193 DIAMETER_INVALID_AVP_VALUE 14 1195 The request contained an AVP with an invalid value in its data 1196 portion. A DIAMETER message with this result code MUST include 1197 the offending AVPs within a Failed-AVP AVP. 1199 DIAMETER_MISSING_AVP 15 1200 The request did not contain an AVP which the Command Code 1201 requires be present. If this result code is sent, a Failed-AVP 1202 AVP should be included in the Message-Reject-Ind message. The 1203 AVP 'Data' in the Failed-AVP has its AVP Code set to the value 1204 of the missing and required AVP, but does not include any data 1205 of its own. 1207 6.0 DIAMETER Message Routing 1209 The DIAMETER base protocol supports two basic message routing 1210 methods; proxying and brokering. A DIAMETER proxy is a server that 1211 simply forwards the request based on the user's identity, or through 1212 some other means. A DIAMETER broker is a server that provides 1213 redirect services, allowing all servers in a roaming consortium to 1214 interact directly. 1216 6.1 Message Proxying 1218 A DIAMETER proxy is a server that provides message forwarding 1219 functions to other DIAMETER Servers. Proxies are typically used when 1220 a hierarchical DIAMETER network is deployed, where some DIAMETER 1221 servers can authenticate and authorize a set of users. Such an 1222 example is a roaming consortium, where each ISP has a user base, 1223 which they can authenticate and authorize. It is important to note 1224 that proxy servers MUST NOT attempt to re-order AVPs in a DIAMETER 1225 message. 1227 The example provided in figure 1 shows a request issued by DIA1, 1228 requesting authentication and authorization for a user that belongs 1229 to DIA3's network. When DIA1 receives the request from the access 1230 device (e.g. NAS), it checks whether the Destination-NAI AVP is 1231 present, which MUST be in a format consistent with the NAI [8] 1232 specification. If the Destination-NAI is not present, the server MUST 1233 use the information found in the User-Name AVP. 1235 The NAI has a format of user@realm, and DIAMETER servers typically 1236 have a list of locally supported realms, and MAY have a list of 1237 externally supported realms with associated DIAMETER servers. 1238 DIAMETER servers that interface with brokers SHOULD allow for a 1239 "default" destination for all requests received that are not locally 1240 configured. 1242 In the example below, DIA1 looks up the user's realm, and determines 1243 that the request is to be forwarded to DIA2. When DIA2 receives the 1244 request, it MAY decide that some state information needs to be kept 1245 in order to process the response in a particular fashion. An example 1246 would be that DIA2 determines that certain authorization information 1247 is to be added to the response, when received. 1249 (Request) (Request) 1250 (User-Name=joe@abc.com) (User-Name=joe@abc.com) 1251 (Host-Name=DIA1@nmo.net) (Host-Name=DIA1@nmo.net) 1252 (Proxy-State=x) (Proxy-State=y) 1253 +------+ ------> +------+ ------> +------+ 1254 | | | | | | 1255 | DIA1 +-------------------+ DIA2 +-------------------+ DIA3 | 1256 | | | | | | 1257 +------+ <------ +------+ <------ +------+ 1258 (Response) (Response) 1259 (User-Name=joe@abc.com) (User-Name=joe@abc.com) 1260 (Dest-NAI=DIA1@mno.net) (Dest-NAI=DIA1@mno.net) 1261 (Proxy-State=x) (Proxy-State=y) 1262 mno.net xyz.com abc.com 1263 Figure 1: DIAMETER Proxying 1265 There are two methods that MAY be implemented by DIAMETER servers in 1266 order to keep per-request state information. 1268 1. DIA2 MAY maintain a state control block, and using the 1269 session-Id and possibly the Identifier in the header, can match 1270 the request with the response. The state control block MAY 1271 include AVPs that need to be added to the corresponding 1272 response, or any additional policy decisions that will need to 1273 be done when the response is received. 1275 2. DIA2 MAY add a Proxy-State AVP (see section 6.1.1), which can 1276 contain ANY information that will be needed when the 1277 corresponding response is received. A DIAMETER message MUST 1278 only include one Proxy-State AVP, so if a new Proxy-State AVP 1279 is added, the old one MUST be removed. The new Proxy-State AVP 1280 MAY include AVPs that are to be added to the response, the 1281 existing Proxy-State AVP, etc. 1283 Once DIA2 has completed processing the request, it forwards the 1284 request to DIA3 following the same procedures defined for DIA1. 1286 When DIA3 receives the request, and it determines that the 1287 request is to be processed locally, it authenticates and 1288 authorizes the user. DIA3 MUST add the Destination-NAI AVP, 1289 with the same contents as the Host-Name AVP that was found in 1290 the corresponding request. If the request contained a Proxy- 1291 State AVP, the same AVP MUST be present in the response. 1293 When DIA2 receives the response from DIA3, it MUST first 1294 determine whether the Proxy-State AVP was created locally by 1295 looking at the address field of the AVP. Since it is the same 1296 AVP as the one that it added to the request, it will extract 1297 any embedded information within the Proxy-State AVP. If AVPs 1298 were encapsulated within the Proxy-State AVP, these SHOULD be 1299 extracted and added to the response. If the request from DIA1 1300 included a Proxy-State AVP, the same AVP MUST be present in the 1301 response back to DIA1. 1303 6.1.1 Proxy-State AVP 1305 The Proxy-State AVP (AVP Code 33) is used by proxy servers when 1306 forwarding requests and contains opaque data that is used by the 1307 proxy to further process the response. Such data may include AVPs 1308 that are to be added to the response, information about the 1309 downstream peer, etc. 1311 A DIAMETER node that receives such an AVP in a request MUST return 1312 the identical AVP in the response. Furthermore, no more than one 1313 Proxy-State AVP MUST be present in a message at any given time, so 1314 implementations MUST ensure that they remove any Proxy-State AVPs 1315 before adding their own. 1317 If the Proxy-State AVP was removed from a request, the same AVP MUST 1318 be inserted in the corresponding response before forwarding the 1319 message to the downstream peer. 1321 The Proxy-State AVP's Address field is 128-bits in length contains 1322 the IP address of the system created the AVP. If the host creating 1323 the AVP has an IPv4 address, the leading 96 bits MUST be set to zero 1324 (0). This field is intended to assist hosts in determining whether a 1325 Proxy-State AVP is intended for the local host. 1327 0 1 2 3 1328 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 1329 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1330 AVP Header (AVP Code = 33) 1331 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1332 | 128-bit Address... 1333 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1334 | Data ... 1335 +-+-+-+-+-+-+-+-+ 1337 6.1.2 Destination-NAI AVP 1339 The Destination-NAI AVP (AVP Code 269) is of type String and MAY be 1340 included in a request or response message, and MUST be in a format 1341 consistent with the NAI specification. When found in a response, the 1342 AVP SHOULD contain the value of the Host-Name AVP that was found in 1343 the request. This AVP SHOULD be used by intermediate proxies in the 1344 message routing process. 1346 6.2 Message Redirection 1348 There are cases where a DIAMETER proxy, known as a broker, may wish 1349 to request that a server contact another directly instead of 1350 forwarding the message (figure 2). This is typically done when the 1351 broker provides simple NAI to Home DIAMETER Server address resolution 1352 services. 1354 In the example provided in figure 2, abc.net's DIAMETER server issues 1355 a request to its broker, which in turn returns a response that 1356 includes the Result-Code AVP set to a specific value (see section 1357 5.2). When a response is received with such a value, the message MUST 1358 also include one or more Redirect-Host AVPs. These AVPs contain 1359 address information that SHOULD be used to directly communicate with 1360 the Home DIAMETER Server. Note that the servers MAY cache the home 1361 server information in order to reduce the latency involved in any 1362 future messages destined for that home server. 1364 +------------------+ +---------+ 1365 | DIAMETER | | CRL DB/ | 1366 | Broker | | OCSP | 1367 +------------------+ +---------+ 1368 /|\ 1369 Request | Response + 1370 | Result Code = 1371 | Redirect 1372 \|/ 1373 +----------+ +----------+ 1374 | abc.net |/ \| xyz.net | 1375 | DIAMETER |--------------| DIAMETER | 1376 | Server |\ /| Server | 1377 +----------+ Direct +----------+ 1378 Communication 1379 Figure 2: DIAMETER Broker Returning Redirect Indication 1381 When returning the response with the Result-Code set to indicate a 1382 redirect indication, the broker MAY also include the certificates of 1383 both the requesting server, and the target server. These certificates 1384 are encapsulated in a CMS-Data AVP [11]. The requesting server SHOULD 1385 forward the certificate that belongs to it in the subsequent request 1386 to the home DIAMETER server. 1388 6.2.1 Redirect-Host AVP 1390 The Redirect-Host AVP (AVP Code 278) is of type Address and is 1391 returned in a response that has the Result-Code AVP set to 1392 DIAMETER_REDIRECT_REQUEST. This AVP includes address information of 1393 the DIAMETER host to which the request must be redirected. Upon 1394 receipt of such a Result-Code, and this AVP, a DIAMETER host SHOULD 1395 send the request directly to the host. A proxy server or broker MAY 1396 return more than one Redirect-Host AVP if there is more than one 1397 DIAMETER server that can satisfy the request. 1399 The broker MAY wish to return the certificate associated with a given 1400 Redirect-Host AVP. This can be returned in a CMS-Data AVP, as defined 1401 in [11]. 1403 7.0 DIAMETER Message Security 1405 The DIAMETER Base protocol MAY be secured in one of three ways. The 1406 first method does not involve any security mechanisms in the DIAMETER 1407 protocol, but relies on an underlying security mechanism, such as IP 1408 Security. The second method is hop-by-hop security, which SHOULD be 1409 supported by all DIAMETER implementations. The third method is 1410 optional and requires a Public Key Infrastructure [14], and is 1411 documented in [11]. 1413 7.1 Hop-by-Hop Security 1415 DIAMETER Hop-by-Hop security provides message integrity and per AVP 1416 encryption, and requires that the communicating entities have a pre- 1417 configured shared secret, similar to the method employed by the 1418 RADIUS protocol. Hop-by-Hop security does not have the scaling 1419 properties associated with a public key infrastructure (PKI), which 1420 is used in end-to-end security, but MAY be desirable in environments 1421 where asymmetric technology is not required, or available. 1423 Hop-by-Hop security implies that each hop along a proxy chain is 1424 responsible for the following tasks: 1426 - Validating the message's integrity using the shared secret with 1427 the sender. 1429 - Decrypting any encrypted AVPs using the secret shared with the 1430 sender. 1432 - Re-encrypting AVPs using the secret shared with the next server. 1434 - Computing the message hash using the secret shared with the next 1435 server, and adding it to the ICV AVP in the DIAMETER message. 1437 (Shared-Secret-1) (Shared-Secret-2) 1438 +------+ -----> +------+ ------> +------+ 1439 | | | | | | 1440 | DIA1 +-------------------+ DIA2 +-------------------+ DIA3 | 1441 | | | | | | 1442 +------+ +------+ +------+ 1443 Figure 3: Hop-by-Hop Security in Proxy Environments 1445 The above steps that each proxy MUST perform in a proxy chain clearly 1446 describes the security issues associated with hop-by-hop security in 1447 a proxy environment. Since the message integrity is re-computed at 1448 each node in the chain, it is very difficult to detect if a proxy 1449 modified information in the message (e.g. session time). Furthermore, 1450 any sensitive information would be known to all proxies in the chain, 1451 since each node must decrypt AVPs. Therefore, Any AVPs that require 1452 strong authentication and/or confidentiality in a proxy environment 1453 SHOULD be protected via the mechanism described in the strong 1454 security extension [11]. 1456 It is highly recommended that the size of the shared secrets used be 1457 sufficiently long (e.g. 128 bits), and that different shared secrets 1458 be used for both authentication and encryption. 1460 7.1.1 Integrity-Check-Value AVP 1462 The Integrity-Check-Value AVP (AVP Code 259) is of type data and is 1463 used for hop-by-hop authentication and integrity, and is not 1464 recommended for use with untrusted proxy servers. 1466 The DIAMETER header as well as all AVPs (including padding) up to 1467 this AVP is protected by the Integrity-Check-Value. Note that the 1468 Message Length field in the DIAMETER header MUST be set to zero (0) 1469 prior to the ICV calculation. The Timestamp and Nonce AVPs MUST be 1470 present in the message PRIOR to the Integrity-Check-Value AVP. The 1471 Timestamp AVP provides replay protection and the Nonce AVP provides 1472 randomness. Any AVPs in a message that is not succeeded by the 1473 Integrity-Check-Value AVP MUST be ignored. 1475 The following is an example of a message that include hop-by-hop 1476 security: 1478 ::= 1479 1480 [] 1481 1482 1483 1485 All DIAMETER implementations SHOULD support this AVP. 1487 0 1 2 3 1488 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 1489 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1490 AVP Header (AVP Code = 259) 1491 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1492 | Transform ID | 1493 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1494 | Key ID | 1495 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1496 | Data ... 1497 +-+-+-+-+-+-+-+-+ 1499 AVP Length 1500 The length of this attribute MUST be at least 13. 1502 Transform ID 1503 The Transform ID field contains a value that identifies the 1504 transform that was used to compute the ICV. The following 1505 values are defined in this document: 1507 HMAC-MD5-96[6] 1 1508 The ICV is computed using the HMAC-MD5 algorithm, and the 1509 first 12 bytes of the hash output is included in the data 1510 portion of the ICV AVP. All DIAMETER implementations 1511 supporting this AVP MUST support this transform. Using the 1512 example code provided in [6], the following call would be 1513 used to generate the Integrity-Check-Value: 1515 hmac_md5(DiameterMessage, MessageLength, Secret, 1516 Secretlength, Output) 1518 Key ID 1519 The Key ID field contains a key identifier, which is used to 1520 identify the keying information used to generate the AVP's data 1521 field. 1523 Data 1524 The data field contains the output from the hashing algorithm. 1526 7.1.2 Encrypted-Payload AVP 1528 The Encrypted-Payload AVP (AVP Code 260) is of type data and is used 1529 to encapsulate encrypted AVPs for privacy during transmission. 1531 Hop-by-Hop confidentiality is achieved by encapsulating all AVPs 1532 which are to be encrypted into an Encrypted-Payload AVP. This 1533 feature SHOULD be supported by DIAMETER implementations. 1535 The plain text (which is a buffer containing one or more AVPs) is 1536 first padded to a sixteen (16) byte boundary with 0 bytes. Since the 1537 encapsulated AVPs have length fields, it is possible to detect their 1538 boundaries, whether or not padding has been done. 1540 One or more Nonce AVPs MUST precede an Encrypted-Payload AVP. An MD5 1541 hash is performed on the: 1543 - last Nonce AVP which precedes the Encrypted-Payload AVP 1544 - the shared authentication secret 1546 This MD5 hash value is then XORed with the first 16 octet segment of 1547 the buffer to encrypt. The resulting 16 octet result is saved as the 1548 first 16 octets of the encrypted buffer. The result is also used to 1549 calculate a new value using MD5: 1551 - the 16 byte result of the previous XOR 1552 - the shared authentication secret 1554 This value is then XORed with the next 16 bytes. This is done for 1555 each 16 bytes successively in the buffer to encrypt, producing an 1556 equal sized encrypted buffer. 1558 The receiver of a DIAMETER message with an Encrypted-Payload AVP MUST 1559 first check the integrity of the message, either through the ICV, or 1560 the CMS-Data AVP [11] if it protects the Encrypted-Payload AVP. Then 1561 the Encrypted-Payload AVP is decrypted, using the same algorithm as 1562 above, which applied to the buffer will reproduce the plain text 1563 version. The decapsulated AVPs are then used to process the DIAMETER 1564 message in the normal manner. 1566 7.2 Nonce AVP 1568 The Nonce AVP (AVP Code 261) is of type Data and MUST be present 1569 prior to the Integrity-Check-Value AVPs within a message and is used 1570 to ensure randomness within a message. The content of this AVP MUST 1571 be a random value of at least 128 bits. 1573 7.3 Timestamp AVP 1575 The Timestamp AVP (AVP Code 262) is of type Time and is used to add 1576 replay protection to the DIAMETER protocol. This AVP MUST appear 1577 prior to the Integrity-Check-Value AVP or any other message integrity 1578 AVP defined in separate extensions. The value of time is the most 1579 significant four octets returned from an NTP server that indicates 1580 the number of seconds expired since Jan. 1, 1900. 1582 Messages which are older than a certain maximum age SHOULD be 1583 rejected and a response SHOULD be returned with the Result-Code AVP 1584 value set to DIAMETER_TIMEOUT. 1586 Note that the larger the value, the more susceptible one is to a 1587 replay attack. However, one does have to take into account the 1588 possibility for clock drift, and the latency involved in the 1589 transmission of the message over the network. The timestamp AVP 1590 SHOULD be updated prior to retransmission. 1592 8.0 IANA Considerations 1594 This document defines a number of assigned numbers to be maintained 1595 by the IANA. This section explains the criteria to be used by the 1596 IANA to assign additional numbers in each of these lists. The 1597 following subsections describe the assignment policy for the 1598 namespaces defined elsewhere in this document. 1600 8.1 AVP Attributes 1602 As defined in section 2.2, AVPs contain vendor ID, attribute and 1603 value fields. For vendor ID value of 0, IANA will maintain a registry 1604 of assigned AVP codes and in some case also values. Attribute 0-254 1605 are assigned from the RADIUS protocol [1], whose attributes are also 1606 maintained through IANA. AVP Codes 256-280 are assigned within this 1607 document. The remaining values are available for assignment through 1608 Designated Expert [12]. 1610 8.2 Command Code AVP Values 1612 As defined in section 2.3.1, the Command Code AVPs (AVP Code 256) 1613 have an associated value maintained by IANA. Values 0-255 are 1614 reserved for backward RADIUS compatibility, and values 256-258 are 1615 defined in this specification. The remaining values are available for 1616 assignment via Designated Expert [12]. 1618 8.3 Extension Identifier Values 1620 As defined in section 2.6.5, the Extension Identifier is used to 1621 identify a specific DIAMETER Extension. All values, other than zero 1622 (0) are available for assignment via Designated Expert [12]. 1624 Note that the DIAMETER protocol is not inteded to be extended for any 1625 purpose. Any extensions added to the protocol MUST ensure that they 1626 fit within the existing framework, and that no changes to the base 1627 protocol are required. 1629 8.4 Result-Code AVP Values 1631 As defined in Section 5.2, the Result Code AVP (AVP Code 268) defines 1632 the values 0-8. All remaining values are available for assignment via 1633 IETF Consensus [12]. 1635 8.5 Integrity-Check-Value AVP Transform Values 1637 Section 7.1.1 defines the Integrity-Check-Value AVP (AVP Code 259) 1638 which contains a field called the Transform. This document reserves 1639 the value 1. All remaining values are available for assignment via 1640 Designated Expert [12]. 1642 8.6 Reboot-Type AVP Values 1644 Section 2.6.3 defines the Reboot-Type AVP (AVP Code 271), which is 1645 used to inform the peer of the cause for the reboot. This document 1646 defines the values 1-3. All remaining values are available for 1647 assignment via Designated Expert [12]. 1649 8.7 AVP Header Bits 1651 There are six remaining reserved bits in the AVP header. Additional 1652 bits should only be assigned via a Standards Action [12]. 1654 9.0 Open Issues 1656 The following are the open issues that SHOULD be addressed in future 1657 versions of the DIAMETER protocol: 1659 - AVPs of type 'Time" are 32 bits in size and contain the a 1660 timestamp consistent with NTP [18]. This field is expected to 1661 expire sometime in 2038. Future investigation SHOULD be done to 1662 determine if a 64 bit time format could be used. 1664 - The fact that the Sender's IP Address is used in the 1665 construction of the Session-Id means that the introduction of 1666 Network Address Translation MAY cause two hosts to represent the 1667 same Session Identifier. This area needs to be investigated 1668 further to be able to support DIAMETER hosts on a private 1669 network. 1671 - Some crypto algorithms are known to have weaknesses if a random 1672 value is not found early within the plaintext, therefore it is 1673 recommended that the Nonce AVP be added early in a message if 1674 possible. More investigation on this subject is needed in order 1675 to determine if there exists any possibility for such attacks. 1677 - When additional hashing transforms are supporting by the 1678 DIAMETER base protocol, there SHOULD be a method to negotiate 1679 the transform to be used. This negotiation MUST NOT be prone to 1680 a bidding down attack to the lowest secure transform. 1682 10.0 DIAMETER protocol related configurable parameters 1683 This section contains the configurable parameters that are found 1684 throughout this document: 1686 Device-Reboot-Ind Timer 1687 This timer is used to determine how long an implementation 1688 should issue another DRI message if no response is received. 1689 Default is 20 seconds. 1691 Device-Watchdog-Ind Timer 1692 This is the timer that determines the period of inactivity that 1693 must occur before a DWI is transmitted to the communicating 1694 peer. Default is 60 seconds, if DWI messages are sent. 1696 Receive Window 1697 The Receive window determines how many unacknowledged DIAMETER 1698 messages MAY be pending with a communicating peer. This is 1699 normally configured to a value that allows the node to 1700 effectively manage its receive buffers. Default is 7. 1702 Retransmission Timer 1703 The retransmission timer is the time period that a node will 1704 retransmit a message if no transport level acknowledgement was 1705 received. Default is 3 seconds. 1707 Maximum Retransmissions 1708 This is the maximum number of times a DIAMETER message will be 1709 retransmitted before it is determined that the communicating 1710 peer is no longer reachable. Default is 3. 1712 Delayed Acknowledgement Timer 1713 This timer is defined in [25]. 1715 Shared Secret 1716 The shared secret is a value that is known by two communicating 1717 peers, and is used to generate the Integrity-Check-Value AVP. 1718 There is no default. 1720 Maximum Age of an outstanding message 1721 Messages older than the maximum age SHOULD be rejected, as 1722 described in section 7.3. The recommended value is 4 seconds. 1724 11.0 Security Considerations 1726 The DIAMETER base protocol requires that two communicating peers 1727 exchange messages in a secure fashion. This document documents two 1728 security methods that can be used. The first requires no security at 1729 the application layer, but rather relies on an underlying security 1730 mechanism, such as IP Security. 1732 When IP Security is not available, or desirable, the DIAMETER 1733 protocol MAY use hop-by-hop security, which requires communicating 1734 peers to share a long-lived secret. Hop-by-Hop security provides 1735 replay protection by requiring that the communicating peers share a 1736 time source, such as an NTP server. 1738 When the DIAMETER protocol is used in an inter-domain network, strong 1739 application level security MAY be required, such as non-repudiation. 1740 This the communicating peers do require this level of security either 1741 for legal or business purposes, the extension defined in [11] MAY be 1742 used. 1744 12.0 References 1746 [1] Rigney, et alia, "RADIUS", RFC-2138, April 1997 1747 [2] Reynolds, Postel, "Assigned Numbers", RFC 1700, October 1994. 1748 [3] Postel, "User Datagram Protocol", RFC 768, August 1980. 1749 [4] Rivest, "The MD5 Message-Digest Algorithm", RFC 1321, April 1750 1992. 1751 [5] Kaufman, Perlman, Speciner, "Network Security: Private 1752 Communications in a Public World", Prentice Hall, March 1995, 1753 ISBN 0-13-061466-1. 1754 [6] Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message 1755 Authentication", RFC 2104, January 1997. 1756 [7] P. Calhoun, W. Bulley, "DIAMETER NASREQ Extension", draft- 1757 calhoun-diameter-nasreq-00.txt (work in progress), December 1758 1999. 1759 [8] Aboba, Beadles "The Network Access Identifier." RFC 2486. 1760 January 1999. 1761 [9] Calhoun, Zorn, Pan, Akhtar, "DIAMETER Framework", draft- 1762 calhoun-diameter-framework-05.txt (work in progress), December 1763 1999. 1764 [10] P. Calhoun, C. Perkins, "DIAMETER Mobile IP Extensions", 1765 draft-calhoun-diameter-mobileip-04.txt (work in progress), 1766 December 1999. 1767 [11] P. Calhoun, W. Bulley, S. Farrell, "DIAMETER Strong Security 1768 Extension", draft-calhoun-diameter-strong-security-00.txt (work 1769 in progress), December 1999. 1770 [12] Narten, Alvestrand,"Guidelines for Writing an IANA 1771 Considerations Section in RFCs", BCP 26, RFC 2434, October 1998 1772 [13] S. Bradner, "Key words for use in RFCs to Indicate Requirement 1773 Levels", BCP 14, RFC 2119, March 1997. 1774 [14] Myers, Ankney, Malpani, Galperin, Adams, "X.509 Internet Public 1775 Key Infrastructure Online Certificate Status Protocol (OCSP)", 1776 RFC 2560, June 1999. 1778 [15] Arkko, Calhoun, Patel, Zorn, "DIAMETER Accounting Extension", 1779 draft-calhoun-diameter-accounting-02.txt (work in progress), 1780 December 1999. 1781 [16] Hinden, Deering, "IP Version 6 Addressing Architecture", RFC 1782 2373, July 1998. 1783 [17] ISI, "Internet Protocol", RFC 791, September 1981. 1784 [18] Mills, "Simple Network Time Protocol (SNTP) Version 4 for IPv4, 1785 IPv6 and OSI, RFC 2030, October 1996. 1786 [19] Housley, Ford, Polk, Solo, "Internet X.509 Public Key 1787 Infrastructure Certificate and CRL Profile", RFC 2459, January 1788 1999. 1789 [20] B. Aboba, G. Zorn, "Criteria for Evaluating Roaming Protocols", 1790 RFC 2477, January 1999. 1791 [21] M. Beadles, "Criteria for Evaluating Network Access Server 1792 Protocols", draft-ietf-nasreq-criteria-03.txt (work in 1793 progress), October 1999. 1794 [22] T. Hiller et al., "Cdma2000 Wireless Data Requirements for 1795 AAA", draft-hiller-cdma2000-AAA-00.txt (work in progress), 1796 October 1999. 1797 [23] S. Glass, S. Jacobs, C. Perkin, "Mobile IP Authentication, 1798 Authorization, and Accounting Requirements", draft-ietf- 1799 mobileip-aaa-reqs-01.txt (work in progress), October 1999. 1800 [24] F. Yergeau, "UTF-8, a transformation format of ISO 10646", RFC 1801 2279, January 1998. 1802 [25] P. Calhoun, A. Rubens, H. Akhtar, E. Guttman, W. Bulley, J. 1803 Haag, "DIAMETER Implementation Guidelines", draft-calhoun- 1804 diameter-impl-guide-00.txt (work in progress), December 1999. 1806 13.0 Acknowledgements 1808 The authors would like to thank Nenad Trifunovic, Tony Johansson and 1809 Pankaj Patel for their participation in the Document Reading Party. 1811 The authors would also like to acknowledge the following people for 1812 their contribution in the development of the DIAMETER protocol: 1814 Bernard Aboba, Jari Arkko, William Bulley, Daniel C. Fox, Lol Grant, 1815 Ignacio Goyret, Nancy Greene, Peter Heitman, Paul Krumviede, Fergal 1816 Ladley, Ryan Moats, Victor Muslin, Kenneth Peirce, Stephen 1817 Farrell,Sumit Vakil, John R. Vollbrecht, Jeff Weisberg and Glen Zorn 1819 14.0 Author's Addresses 1821 Questions about this memo can be directed to: 1823 Pat R. Calhoun 1824 Network and Security Research Center, Sun Laboratories 1825 Sun Microsystems, Inc. 1826 15 Network Circle 1827 Menlo Park, California, 94025 1828 USA 1830 Phone: 1-650-786-7733 1831 Fax: 1-650-786-6445 1832 E-mail: pcalhoun@eng.sun.com 1834 Allan C. Rubens 1835 Tut Systems, Inc. 1836 220 E. Huron, Suite 260 1837 Ann Arbor, MI 48104 1838 USA 1840 Phone: 1-734-995-1697 1841 E-Mail: arubens@tutsys.com 1843 Haseeb Akhtar 1844 Wireless Technology Labs 1845 Nortel Networks 1846 2221 Lakeside Blvd. 1847 Richardson, TX 75082-4399 1848 USA 1850 Phone: 1-972-684-8850 1851 E-Mail: haseeb@nortelnetworks.com 1853 Erik Guttman 1854 Network and Security Research Center, Sun Laboratories 1855 Sun Microsystems, Inc. 1856 15 Network Circle 1857 Menlo Park, California, 94025 1858 USA 1860 Phone: 49-7263-911-701 1861 E-mail: erik.guttman@germany.sun.com 1863 15.0 Full Copyright Statement 1865 Copyright (C) The Internet Society (1999). All Rights Reserved. 1867 This document and translations of it may be copied and furnished 1868 to others, and derivative works that comment on or otherwise 1869 explain it or assist in its implementation may be prepared, copied, 1870 published and distributed, in whole or in part, without 1871 restriction of any kind, provided that the above copyright notice 1872 and this paragraph are included on all such copies and derivative 1873 works. However, this docu- ment itself may not be modified in any 1874 way, such as by removing the copyright notice or references to the 1875 Internet Society or other Inter- net organizations, except as needed 1876 for the purpose of developing Internet standards in which case 1877 the procedures for copyrights defined in the Internet Standards 1878 process must be followed, or as required to translate it into 1879 languages other than English. The limited permis- sions granted 1880 above are perpetual and will not be revoked by the Internet 1881 Society or its successors or assigns. This document and the 1882 information contained herein is provided on an "AS IS" basis and 1883 THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE 1884 DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT 1885 LIMITED TO ANY WAR- RANTY THAT THE USE OF THE INFORMATION HEREIN 1886 WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 1887 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."