The Flow Filter TLV carries one or more Flow Specification TLVs. The Flow Specification TLV follows the format of all PCEP TLVs as defined in [
RFC 5440]. However, the Type values are selected from a separate IANA registry (see
Section 10.3) rather than from the common PCEP TLV registry.
Type values are chosen so that there can be commonality with Flow Specifications defined for use with BGP [
RFC 8955] [
RFC 8956]. This is possible because the BGP Flow Spec encoding uses a single octet to encode the type, whereas PCEP uses 2 octets. Thus, the space of values for the Type field is partitioned as shown in
Table 1.
Range |
Description |
0-255 |
Per BGP Flow Spec registry defined by [RFC 8955] and [RFC 8956].
Not to be allocated in this registry.
|
256-65535 |
New PCEP Flow Specifications allocated according to the registry defined in this document.
|
Table 1: Flow Specification TLV Type Ranges
[
RFC 8955] is the reference for the "Flow Spec Component Types" registry and defines the allocations it contains. [
RFC 8956] requested the creation of the "Flow Spec IPv6 Component Types" registry, as well as its initial allocations. If the AFI (in the FLOWSPEC object) is set to IPv4, the range 0..255 is as per "Flow Spec Component Types" [
RFC 8955]; if the AFI is set to IPv6, the range 0..255 is as per "Flow Spec IPv6 Component Types" [
RFC 8956].
The content of the Value field in each TLV is specific to the type/AFI and describes the parameters of the Flow Specification. The definition of the format of many of these Value fields is inherited from BGP specifications. Specifically, the inheritance is from [
RFC 8955] and [
RFC 8956], but it may also be inherited from future BGP specifications.
When multiple Flow Specification TLVs are present in a single Flow Filter TLV, they are combined to produce a more detailed specification of a flow. For examples and rules about how this is achieved, see [
RFC 8955]. As described in [
RFC 8955], where it says "A given component type
MAY (exactly once) be present in the Flow Specification", a Flow Filter TLV
MUST NOT contain more than one Flow Specification TLV of the same type: an implementation that receives a PCEP message with a Flow Filter TLV that contains more than one Flow Specification TLV of the same type
MUST respond with a PCErr message with Error-Type 30 (FlowSpec Error) and Error-value 2 (Malformed FlowSpec) and
MUST NOT install the Flow Specification.
An implementation that receives a PCEP message carrying a Flow Specification TLV with a type value that it does not recognize or support
MUST respond with a PCErr message with Error-Type 30 (FlowSpec Error) and Error-value 1 (Unsupported FlowSpec) and
MUST NOT install the Flow Specification.
When used in other protocols (such as BGP), these Flow Specifications are also associated with actions to indicate how traffic matching the Flow Specification should be treated. In PCEP, however, the only action is to associate the traffic with a tunnel and to forward matching traffic onto that path, so no encoding of an action is needed.
Section 8.7 describes how overlapping Flow Specifications are prioritized and handled.
All Flow Specification TLVs with Types in the range 0 to 255 have values defined for use in BGP (for example, in [
RFC 8955] and [
RFC 8956]) and are set using the BGP encoding but without the type octet (the relevant information is in the Type field of the TLV). The Value field is padded with trailing zeros to achieve 4-byte alignment.
This document defines the following new types:
Type |
Description |
Value Defined In |
256 |
Route Distinguisher |
RFC 9168 |
257 |
IPv4 Multicast Flow |
RFC 9168 |
258 |
IPv6 Multicast Flow |
RFC 9168 |
Table 2: Flow Specification TLV Types Defined in this Document
To allow identification of a VPN in PCEP via a Route Distinguisher (RD) [
RFC 4364], a new TLV, ROUTE-DISTINGUISHER TLV, is defined in this document. A Flow Specification TLV with Type 256 (ROUTE-DISTINGUISHER TLV) carries an RD value, which is used to identify that other flow filter information (for example, an IPv4 destination prefix) is associated with a specific VPN identified by the RD. See
Section 8.6 for further discussion of VPN identification.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type=256 | Length=8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Route Distinguisher |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The format of the RD is as per [
RFC 4364].
Although it may be possible to describe a multicast Flow Specification from the combination of other Flow Specification TLVs with specific values, it is more convenient to use a dedicated Flow Specification TLV. Flow Specification TLVs with Type values 257 and 258 are used to identify a multicast flow for IPv4 and IPv6, respectively. The Value field is encoded as shown in
Figure 4.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |S|G| Src Mask Len | Grp Mask Len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Source Address ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Group multicast Address ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The address fields and address mask lengths of the two Multicast Flow Specification TLVs contain source and group prefixes for matching against packet flows. Note that the two address fields are 32 bits for an IPv4 Multicast Flow and 128 bits for an IPv6 Multicast Flow.
The Reserved field
MUST be set to zero and ignored on receipt.
Two bit flags (S and G) are defined to describe the multicast wildcarding in use. If the S bit is set, then source wildcarding is in use, and the values in the Source Mask Length and Source Address fields
MUST be ignored. If the G bit is set, then group wildcarding is in use, and the values in the Group Mask Length and Group multicast Address fields
MUST be ignored. The G bit
MUST NOT be set unless the S bit is also set: if a Multicast Flow Specification TLV is received with S bit = 0 and G bit = 1, the receiver
MUST respond with a PCErr with Error-Type 30 (FlowSpec Error) and Error-value 2 (Malformed FlowSpec).
The three multicast mappings may be achieved as follows:
-
(S, G) - S bit = 0, G bit = 0, the Source Address and Group multicast Address prefixes are both used to define the multicast flow.
-
(*, G) - S bit = 1, G bit = 0, the Group multicast Address prefix is used to define the multicast flow, but the Source Address prefix is ignored.
-
(*, *) - S bit = 1, G bit = 1, the Source Address and Group multicast Address prefixes are both ignored.