Explicit Paths
An explicit candidate path uses the segment list you provide. For other policy fields, see SR Policies.
SR-MPLS
asn: 65000
srPolicy:
pcepSessionAddr: 192.0.2.1
headend: 192.0.2.1
endpoint: 192.0.2.4
name: policy-name
color: 100
candidatePath:
preference: 100
explicit:
segmentList:
- sid: 16003
- sid: 16002
- sid: 16004
pola sr-policy add -f policy.yaml
Each sid is an MPLS label in the range 0–1048575.
SRv6
asn: 65000
srPolicy:
pcepSessionAddr: "2001:db8::1"
headend: "2001:db8::1"
endpoint: "2001:db8::2"
name: policy-name
color: 100
candidatePath:
explicit:
segmentList:
- sid: "2001:db8:1005::"
localAddr: "2001:db8::5"
sidStructure: "32,16,0,80"
- sid: "2001:db8:1006::"
localAddr: "2001:db8::6"
sidStructure: "32,16,0,80"
Each sid is an IPv6 address.
See SRv6 for SID structures and uSID.
A segment list must be entirely SR-MPLS or entirely SRv6.
Segment fields
| Field | Description |
|---|---|
sid | Required unless sidAbsent is set. MPLS label or SRv6 SID. |
localAddr | Optional. Address of the node that owns the SID; used as the Node or Adjacency Identifier (NAI). Without it, no NAI is sent. |
remoteAddr | Optional; requires localAddr. Specifies an adjacency NAI from localAddr to remoteAddr. Both addresses must be the same family. |
localInterfaceId, remoteInterfaceId | Required when localAddr and remoteAddr are IPv6 link-local addresses (both must then be link-local). |
sidStructure | SRv6 only, optional; rejected for SR-MPLS. LBL,LNL,FL,AL: locator block, locator node, function, and argument lengths in bits. Each is 0-255 and the sum is at most 128. |
behavior | SRv6 only, optional; rejected for SR-MPLS. Endpoint behavior code (RFC 8986, RFC 9800), 1-65535, for example 0x0030 for uN. Overrides the derived behavior; 0 or omitted derives it as described below. |
sidAbsent | Optional. Sends the segment without a SID (S flag, RFC 8664 and RFC 9603), so the PCC chooses the SID from the NAI. sid must be omitted. localAddr and dataPlane are required: without a SID, the NAI is the only way to identify the segment, and Pola cannot determine whether it uses SR-MPLS or SRv6. For SRv6, sidStructure is rejected because it describes a SID, and the NAI addresses must be IPv6. |
dataPlane | sr-mpls or srv6. Required with sidAbsent. Otherwise optional, and an error if it contradicts the SID. |
Unless behavior is set, Pola derives the SRv6 behavior: End (or uN with usidMode) when only localAddr is set, and End.X (or uA) when both localAddr and remoteAddr are set.
Without localAddr, the behavior is signaled as opaque.
To let the PCC choose the SID, identify a segment by its NAI alone:
segmentList:
- sidAbsent: true
dataPlane: srv6
localAddr: "2001:db8::5"
remoteAddr: "2001:db8::6"
SID validation
Unless --no-sid-validate is given, polad validates each segment against the TED before sending the policy.
It walks the segment list from the headend:
- A node SID (an SR-MPLS Prefix-SID label or an SRv6 SID) must be advertised by some node, which becomes the current node.
- An Adj-SID or End.X SID must be advertised by the current node; validation then advances to the neighbor on that link.
- If several nodes advertise the same SID (anycast), the current node becomes unknown: subsequent SIDs are checked only for existence in the TED until a node SID advertised by a single node is reached.
- A
sidAbsentsegment is checked by its NAI instead. A node NAI must be a /32 or /128 prefix advertised by some node, which becomes the current node. An adjacency NAI must match a link of the current node: by its interface IDs when both are given, otherwise by its interface addresses; validation then advances to the neighbor on that link. When the current node is unknown, an adjacency NAI that matches a link of a single node advances to that link’s neighbor.
Validation does not check path reachability or loop freedom, and requires the headend address to appear in the TED as a /32 or /128 prefix.
Validation requires an enabled TED that contains at least one node. If the TED is disabled, the request fails with TED_DISABLED; if it is enabled but has no nodes yet, it fails with TED_NOT_SYNCED.
To provision without it, for example when the TED is disabled:
pola sr-policy add -f policy.yaml --no-sid-validate
pola and polad both log a warning when validation is skipped.
Label ranges and the SR-MPLS/SRv6 mix are checked even with --no-sid-validate.
The TED is always required for router-ID endpoints, which are resolved from it.