Ticker

6/recent/ticker-posts

Segment Routing Introduction - Building Blocks

Segment Routing (SR) is new way of routing which is flexible and scalable. SR is based on source routing and allows to create a path by combining segments. The source chooses a path and encodes it in the packet header as an ordered list of segments.

Segment Routing

Each segment is identified by the segment ID (SID) consisting of a flat unsigned 32-bit integer. 


One Segment is equal to one Label.

Segment List = Label Stack.


While we implement SR, the network no longer requires to maintain a per-application and per-flow state. Rather, it obeys the forwarding instructions provided in the packet. The interesting thing to note is that in SR labels are not distributed by LDP or RSVP. Then how the labels are distributed. The IGPs OSPF and ISIS are extended with new sub-TLVs to carry or advertise the labels. For more details regarding these TLVs, kindly read our another important SR article "How Segment Routing Works?"


However, the MPLS forwarding plane/table will remain the same to switch the packet until it reaches the destination using Push, Swap, and PoP operations.


Another important point to learn is that besides the MPLS forwarding plane (or Data Plane), Segment Routing also supports the IPv6 forwarding plane. SR can be applied to the IPv6 architecture with a new type of routing extension header. A segment is encoded as an IPv6 address. An ordered list of segments is encoded as an ordered list of IPv6 addresses in the routing extension header. The segment to process is indicated by a pointer in the routing extension header. The pointer is incremented, after the completion of a segment. 


Using either type of data planes (MPLS or IPv6), SR integrates with the rich multi-service capabilities of MPLS, including Layer 3 VPN (L3VPN), AToM(or VPWS), Virtual Private LAN Service (VPLS), and Ethernet VPN (EVPN).


Each node/router and each link (adjacency) has an associated SID. Node segment identifiers are globally unique and represent the shortest path to a node/router as determined by the IGP. The network administrator allocates a Node ID to each router from a reserved block. On the other hand, an Adjacency SID is locally significant and represents a specific adjacency, such as egress interface, to a neighboring node/router. SR capable nodes/routers automatically generate adjacency identifiers outside of the reserved block of node IDs. In an MPLS network, a SID is encoded as an MPLS label stack entry. SIDs direct the data along a specified path. There are two kinds of segment IDS:


Prefix SID:  A SID that contains an IP address prefix calculated by an IGP in the service provider's core network. Prefix SIDs are globally unique. A prefix segment represents the shortest path (as computed by IGP) to reach a specific prefix.


Important point:Node Segment is a special prefix segment that is bound to the loopback address of a node. It is advertised as an index into the node-specific SR Global Block or SRGB. We will discuss SRGB in detail too.


Adjacency SID: A SID that contains an advertising router’s adjacency to a neighbor. An Adjacency SID is a link between two nodes/routers. Since the adjacency SID is relative to a specific router, it is locally unique.


How Segment Routing Works? -  SR Terminology

SR-MPLS: the instantiation of SR on the MPLS dataplane

SRv6: the instantiation of SR on the IPv6 dataplane.

Segment: an instruction a node executes on the incoming packet (e.g.: forward packet according to shortest path to destination, or, forward packet through a specific interface, or, deliver the packet to a given application/service instance).

SID: a segment identifier. Note that the term SID is commonly used in place of the term Segment, though this is technically imprecise as it overlooks any necessary translation.

SR-MPLS SID: an MPLS label or an index value into an MPLS label space explicitly associated with the segment.

SRv6 SID: an IPv6 address explicitly associated with the segment.

