The concept of a Segment Routing (SR) policy is described by the IETF draft
draft-ietf-spring-segment-routing-policy. A segment-routing policy
specifies a source-routed path from a head-end router to a network endpoint, and the
traffic flows that are steered to that source-routed path. A segment-routing policy
intended for use by a particular head-end router can be statically configured on that
router or advertised to it in the form of a BGP route.
The following terms are important to understanding the structure of a segment routing
policy and the relationship between one policy and another.
- Segment-routing policy — a policy identified by the tuple of (head-end
router, endpoint and color). Each segment routing policy is associated with a set of
one or more candidate paths, one of which is selected to implement the segment
routing policy and installed in the dataplane. Certain properties of the segment
routing policy come from the currently selected path - for example, binding SID,
segment list(s), and so on.
- Endpoint — the far-end router that is the destination of the
source-routed path. The endpoint may be null (all-zero IP address) if no specific
far-end router is targeted by the policy.
- Color — a property of a segment routing policy that determines the sets
of traffic flows that are steered by the policy.
- Path — a set of one or more segment lists that are explicitly or
statically configured or dynamically signaled. If a path becomes active then traffic
matching the segment routing policy is load-balanced across the segment lists of the
path in an equal, unequal, or weighted distribution. Each path is associated
with:
- a protocol origin (BGP or static)
- a preference value
- a binding SID value
- a validation state (valid or invalid)
- Binding SID — a SID value that opaquely represents a segment routing
policy (or more specifically, its selected path) to upstream routers. BSIDs provide
isolation or decoupling between different source-routed domains and improve overall
network scalability. Usually, all candidate paths of a segment routing policy are
assigned the same BSID.
These concepts are illustrated by the following example.
Suppose there is a network of 7 nodes as shown in Figure 1 and there are two classes of
traffic (blue and green) to be transported between node1 and node 7. There is a
segment routing policy for the blue traffic between node1 and node7 and another
segment routing policy for the green traffic between these same two
nodes.
Figure 1. Network Example with 2 Segment Routing Policies
The two segment routing policies that are involved in this example and the
associated relationships are depicted in Figure 2.
Figure 2. Relationship Between Segment Routing Policies and Paths