top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

DIAMETER : What all data types are defined in Diameter base protocol ?

+2 votes
807 views
DIAMETER : What all data types are defined in Diameter base protocol ?
posted Mar 13, 2016 by Vikram Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Basic AVP Data Formats
OctetString: The data contains arbitrary data of variable length. Unless otherwise noted, the AVP Length field MUST be set to at least 8 (12 if the 'V' bit is enabled). AVP Values of this type that are not a multiple of four-octets in length is followed by the necessary padding so that the next AVP (if any) will start on a 32-bit boundary.

Integer32: 32 bit signed value, in network byte order. The AVP Length field MUST be set to 12 (16 if the 'V' bit is enabled).

Integer64: 64 bit signed value, in network byte order. The AVP Length field MUST be set to 16 (20 if the 'V' bit is enabled).

Unsigned32: 32 bit unsigned value, in network byte order. The AVP Length field MUST be set to 12 (16 if the 'V' bit is enabled).

Unsigned64: 64 bit unsigned value, in network byte order. The AVP Length field MUST be set to 16 (20 if the 'V' bit is enabled).

Float32: This represents floating point values of single precision as described by [FLOATPOINT]. The 32-bit value is transmitted in network byte order. The AVP Length field MUST be set to 12 (16 if the 'V' bit is enabled).

Float64: This represents floating point values of double precision as described by [FLOATPOINT]. The 64-bit value is transmitted in network byte order. The AVP Length field MUST be set to 16 (20 if the 'V' bit is enabled).

Grouped: The Data field is specified as a sequence of AVPs. Each of these AVPs follows - in the order in which they are specified - including their headers and padding. The AVP Length field is set to 8 (12 if the 'V' bit is enabled) plus the total length of all included AVPs, including their headers and padding. Thus the AVP length field of an AVP of type Grouped is always a multiple of 4.

Derived AVP Data Formats
In addition to using the Basic AVP Data Formats, applications may define data formats derived from the Basic AVP Data Formats. The below AVP Derived Data Formats are commonly used by applications.

Address: The Address format is derived from the OctetString AVP Base Format. It is a discriminated union, representing, for example a 32-bit (IPv4) [IPV4] or 128-bit (IPv6) [IPV6] address, most significant octet first. The first two octets of the Address AVP represents the AddressType, which contains an Address Family defined in [IANAADFAM]. The AddressType is used to discriminate the content and format of the remaining octets.

Time: The Time format is derived from the OctetString AVP Base Format. The string MUST contain four octets, in the same format as the first four bytes are in the NTP timestamp format.

UTF8String: The UTF8String format is derived from the OctetString AVP Base Format. This is a human readable string represented using the ISO/IEC IS 10646-1 character set, encoded as an OctetString using the UTF-8 [UFT8] transformation format described in RFC 2279.

DiameterIdentity: The DiameterIdentity format is derived from the OctetString AVP Base Format.
DiameterIdentity = FQDN

DiameterURI: The DiameterURI MUST follow the Uniform Resource Identifiers (URI) syntax [URI] rules specified below:

  "aaa://" FQDN [ port ] [ transport ] [ protocol ]
                  ; No transport security

  "aaas://" FQDN [ port ] [ transport ] [ protocol ]
                  ; Transport security used

Enumerated: Enumerated is derived from the Integer32 AVP Base Format. The definition contains a list of valid values and their interpretation and is described in the Diameter application introducing the AVP.

IPFilterRule: The IPFilterRule format is derived from the OctetString AVP Base Format. It uses the ASCII charset. Packets may be filtered based on the following information that is associated with it:

     Direction                          (in or out)
     Source and destination IP address  (possibly masked)
     Protocol
     Source and destination port        (lists or ranges)
     TCP flags
     IP fragment flag
     IP options
     ICMP types

QoSFilterRule: The QosFilterRule format is derived from the OctetString AVP Base Format. It uses the ASCII charset. Packets may be marked or metered based on the following information that is associated with it:

     Direction                          (in or out)
     Source and destination IP address  (possibly masked)
     Protocol
     Source and destination port        (lists or ranges)
     DSCP values                        (no mask or range)

Credit: https://tools.ietf.org/html/rfc3588#page-41

answer Mar 14, 2016 by Vimal Kumar Mishra
Similar Questions
+3 votes

I have a query on SCTP guidelines for Diameter base protocol specified in section 2.1.1 of RFC 6733 as :

"A Diameter agent SHOULD use dedicated payload protocol identifiers (PPIDs) for clear text and encrypted SCTP DATA chunks instead of only using the unspecified payload protocol identifier (value 0). For this purpose, two PPID values are allocated: the PPID value 46 is for Diameter messages in clear text SCTP DATA chunks, and the PPID value 47 is for Diameter messages in protected DTLS/SCTP DATA chunks."

RFC doesn't specify the behavior if the connected diameter peer doesn't use PPID as 46/47 for diameter message transport over SCTP or DTLS/SCTP. What if diameter messages are received with PPID set to value other than 46/47 or default 0 value? Should the messages be ignored or respond with error diameter message back to peer with same PPID set ? Please comment on this behavior.

+5 votes

What is the actual Cause of Election state In DIAMETER protocol and what would be the Diameter Behavior after that ?

...