Segment Routing Domain (SR Domain): the set of nodes participating in the source based routing model. These nodes may be connected to the same physical infrastructure (e.g.: a Service Provider's network). They may as well be remotely connected to each other (e.g.: an enterprise VPN or an overlay). If multiple protocol instances are deployed, the SR domain most commonly includes all of the protocol instances in a single SR domain. However, some deployments may wish to sub-divide the network into multiple SR domains, each of which includes one or more protocol instances. It is expected that all nodes in an SR Domain are managed by the same administrative entity.

Active Segment: the segment that MUST be used by the receiving router to process the packet. In the MPLS dataplane it is the top label. In the IPv6 dataplane it is the destination address. [I-D.ietf-6man-segment-routing-header].

PUSH: the instruction consisting of the insertion of a segment at the top of the segment list. In SR-MPLS the top of the segment list is the topmost (outer) label of the label stack. In SRv6, the top of the segment list is represented by the first segment in the Segment Routing Header as defined in [I-D.ietf-6man-segment-routing-header].

NEXT: when the active segment is completed, NEXT is the instruction consisting of the inspection of the next segment. The next segment becomes active. In SR-MPLS, NEXT is implemented as a POP of the top label. In SRv6, NEXT is implemented as the copy of the next segment from the SRH to the Destination Address of the IPv6 header.

CONTINUE: the active segment is not completed and hence remains active. In SR-MPLS, CONTINUE instruction is implemented as a SWAP of the top label. [RFC3031] In SRv6, this is the plain IPv6 forwarding action of a regular IPv6 packet according to its Destination Address.

SR Global Block (SRGB): the set of global segments in the SR Domain. If a node participates in multiple SR domains, there is one SRGB for each SR domain. In SR-MPLS, SRGB is a local property of a node and identifies the set of local labels reserved for global segments. In SR-MPLS, using the same SRGB on all nodes within the SR Domain is strongly recommended. Doing so eases operations and troubleshooting as the same label represents the same global segment at each node. In SRv6, the SRGB is the set of global SRv6 SIDs in the SR Domain.

SR Local Block (SRLB): local property of an SR node. If a node participates in multiple SR domains, there is one SRLB for each SR domain. In SR-MPLS, SRLB is a set of local labels reserved for local segments. In SRv6, SRLB is a set of local IPv6 addresses reserved for local SRv6 SID’s. In a controller-driven network, some controllers or applications MAY use the control plane to discover the available set of local segments.

Global Segment: a segment which is part of the SRGB of the domain. The instruction associated to the segment is defined at the SR Domain level. A topological shortest-path segment to a given destination within an SR domain is a typical example of a global segment.

Local Segment: In SR-MPLS, this is a local label outside the SRGB. It MAY be part of the explicitly advertised SRLB. In SRv6, this can be any IPv6 address i.e., the address MAY be part of the SRGB but used such that it has local significance. The instruction associated to the segment is defined at the node level.

IGP Segment: the generic name for a segment attached to a piece of information advertised by a link-state IGP, e.g. an IGP prefix or an IGP adjacency.

IGP-Prefix Segment: an IGP-Prefix Segment is an IGP Segment representing an IGP prefix. When an IGP-Prefix Segment is global within the SR IGP instance/topology it identifies an instruction to forward the packet along the path computed using the routing algorithm specified in the algorithm field, in the topology and the IGP instance where it is advertised. Also referred to as Prefix Segment.

Prefix SID: the SID of the IGP-Prefix Segment.

IGP-Anycast Segment: an IGP-Anycast Segment is an IGP-Prefix Segment which identify an anycast prefix advertised by a set of routers.

Anycast-SID: the SID of the IGP-Anycast Segment.

IGP-Adjacency Segment: an IGP-Adjacency Segment is an IGP Segment attached to a unidirectional adjacency or a set of unidirectional adjacencies. By default, an IGP-Adjacency Segment is local (unless explicitly advertised otherwise) to the node that advertises it. Also referred to as Adjacency Segment.

Adj-SID: the SID of the IGP-Adjacency Segment.

IGP-Node Segment: an IGP-Node Segment is an IGP-Prefix Segment which identifies a specific router (e.g., a loopback). Also referred to as Node Segment.

Node-SID: the SID of the IGP-Node Segment.

SR Policy: an ordered list of segments. The headend of an SR Policy steers packets onto the SR policy. The list of segments can be specified explicitly in SR-MPLS as a stack of labels and in SRv6 as an ordered list of SRv6 SID’s. Alternatively, the list of segments is computed based on a destination and a set of optimization objective and constraints (e.g., latency, affinity, SRLG, ...). The computation can be local or delegated to a PCE server. An SR policy can be configured by the operator, provisioned via NETCONF or provisioned via PCEP [RFC5440] . An SR policy can be used for traffic-engineering, OAM or FRR reasons.

Segment List Depth: the number of segments of an SR policy. The entity instantiating an SR Policy at a node N should be able to discover the depth insertion capability of the node N. For example, the PCEP SR capability advertisement described in [I-D.ietf-pce-segment-routing] is one means of discovering this capability.

Forwarding Information Base (FIB): the forwarding table of a node.

Click Here for other useful Segment Routing articles

Post a comment

0 Comments