DIAMETER message format

A Diameter message consists of a fixed-length 20-octet header followed by a variable
number of AVPs (Attributed Value Pair). T

 The Version field indicates the Diameter protocol version and is set to 1 for now.
 The Command flags field specifies 4 flags for now:

  •  R flag (stands for Request) shows whether the message is a request or a response. 
  •  P flag (stands for Proxiable) shows if the message can be proxied, relayed or redirected or it must be locally processed. 
  •  E flag (stands for Error) to show if the message contains protocol or semantic errors. When a request message generates a protocol error an answer message is sent back with the ‘‘E’’ bit set in the Diameter header, indicating a protocol error. 
  • T flag to show that a message can potentially be a retransmitted message after a link fail-over or is used to aid removal of duplicate messages. 
  •  r : these flag bits are reserved for future use, and must be set to zero, and ignored by the receiver. 


 The command code value indicates the command associated with the message, such as “credit-control-request ” or “accounting-request”, and so on. Every Diameter message must contain a command code so that the receiver can determine what action it needs to take for each message. The command code is the same of the request and its corresponding answer.


  •  Application ID identifies the specific application the message is used for, such as S6a/S6d between MME and HSS, Gx between PCEF and PCR, etc. 
  • Hop-by-hop identifier field carries an identifier that is used to match request and responses over that hop. The sender of the request must ensure that the identifier is unique over the connection on that hop at any given time. The sender of a response must ensure that the identifier value is the same as that in the corresponding request. . The Hop-by-Hop identifier is normally a monotonically increasing number, whose start value was randomly generated. An answer message that is received with an unknown Hop-byHop Identifier must be discarded. Hop-by-Hop identifier allows a Diameter response to follow the same route as the corresponding Diameter request. 
  • End-to-end identifier is an identifier used to detect duplicate messages. The identifier in a response message must match the identifier in the corresponding request message. The identifier must remain locally unique for at least 4 minutes. This identifier and the OriginHost AVP are used together to detect message duplicates. Note duplicate request could cause duplicate responses but the duplications must not affect any states that were created by the original reques

No comments:

Post a Comment