{"id":2057,"date":"2024-11-05T10:49:28","date_gmt":"2024-11-05T09:49:28","guid":{"rendered":"https:\/\/www.quisted.net\/?p=2057"},"modified":"2024-11-05T13:05:03","modified_gmt":"2024-11-05T12:05:03","slug":"mpls-segment-routing-mpls-sr-theory","status":"publish","type":"post","link":"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/","title":{"rendered":"MPLS &#8211; Segment Routing (MPLS-SR) Theory"},"content":{"rendered":"\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2118 size-full\" src=\"https:\/\/www.quisted.net\/wp-content\/uploads\/2024\/11\/Header-1.png\" alt=\"\" width=\"1009\" height=\"333\" srcset=\"https:\/\/www.quisted.net\/wp-content\/uploads\/2024\/11\/Header-1.png 1009w, https:\/\/www.quisted.net\/wp-content\/uploads\/2024\/11\/Header-1-300x99.png 300w, https:\/\/www.quisted.net\/wp-content\/uploads\/2024\/11\/Header-1-768x253.png 768w\" sizes=\"auto, (max-width: 1009px) 100vw, 1009px\" \/><\/p>\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#MPLS_%E2%80%93_Segment_Routing_MPLS-SR\" >MPLS &#8211; Segment Routing (MPLS-SR)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Key_Components_of_MPLS_Segment_Routing\" >Key Components of MPLS Segment Routing<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Segment_Identifiers_SID\" >Segment Identifiers (SID)<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Prefix-Sid\" >Prefix-Sid<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Adjacency_SID\" >Adjacency SID<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Node_SID\" >Node SID<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Anycast_SID\" >Anycast SID<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Binding_SID\" >Binding SID<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Service_SID\" >Service SID<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#End_SID_SRv6-specific\" >End SID (SRv6-specific)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Segment_Routing_Global_Block_SRGB\" >Segment Routing Global Block (SRGB)<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Purpose_of_the_SRGB\" >Purpose of the SRGB<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Defining_the_SRGB_Range\" >Defining the SRGB Range<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#SRGB_and_SID_Calculation\" >SRGB and SID Calculation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Benefits_of_Using_the_SRGB\" >Benefits of Using the SRGB<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#SRGB_in_SR-MPLS_and_SRv6\" >SRGB in SR-MPLS and SRv6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Considerations\" >Considerations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#SRGB_Example\" >SRGB Example<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Source_Routing\" >Source Routing<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#How_Source_Routing_Works\" >How Source Routing Works<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Types_of_Source_Routing\" >Types of Source Routing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Advantages_of_Source_Routing\" >Advantages of Source Routing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Applications_of_Source_Routing\" >Applications of Source Routing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Challenges_of_Source_Routing\" >Challenges of Source Routing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Source_Routing_in_Modern_Networks_with_Segment_Routing\" >Source Routing in Modern Networks with Segment Routing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.quisted.net\/index.php\/2024\/11\/05\/mpls-segment-routing-mpls-sr-theory\/#Example_of_Source_Routing_in_Action\" >Example of Source Routing in Action<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h2><span class=\"ez-toc-section\" id=\"MPLS_%E2%80%93_Segment_Routing_MPLS-SR\"><\/span>MPLS &#8211; Segment Routing (MPLS-SR)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>Multiprotocol Label Switching (MPLS)<\/strong> is a data-forwarding technique that uses labels to route packets along predefined paths, rather than traditional IP routing, which relies on layer-3 addresses. By attaching labels to packets, MPLS allows for high-speed data transfers and efficient traffic engineering, making it a go-to for large-scale carrier and enterprise networks.<\/p>\n<p><strong>Segment Routing (SR)<\/strong>, is an extension for link-state IGPs (OSPF and IS-IS). Traditional MPLS forms Label Switched Paths (LSPs) through label distribution protocols such as <strong>LDP<\/strong> or <strong>RSVP-TE<\/strong>. SR simplifies this by eliminating these protocols and allowing<strong> source-based routing<\/strong>. In SR, the source node attaches a list of <strong>segments<\/strong> (labels) to the packet, guiding it through the desired path without the need for intermediate nodes to compute routing decisions. This shift enables networks to be more adaptable and scalable.<\/p>\n<ul>\n<li id=\"rfcnum\"><a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc8660\" target=\"_blank\" rel=\"noopener\">RFC 8660 &#8211; Segment Routing with the MPLS Data Plane<\/a><\/li>\n<li><a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc8665\" target=\"_blank\" rel=\"noopener\">RFC 8665 &#8211; OSPF Extensions for Segment Routing<\/a><\/li>\n<li><a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc8667\" target=\"_blank\" rel=\"noopener\"><span style=\"color: initial;\">RFC 8667 &#8211; IS-IS Extensions for Segment Routing<\/span><\/a><\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Key_Components_of_MPLS_Segment_Routing\"><\/span>Key Components of MPLS Segment Routing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Segment_Identifiers_SID\"><\/span>Segment Identifiers (SID)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In Segment Routing (SR), Segment Identifiers (SIDs) are essential elements used to steer packets through specific network paths. Segment Routing simplifies network architecture by encoding paths directly in packet headers rather than relying on traditional routing protocols. Different types of SIDs enable various functionalities within SR and support both IPv4 and IPv6 networks, often through SR-MPLS (Segment Routing with MPLS) and SRv6 (Segment Routing over IPv6). Here\u2019s an overview of the main types of SIDs in Segment Routing:<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Prefix-Sid\"><\/span>Prefix-Sid<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Definition<\/strong>: A Prefix SID is associated with a particular network prefix, usually representing a router&#8217;s loopback address or a particular service endpoint.<\/li>\n<li><strong>Functionality<\/strong>: Prefix SIDs route traffic to a specific network destination. When assigned to a router or service node, they guide packets directly to that node.<\/li>\n<li><strong>Applications<\/strong>: Prefix SIDs are used for general traffic engineering by allowing operators to set preferred paths to specific prefixes within a network.<\/li>\n<li><strong>Operation in SR-MPLS and SRv6<\/strong>: In SR-MPLS, Prefix SIDs are represented by an MPLS label. In SRv6, Prefix SIDs are represented by an IPv6 address that directs packets to the node&#8217;s interface.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Adjacency_SID\"><\/span><strong>Adjacency SID<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Definition<\/strong>: An Adjacency SID identifies a specific link or adjacency between two network nodes.<\/li>\n<li><strong>Functionality<\/strong>: Adjacency SIDs route packets over a specific link, enabling more granular control over the exact path taken between routers.<\/li>\n<li><strong>Applications<\/strong>: Used in cases where fine-grained path control is required, like avoiding certain links, load balancing across multiple paths, or enforcing traffic to follow a specific path segment between two nodes.<\/li>\n<li><strong>Operation in SR-MPLS and SRv6<\/strong>: In SR-MPLS, Adjacency SIDs are encoded as MPLS labels assigned to specific interfaces or links. In SRv6, they are represented as IPv6 addresses that correspond to a router\u2019s interface to a specific neighbor.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Node_SID\"><\/span><strong>Node SID<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Definition<\/strong>: A Node SID represents a unique identifier for a particular router or node in the network.<\/li>\n<li><strong>Functionality<\/strong>: Node SIDs identify a specific router as a destination or waypoint, simplifying network topology representation.<\/li>\n<li><strong>Applications<\/strong>: Node SIDs are used in scenarios where traffic engineering does not need to specify particular links but only needs to ensure that packets pass through specific routers.<\/li>\n<li><strong>Operation<\/strong>: In SR-MPLS, a Node SID is encoded as a label that identifies a node&#8217;s loopback address, while in SRv6, it is part of an IPv6 address that targets the router.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Anycast_SID\"><\/span><strong>Anycast SID<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Definition<\/strong>: Anycast SIDs identify a group of nodes that share the same SID, usually for purposes of redundancy or load balancing.<\/li>\n<li><strong>Functionality<\/strong>: They allow packets to be routed to the nearest or best-suited node among a group that shares the Anycast SID.<\/li>\n<li><strong>Applications<\/strong>: Commonly used for load balancing or redundancy between nodes, like in data centers or Points of Presence (PoPs), allowing network operators to use a single SID for traffic routing to the nearest node in a set.<\/li>\n<li><strong>Operation<\/strong>: Both in SR-MPLS and SRv6, Anycast SIDs allow packets to be directed toward one of multiple endpoints that share the same prefix, enhancing reliability and distribution.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Binding_SID\"><\/span><strong>Binding SID<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Definition<\/strong>: A Binding SID represents a specific SR policy and can encapsulate a complex path or a sequence of SIDs.<\/li>\n<li><strong>Functionality<\/strong>: Binding SIDs aggregate multiple SIDs or SR policies into a single, higher-level SID, allowing complex paths to be treated as a single segment.<\/li>\n<li><strong>Applications<\/strong>: This SID type is particularly useful in hierarchical SR deployments or when consolidating multiple paths and policies, as it enables simple traffic redirection based on policies without re-encoding all SIDs in each packet.<\/li>\n<li><strong>Operation<\/strong>: In SR-MPLS, Binding SIDs are implemented as MPLS labels, while in SRv6, they are represented by IPv6 addresses pointing to an SR policy or path.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Service_SID\"><\/span><strong>Service SID<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Definition<\/strong>: A Service SID targets specific services, like VPNs or Network Address Translation (NAT), within the Segment Routing framework.<\/li>\n<li><strong>Functionality<\/strong>: Service SIDs allow operators to enforce that packets follow a path with specialized services before reaching their final destination.<\/li>\n<li><strong>Applications<\/strong>: Service SIDs are valuable for implementing service chaining, directing traffic through specific service points like firewalls or VPN gateways, enhancing service-aware routing within a network.<\/li>\n<li><strong>Operation<\/strong>: Service SIDs differ from Node or Prefix SIDs by directing packets to specific service functions rather than just nodes. In SRv6, for instance, they represent service functions that packets must visit as part of their path.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"End_SID_SRv6-specific\"><\/span><strong>End SID (SRv6-specific)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Definition<\/strong>: In SRv6, an End SID is an IPv6 address that represents a specific endpoint behavior or node action.<\/li>\n<li><strong>Functionality<\/strong>: End SIDs provide instructions for packet processing at an endpoint, such as forwarding packets based on IPv6 routing or applying specific functions.<\/li>\n<li><strong>Applications<\/strong>: Used widely in SRv6 deployments, End SIDs allow for diverse behavior customization at each hop, such as decapsulation or segment list processing.<\/li>\n<li><strong>Operation<\/strong>: In SRv6, End SIDs enable routing and service functions to be performed at each IPv6 address in the SR header, streamlining operations across IPv6 networks.<\/li>\n<\/ul>\n<p>Each SID type serves distinct roles in Segment Routing:<\/p>\n<ul>\n<li><strong>Traffic Engineering<\/strong> (Prefix, Node, Adjacency, Anycast SIDs)<\/li>\n<li><strong>Policy Aggregation<\/strong> (Binding SID)<\/li>\n<li><strong>Service Awareness<\/strong> (Service SID and End SID in SRv6)<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\u00a0<\/li>\n<\/ul>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"Segment_Routing_Global_Block_SRGB\"><\/span><strong>Segment Routing Global Block (SRGB)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The <strong>Segment Routing Global Block (SRGB)<\/strong> is a range of Segment Identifiers (SIDs) reserved for global use within a Segment Routing (SR) domain. SIDs in this block are unique across the network and can be used to identify network elements (like nodes or links) in a consistent manner, making it possible for Segment Routing to steer traffic based on globally known identifiers. Here\u2019s a breakdown of the SRGB and its role in Segment Routing:<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Purpose_of_the_SRGB\"><\/span><strong>Purpose of the SRGB<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Global Identification<\/strong>: The SRGB defines a consistent range of SIDs that can be recognized across the entire network. This consistency simplifies network operations because every router in the SR domain interprets SIDs in the SRGB in the same way.<\/li>\n<li><strong>Simplified Operations<\/strong>: By using the SRGB, network operators avoid having to configure or manage unique local SIDs on each router, since SIDs within the SRGB are globally significant.<\/li>\n<li><strong>Traffic Engineering<\/strong>: The SRGB allows operators to use Prefix SIDs and Node SIDs for traffic engineering, providing deterministic paths across the network by programming a specific set of nodes or links, knowing they are globally recognized.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Defining_the_SRGB_Range\"><\/span><strong>Defining the SRGB Range<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Configurable Range<\/strong>: The SRGB is configurable but is typically within a range of MPLS labels or IPv6 addresses (in SRv6). A common SRGB range in SR-MPLS might be from label 16,000 to 23,999, though operators can adjust it to fit their specific network needs.<\/li>\n<li><strong>Range Size<\/strong>: While an SRGB is usually around 8,000 labels, the size can vary depending on network requirements, such as the number of routers and the complexity of the paths needed.<\/li>\n<li><strong>Reserved for Global SIDs<\/strong>: The SRGB typically contains global SIDs, such as Prefix SIDs and Node SIDs, which correspond to specific routers or network prefixes and are essential for creating global SR policies.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"SRGB_and_SID_Calculation\"><\/span><strong>SRGB and SID Calculation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>SID Values in SRGB<\/strong>: The SIDs in the SRGB are calculated based on the starting label of the SRGB and the Node SID index for each router or network element. For example, if the SRGB starts at label 16,000, then: <span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\">SID=SRGB\u00a0Start+Node\u00a0Index\\text{SID} = \\text{SRGB Start} + \\text{Node Index}<\/span><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"mord text\"><span class=\"mord\">SID<\/span><\/span><span class=\"mrel\">=<\/span><\/span><span class=\"base\"><span class=\"mord text\"><span class=\"mord\">SRGB\u00a0Start<\/span><\/span><span class=\"mbin\">+<\/span><\/span><span class=\"base\"><span class=\"mord text\"><span class=\"mord\">Node\u00a0Index<\/span><\/span><\/span><\/span><\/span><\/span> where the Node Index is a unique integer assigned to each node within the SR domain.<\/li>\n<li><strong>Consistency Across the Network<\/strong>: Since the SRGB range is configured network-wide, the SID calculated using a Node Index will produce the same label value across all routers. This global recognition allows packets to be forwarded correctly by any node in the SR domain.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Benefits_of_Using_the_SRGB\"><\/span><strong>Benefits of Using the SRGB<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Interoperability<\/strong>: The SRGB provides a standardized set of SIDs across a network, making it easier to integrate and manage multi-vendor environments as all devices interpret the SIDs in the same way.<\/li>\n<li><strong>Scalability<\/strong>: By standardizing SIDs within a range, Segment Routing can scale more efficiently, as each router can independently understand and route packets without needing additional lookup tables.<\/li>\n<li><strong>Simplified Network Design<\/strong>: The global nature of SRGB labels means that each router can participate in a path without requiring individual, local configuration, reducing the complexity of network design and operations.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"SRGB_in_SR-MPLS_and_SRv6\"><\/span><strong>SRGB in SR-MPLS and SRv6<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>SR-MPLS<\/strong>: In SR-MPLS, the SRGB is a block of MPLS labels. Each SID within the SRGB corresponds to a specific MPLS label that can be pushed onto packets as they are forwarded through the network.<\/li>\n<li><strong>SRv6<\/strong>: In SRv6, the SRGB concept still applies but works with IPv6 addresses. The SRGB range would then be a reserved range of IPv6 addresses, where each IPv6 SID corresponds to a specific function or router in the network.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Considerations\"><\/span><strong>Considerations<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>SRGB Configuration Consistency<\/strong>: For effective operation, the SRGB range must be configured consistently across all routers in the SR domain. If different routers use different SRGB ranges, it could lead to misinterpretations of SIDs and routing failures.<\/li>\n<li><strong>Coordination in Multi-Domain Networks<\/strong>: In cases where multiple SR domains or Autonomous Systems (ASes) are interconnected, care must be taken to avoid SRGB conflicts. Proper coordination is necessary to ensure that SRGB ranges do not overlap, especially if inter-domain SR policies are implemented.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"SRGB_Example\"><\/span><strong>SRGB Example<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Suppose an SRGB is defined from MPLS label 16,000 to 23,999:<\/p>\n<ul>\n<li><strong>Node A<\/strong>: Assigned Node Index 1, so its Prefix SID = 16,000 + 1 = 16,001<\/li>\n<li><strong>Node B<\/strong>: Assigned Node Index 2, so its Prefix SID = 16,000 + 2 = 16,002<\/li>\n<\/ul>\n<p>If a packet is intended to reach Node B, it would carry the label 16,002, which every router in the SR domain would understand as belonging to Node B, thus forwarding the packet correctly.<\/p>\n<p>The SRGB is a foundational component in Segment Routing, enabling consistent, efficient, and scalable routing by establishing a globally recognized range of SIDs. It reduces operational complexity, improves interoperability, and supports advanced traffic engineering across diverse networks.<\/p>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"Source_Routing\"><\/span>Source Routing<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Source Routing<\/strong> is a network routing technique where the sender (source) of a packet specifies the entire route or a significant part of the path the packet should take to reach its destination. This approach contrasts with traditional routing, where intermediate routers make independent decisions about forwarding based on routing tables and destination addresses. Source routing enables greater control over the paths packets follow, offering benefits in network efficiency, flexibility, and traffic engineering. Here\u2019s an overview of source routing and its applications:<\/p>\n<h4><span class=\"ez-toc-section\" id=\"How_Source_Routing_Works\"><\/span><strong>How Source Routing Works<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>In source routing, the sender embeds routing information directly into the packet header. This information specifies either all the nodes or just key nodes (or hops) the packet should traverse.<\/li>\n<li>Routers along the path simply read the specified instructions, forward the packet to the next designated hop, and do not engage in independent path computation.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Types_of_Source_Routing\"><\/span><strong>Types of Source Routing<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Strict Source Routing<\/strong>: The sender specifies each hop that the packet must take from the source to the destination. Every intermediate node is explicitly defined in the routing information, allowing precise control over the entire path.<\/li>\n<li><strong>Loose Source Routing<\/strong>: The sender specifies only certain key nodes or hops that the packet must pass through. Intermediate routers can use their routing logic to forward the packet between these specified hops, giving some flexibility while still influencing the general path.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Advantages_of_Source_Routing\"><\/span><strong>Advantages of Source Routing<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Enhanced Traffic Engineering<\/strong>: Source routing enables fine-grained control over paths, allowing network operators or applications to steer packets around congested or unreliable links and optimize for specific performance metrics (e.g., latency or bandwidth).<\/li>\n<li><strong>Path Redundancy and Failover<\/strong>: In case of a failure on the primary path, source routing allows the sender to reroute packets through alternative paths, improving network resilience.<\/li>\n<li><strong>Efficient Network Resource Usage<\/strong>: By specifying paths that avoid high-cost or high-delay links, source routing can reduce resource usage, leading to cost savings and better utilization of the available infrastructure.<\/li>\n<li><strong>Support for Multi-Homing and Policy Routing<\/strong>: Source routing enables packets to take paths that align with specific policies or to route through multiple ISPs in a multi-homed setup.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Applications_of_Source_Routing\"><\/span><strong>Applications of Source Routing<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Segment Routing (SR)<\/strong>: Segment Routing is a modern form of source routing where packets are forwarded based on segments (or SIDs). In SR, the source defines a sequence of SIDs representing nodes, services, or instructions, enabling policy-based routing at scale. This approach is commonly used for MPLS networks (SR-MPLS) and IPv6 networks (SRv6).<\/li>\n<li><strong>Network Testing and Diagnostics<\/strong>: Source routing allows network administrators to test specific paths, check link performance, and troubleshoot routing issues by sending packets through predefined paths.<\/li>\n<li><strong>Overlay Networks and VPNs<\/strong>: Source routing supports overlay networks, where packets follow a specified logical path that might differ from the underlying physical network. This capability is beneficial for Virtual Private Networks (VPNs), enabling secure, custom paths for private data.<\/li>\n<li><strong>Load Balancing and Path Diversity<\/strong>: By routing packets over different paths, source routing helps in load balancing across multiple links or paths, spreading traffic to optimize performance and avoid bottlenecks.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Challenges_of_Source_Routing\"><\/span><strong>Challenges of Source Routing<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Scalability<\/strong>: Embedding routing information in packets adds overhead to each packet\u2019s header, potentially making it less scalable than conventional routing, especially in networks with many hops or complex paths.<\/li>\n<li><strong>Security Risks<\/strong>: Source routing can be exploited by malicious actors to bypass security measures, firewalls, or policy-enforced paths. For this reason, it is often restricted or disabled in security-sensitive environments.<\/li>\n<li><strong>Operational Complexity<\/strong>: Managing and implementing source-routed paths, especially in large or dynamic networks, can be complex. Network administrators need precise knowledge of network topology and must carefully manage source-routed paths to avoid issues like loops or unintended routing.<\/li>\n<li><strong>Compatibility<\/strong>: Not all network devices support source routing, especially in older or heterogeneous networks. This can limit its application in mixed environments unless widely supported technologies like Segment Routing are used.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Source_Routing_in_Modern_Networks_with_Segment_Routing\"><\/span><strong>Source Routing in Modern Networks with Segment Routing<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Segment Routing (SR)<\/strong> provides a practical and scalable implementation of source routing in modern IP and MPLS networks. Rather than specifying each hop in detail, Segment Routing uses Segment Identifiers (SIDs) to define paths through specific waypoints or service functions.<\/li>\n<li><strong>Advantages over Traditional Source Routing<\/strong>: Segment Routing mitigates some of the scalability and operational challenges of traditional source routing by encoding compact SIDs, making it feasible for high-speed, large-scale networks.<\/li>\n<li><strong>Traffic Engineering<\/strong>: Segment Routing allows operators to specify detailed paths for traffic engineering, ensuring that critical data follows optimized paths through the network, either to meet performance requirements or align with network policies.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Example_of_Source_Routing_in_Action\"><\/span><strong>Example of Source Routing in Action<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Imagine a network with nodes A, B, C, and D. Normally, a packet might travel from A to D through intermediate nodes chosen by the routers along the way. However, with source routing:<\/p>\n<ul>\n<li><strong>Strict Source Routing<\/strong>: The source specifies that the packet must go from A \u2192 B \u2192 C \u2192 D. Each router on this path forwards the packet according to this exact sequence.<\/li>\n<li><strong>Loose Source Routing<\/strong>: The source specifies the packet must pass through B and D. Routers along the way can choose any path from A to B and from B to D but must ensure the packet reaches these specified nodes.<\/li>\n<\/ul>\n<p>Source routing provides the ability to specify paths explicitly, allowing for enhanced control, reliability, and optimization in network operations. Although it has limitations in scalability and security, its modern implementation through Segment Routing has made source routing a vital tool for advanced traffic engineering and efficient network management.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MPLS &#8211; Segment Routing (MPLS-SR) Multiprotocol Label Switching (MPLS) is a data-forwarding technique that uses labels to route packets along predefined paths, rather than traditional IP routing, which relies on layer-3 addresses. By attaching labels to packets, MPLS allows for high-speed data transfers and efficient traffic engineering, making it a go-to for large-scale carrier and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2118,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[128,127],"tags":[65,142,145,130],"class_list":["post-2057","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mpls","category-sp","tag-mpls","tag-mpls-sr","tag-segment-routing","tag-service-provider"],"_links":{"self":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/2057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/comments?post=2057"}],"version-history":[{"count":64,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/2057\/revisions"}],"predecessor-version":[{"id":2462,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/2057\/revisions\/2462"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/media\/2118"}],"wp:attachment":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/media?parent=2057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/categories?post=2057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/tags?post=2057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}