Traffic Classification and Quality of Service (QoS) Attributes for Diameter
Extracted elements (29)
RFC 2475 policing behavior (discarding excess packets) is not defined as a distinct Treatment-Action value. Instead, policing is modeled by including an Excess-Treatment AVP within the Filter-Rule with its inner Treatment-Action set to 'drop', keeping the action enumeration minimal while still supporting the full DiffServ behavior model.
RFC 5777 replaces the IPFilterRule and QoSFilterRule AVPs from RFC 3588 and RFC 4005, which relied on free-text syntax based on the FreeBSD ipfw tool. The new design uses native Diameter ABNF-encoded grouped AVPs to provide a uniform, extensible traffic classification mechanism that also supports Ethernet-layer (VLAN, MAC, LLC) matching—a capability absent from the prior approach.
MAC and EUI64 address bit masks should use a contiguous series of N set bits followed by 48-N (or 64-N) clear bits, reflecting OUI and address-block boundaries. Non-contiguous masks such as 0xFF00FF000000 are explicitly noted as invalid; the masks are not intended to impose structure beyond what IEEE intended.
Exactly one Classifier-ID AVP MUST be contained within a Classifier AVP. The Classifier-ID AVP (AVP Code 512, type OctetString) uniquely identifies the classifier within a scope defined by the application.
For the IP-Address-Range AVP (AVP Code 519) to be valid, the IP-Address-Start AVP MUST contain a value less than that of the IP-Address-End AVP.
If more than one instance of the Time-Of-Day-Condition AVP is present in a Filter-Rule AVP, the current time at rule evaluation MUST be within at least one of the time windows specified across those AVPs (OR semantics).
If the Filter-Rule-Precedence AVP is absent from a Filter-Rule AVP, the rules SHOULD be executed in the order in which they appear in the QoS-Resources AVP. Rules with equal precedence MAY be executed in parallel if supported by the Resource Management Function.
If the QoS-Profile-Template AVP is absent from a Filter-Rule and Treatment-Action is 'shape' or 'mark', the default profile is assumed: Vendor-Id=0 (IETF) and QoS-Profile-Id=0, referring to the profile defined in RFC 5624.
The attributes included in the Classifier AVP MUST be consistent with the value of the Protocol AVP (AVP Code 513). If the Protocol AVP is omitted, comparison of the packet's protocol field is irrelevant.
The ETH-Ether-Type AVP (AVP Code 550) MAY be present for DIX or SNAP-at-802.2 frames, but the ETH-SAP AVP MUST NOT also be present in the same ETH-Proto-Type AVP; ETH-Ether-Type and ETH-SAP are mutually exclusive.
The IP-Bit-Mask-Width value in the IP-Address-Mask AVP (AVP Code 522) MUST be valid for the type of IP address (i.e., 0–32 for IPv4, 0–128 for IPv6).
The Timezone-Offset AVP (AVP Code 571) MUST be present if the Timezone-Flag AVP is set to OFFSET (value 2). Its value MUST be in the range from -43200 to 43200 seconds, specifying the UTC offset used for time-window AVPs.
When both the Time-Of-Day-Condition AVP and the Classifier AVP are present in the same Filter-Rule AVP, both the time-of-day condition and the packet classification condition MUST match for the traffic treatment action to be applied (AND semantics).
When S-VID-Start and S-VID-End AVPs are both specified in a VLAN-ID-Range AVP, Ethernet packets without IEEE 802.1ad encapsulation MUST NOT match the classifier. Similarly, when C-VID-Start and C-VID-End are specified, packets without IEEE 802.1ad or IEEE 802.1Q encapsulation MUST NOT match.
Within a From-Spec or To-Spec AVP, if both IP address and MAC address and port AVPs are present together, the packet MUST match all specifications (AND semantics across address families). If multiple AVPs of the same kind appear, the packet MUST match any one (OR semantics within a kind).
The Classifier AVP (AVP Code 511) is a Grouped type specifying how to match a packet; it contains a mandatory Classifier-ID plus optional Protocol, Direction, From-Spec, To-Spec, Diffserv-Code-Point, Fragmentation-Flag, IP-Option, TCP-Option, TCP-Flags, ICMP-Type, and ETH-Option AVPs.
The Direction AVP (AVP Code 514, Enumerated) specifies whether the classifier applies to flows from the managed terminal (IN=0), to the managed terminal (OUT=1), or both (BOTH=2). If absent, the classifier matches both directions.
The Excess-Treatment AVP (AVP Code 577, Grouped) specifies how out-of-profile traffic is handled, carrying its own Treatment-Action, QoS-Profile-Template, and QoS-Parameters. If absent, out-of-profile treatment is left to the node's discretion.
The Filter-Rule AVP (AVP Code 509) is a Grouped type that defines a single condition/action pair, optionally containing Filter-Rule-Precedence, Classifier, Time-Of-Day-Condition, Treatment-Action, QoS-Semantics, QoS-Profile-Template, QoS-Parameters, and Excess-Treatment AVPs.
The QoS-Capability AVP (AVP Code 578, Grouped) contains a list of QoS-Profile-Template AVPs and is used both to announce supported QoS profiles and to negotiate a mutually supported set between Diameter peers. Failed negotiation handling is application- and deployment-specific.
The QoS-Resources AVP (AVP Code 508) is a Grouped type that acts as the top-level container for a complete rule set, encapsulating one or more Filter-Rule AVPs.
The QoS-Semantics AVP (AVP Code 575, Enumerated) provides context for QoS-Profile-Template and QoS-Parameters: QoS-Desired (0, client requests authorization), QoS-Available (1, admission control result), QoS-Delivered (2, reported actual QoS), Minimum-QoS (3, floor constraint), QoS-Authorized (4, server-granted QoS).
The Treatment-Action AVP (AVP Code 572, Enumerated) defines the action associated with a rule's condition: drop (0), shape (1), mark (2), or permit (3). When set to 'shape' or 'mark', the QoS-Parameters AVP SHALL contain relevant QoS parameters.
IANA allocated 71 new AVP codes (508–578) in the Diameter AVP Codes registry under AAA Parameters, covering all AVPs defined in this document from QoS-Resources through QoS-Capability.
IANA created a new QoS-Semantics registry under AAA Parameters with initial values QoS-Desired (0), QoS-Available (1), QoS-Delivered (2), Minimum-QoS (3), and QoS-Authorized (4). New values require Specification Required policy per RFC 5226.
IANA created a new Treatment-Action (Action) registry under AAA Parameters with initial values drop (0), shape (1), mark (2), and permit (3). New values require Specification Required policy per RFC 5226.
Use of the AVPs defined in this document MUST take into consideration the security issues and requirements of the Diameter base protocol as discussed in RFC 3588. No additional security mechanisms beyond those of the base Diameter protocol are specified.
The EUI64-Address AVP (AVP Code 527) is of type OctetString encoded as an 8-octet EUI-64 address as it appears in the frame header. The EUI64-Address-Mask-Pattern AVP (AVP Code 529) is also 8 octets specifying matching bit positions.
The MAC-Address AVP (AVP Code 524) is of type OctetString encoded as a 6-octet MAC-48 address in the order it appears in the frame header. The MAC-Address-Mask-Pattern AVP (AVP Code 526) is also 6 octets specifying which bit positions are used for matching.