A PCC indicates that it is capable of supporting the head-end functions for SR-TE LSP by including the SR-PCE-CAPABILITY sub-TLV in the Open message that it sends to a PCE. A PCE indicates that it is capable of computing SR-TE paths by including the SR-PCE-CAPABILITY sub-TLV in the Open message that it sends to a PCC.
If a PCEP speaker receives a PATH-SETUP-TYPE-CAPABILITY TLV with a PST list containing PST=1, and supports that path setup type, then it checks for the presence of the SR-PCE-CAPABILITY sub-TLV. If that sub-TLV is absent, then the PCEP speaker
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 12 ("Missing PCE-SR-CAPABILITY sub-TLV") and
MUST then close the PCEP session. If a PCEP speaker receives a PATH-SETUP-TYPE-CAPABILITY TLV with a SR-PCE-CAPABILITY sub-TLV, but the PST list does not contain PST=1, then the PCEP speaker
MUST ignore the SR-PCE-CAPABILITY sub-TLV.
If a PCC sets the N-Flag to 1, then the PCE
MAY send an SR-ERO subobject containing an NAI and no SID (see
Section 5.2). Otherwise, the PCE
MUST NOT send an SR-ERO subobject containing an NAI and no SID.
The number of SIDs that can be imposed on a packet depends on the PCC's data-plane capability. If a PCC sets the X-Flag to 1, then the MSD is not used and
MUST be set to zero. If a PCE receives an SR-PCE-CAPABILITY sub-TLV with the X-Flag set to 1, then it
MUST ignore the MSD field and assume that the sender can impose a SID stack of any depth. If a PCC sets the X-Flag to zero, then it sets the MSD field to the maximum number of SIDs that it can impose on a packet. In this case, the PCC
MUST set the MSD to a number greater than zero. If a PCE receives an SR-PCE-CAPABILITY sub-TLV with the X-Flag and MSD both set to zero, then it
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 21 ("Maximum SID depth must be non-zero") and
MUST then close the PCEP session.
Note that the MSD value exchanged via the SR-PCE-CAPABILITY sub-TLV indicates the SID/label imposition limit for the PCC node. It is anticipated that, in many deployments, the PCCs will have network interfaces that are homogeneous with respect to MSD (that is, each interface has the same MSD). In such cases, having a per-node MSD on the PCEP session is sufficient; the PCE
SHOULD interpret this to mean that all network interfaces on the PCC have the given MSD. However, the PCE
MAY also learn a per-node MSD and a per-interface MSD from the routing protocols, as specified in [
RFC 8491], [
RFC 8476], and [
MSD-BGP]. If the PCE learns the per-node MSD of a PCC from a routing protocol, then it
MUST ignore the per-node MSD value in the SR-PCE-CAPABILITY sub-TLV and use the per-node MSD learned from the routing protocol instead. If the PCE learns the MSD of a network interface on a PCC from a routing protocol, then it
MUST use the per-interface MSD instead of the MSD value in the SR-PCE-CAPABILITY sub-TLV when it computes a path that uses that interface.
Once an SR-capable PCEP session is established with a non-zero MSD value, the corresponding PCE
MUST NOT send SR-TE paths with a number of SIDs exceeding that MSD value. If a PCC needs to modify the MSD value, it
MUST close the PCEP session and re-establish it with the new MSD value. If a PCEP session is established with a non-zero MSD value, and the PCC receives an SR-TE path containing more SIDs than specified in the MSD value, the PCC
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 3 ("Unsupported number of SR-ERO subobjects"). If a PCEP session is established with an MSD value of zero, then the PCC
MAY specify an MSD for each path computation request that it sends to the PCE, by including a "maximum SID depth" METRIC object on the request, as defined in
Section 4.5.
The N-Flag, X-Flag, and MSD value inside the SR-PCE-CAPABILITY sub-TLV are meaningful only in the Open message sent from a PCC to a PCE. As such, a PCE
MUST set the N-Flag to zero, X-Flag to 1, and MSD value to zero in an outbound message to a PCC. Similarly, a PCC
MUST ignore any MSD value received from a PCE. If a PCE receives multiple SR-PCE-CAPABILITY sub-TLVs in an Open message, it processes only the first sub-TLV received.
If a PCC does not support the SR PCE Capability and thus cannot recognize the SR-ERO or SR-RRO subobjects, it will respond according to the rules for a malformed object per [
RFC 5440].
On receiving an SR-ERO, a PCC
MUST validate that the Length field, S bit, F bit, and NT field are consistent, as follows.
-
If NT=0, the F bit MUST be 1, the S bit MUST be zero, and the Length MUST be 8.
-
If NT=1, the F bit MUST be zero. If the S bit is 1, the Length MUST be 8; otherwise, the Length MUST be 12.
-
If NT=2, the F bit MUST be zero. If the S bit is 1, the Length MUST be 20; otherwise, the Length MUST be 24.
-
If NT=3, the F bit MUST be zero. If the S bit is 1, the Length MUST be 12; otherwise, the Length MUST be 16.
-
If NT=4, the F bit MUST be zero. If the S bit is 1, the Length MUST be 36; otherwise, the Length MUST be 40.
-
If NT=5, the F bit MUST be zero. If the S bit is 1, the Length MUST be 20; otherwise, the Length MUST be 24.
-
If NT=6, the F bit MUST be zero. If the S bit is 1, the Length MUST be 44; otherwise, the Length MUST be 48.
If a PCC finds that the NT field, Length field, S bit, and F bit are not consistent, it
MUST consider the entire ERO invalid and
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 11 ("Malformed object").
If a PCC does not recognize or support the value in the NT field, it
MUST consider the entire ERO invalid and
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 13 ("Unsupported NAI Type in the SR-ERO/SR-RRO subobject").
If a PCC receives an SR-ERO subobject in which the S and F bits are both set to 1 (that is, both the SID and NAI are absent), it
MUST consider the entire ERO invalid and send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 6 ("Both SID and NAI are absent in the SR-ERO subobject").
If a PCC receives an SR-ERO subobject in which the S bit is set to 1 and the F bit is set to zero (that is, the SID is absent and the NAI is present), but the PCC does not support NAI resolution, it
MUST consider the entire ERO invalid and send a PCErr message with Error-Type = 4 ("Not supported object") and Error-value = 4 ("Unsupported parameter").
If a PCC receives an SR-ERO subobject in which the S bit is set to 1 and either (or both) the M bit or the C bit is set to 1, it
MUST consider the entire ERO invalid and send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 11 ("Malformed object").
If a PCC receives an SR-ERO subobject in which the S bit is set to zero and the M bit is set to 1, then the subobject contains an MPLS label. The PCC
MAY choose not to accept a label provided by the PCE, based on its local policy. The PCC
MUST NOT accept MPLS label value 3 (Implicit NULL), but it
MAY accept other special-purpose MPLS label values. If the PCC decides not to accept an MPLS label value, it
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 2 ("Bad label value").
If both the M and C bits of an SR-ERO subobject are set to 1, and if a PCC finds an erroneous setting in one or more of the TC, S, and TTL fields, it
MAY overwrite those fields with values chosen according to its own policy. If the PCC does not overwrite them, it
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 4 ("Bad label format").
If the M bit of an SR-ERO subobject is set to zero but the C bit is set to 1, then the PCC
MUST consider the entire ERO invalid and
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 11 ("Malformed object").
If a PCC receives an SR-ERO subobject in which the S bit is set to zero and the M bit is set to zero, then the subobject contains a SID index value. If the SID is an Adj-SID, then the L-Flag
MUST NOT be set. If the L-Flag is set for an Adj-SID, then the PCC
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 11 ("Malformed object").
If a PCC detects that the subobjects of an ERO are a mixture of SR-ERO subobjects and subobjects of other types, then it
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 5 ("ERO mixes SR-ERO subobjects with other subobject types").
The SR-ERO subobjects can be classified according to whether they contain a SID representing an MPLS label value or an index value, or no SID. If a PCC detects that the SR-ERO subobjects are a mixture of more than one of these types, then it
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 20 ("Inconsistent SIDs in SR-ERO/SR-RRO subobjects").
If an ERO specifies a new SR-TE path for an existing LSP and the PCC determines that the ERO contains SR-ERO subobjects that are not valid, then the PCC
MUST NOT update the LSP.
The SR-ERO contains a sequence of subobjects. Each SR-ERO subobject in the sequence identifies a segment that the traffic will be directed to, in the order given. That is, the first subobject identifies the first segment the traffic will be directed to, the second subobject represents the second segment, and so on.
The PCC interprets the SR-ERO by converting it to an MPLS label stack plus a next hop. The PCC sends packets along the segment-routed path by prepending the MPLS label stack onto the packets and sending the resulting, modified packet to the next hop.
The PCC uses a different procedure to do this conversion, depending on the information that the PCE has provided in the subobjects.
-
If the subobjects contain SID index values, then the PCC converts them into the corresponding MPLS labels by following the procedure defined in [RFC 8660].
-
If the subobjects contain NAIs only, the PCC first converts each NAI into a SID index value and then proceeds as above. To convert an NAI to a SID index, the PCC looks for a fully specified prefix or adjacency matching the fields in the NAI. If the PCC finds a matching prefix/adjacency, and the matching prefix/adjacency has a SID associated with it, then the PCC uses that SID. If the PCC cannot find a matching prefix/adjacency, or if the matching prefix/adjacency has no SID associated with it, the PCC behaves as specified in Section 5.2.2.1.
-
If the subobjects contain MPLS labels, then the PCC looks up the offset of the first subobject's label in its SRGB or SRLB. This gives the first SID. The PCC pushes the labels in any remaining subobjects onto the packet (with the final subobject specifying the bottom-of-stack label).
For all cases above, after the PCC has imposed the label stack on the packet, it sends the packet to the segment identified by the first SID.
There are several errors that can occur during the process of converting an SR-ERO sequence to an MPLS label stack and a next hop. The PCC deals with them as follows.
-
If the PCC cannot find a SID index in the SR-DB, it MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 14 ("Unknown SID").
-
If the PCC cannot find an NAI in the SR-DB, it MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 15 ("NAI cannot be resolved to a SID").
-
If the PCC needs to convert a SID into an MPLS label value but cannot find the corresponding router's SRGB in the SR-DB, it MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 16 ("Could not find SRGB").
-
If the PCC finds that a router's SRGB is not large enough for a SID index value, it MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 17 ("SID index exceeds SRGB size").
-
If the PCC needs to convert a SID into an MPLS label value but cannot find the corresponding router's SRLB in the SR-DB, it MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 18 ("Could not find SRLB").
-
If the PCC finds that a router's SRLB is not large enough for a SID index value, it MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 19 ("SID index exceeds SRLB size").
-
If the number of labels in the computed label stack exceeds the maximum number of SIDs that the PCC can impose on the packet, it MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 3 ("Unsupported number of SR-ERO subobjects").
If an ERO specifies a new SR-TE path for an existing LSP and the PCC encounters an error while processing the ERO, then the PCC
MUST NOT update the LSP.
The syntax-checking rules that apply to the SR-RRO subobject are identical to those of the SR-ERO subobject, except as noted below.
If a PCEP speaker receives an SR-RRO subobject in which both SID and NAI are absent, it
MUST consider the entire RRO invalid and send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 7 ("Both SID and NAI are absent in the SR-RRO subobject").
If a PCE detects that the subobjects of an RRO are a mixture of SR-RRO subobjects and subobjects of other types, then it
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 10 ("RRO mixes SR-RRO subobjects with other subobject types").
The SR-RRO subobjects can be classified according to whether they contain a SID representing an MPLS label value or an index value, or no SID. If a PCE detects that the SR-RRO subobjects are a mixture of more than one of these types, then it
MUST send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 20 ("Inconsistent SIDs in SR-ERO / SR-RRO subobjects").