Introduction

Within this article, we answer the question - What is Segment Routing (SR)?
But before we do we should first review MPLS, to understand the key benefits that SR brings.

Let's go...

MPLS

Before looking at segment routing it's good to understand traditional MPLS.

With traditional MPLS, a component is known as the FEC (Forward Equivalence Class) table binds/groups a set of packets with similar or identical characteristics (such as IP destination) which may be forwarded the same way; that is, they may be bound to the same MPLS label.[2]

A label distribution protocol (MPLS uses LDP, MPLS-TE uses RSVP-TE) then maps this label through the MPLS core to each of the routers. This is known as the Label Switched Path (LSP).

Traffic is then switched across the MPLS core based on the ingress label. Each node removes the label at ingress and then pushes the new egress label and switches/forwards on accordingly until the traffic exits the MPLS core, where the label is popped (removed), and the IP packet forwarding is resumed.

image4-1-
Figure 1 - MPLS Overivew.

However, there are some disadvantages to this model:

  • Each LSP requires its own label; linear label table size against total LSP/MPLS services.
  • State is held within the network, as label distribution protocols calculate labels on a per node basis, based upon the MPLS service/FEC.

Segment Routing

Segment Routing simplifies MPLS. It provides source-based routing, allowing the source to choose a path, which is then added to the packet header as an ordered list of segments. The rest of the network executes the encoded instructions. All of which is done without keeping any state within the network, i.e label distribution protocols are no longer required.

Therefore SR eliminates some of the downfalls of traditional MPLS, such as

  • Label to LSP inefficiencies.
  • State being held within the network.

SR Segments

First, what is a Segment?

Segments are the identifier for any type of instruction. Each segment is identified by the Segment ID (SID) consisting of a flat unsigned 32-bit integer.[1]

In addition, as we previously mentioned, state is removed from the network. This is because labels are no longer assigned on a per LSP basis, but instead on a per segment basis. As shown below.

Segment Routing is based upon 4 key segments:

IGP Prefix Segment

A pool of global labels are defined (the SRGB aka SR Global Block), each label is then assigned to each node. The IGP (ISIS/OSPF) then signals each of these assigned labels within the SR domain, so that each node has the shortest path within its MPLS table to the given prefix.

For example, based on the diagram, if node 5 is assigned the SRGB label of 16005. If node 1 pushes the label 16005 to the top of its label stack, the packet will be switched via the shortest path (via node 6) to node 5.

image7
Figure 2 - IGP Prefix Segment.[2]

IGP Adjacency Segment

Unlike the IGP prefix segments, the IGP adjacency segments are dynamically generated/assigned. When a node discovers a neighbour, the node will automatically assign a label for the adjacent link. The label format is 1XY – X is the "from" – Y is the "to", as shown below.

image3
Figure 3 - IGP Adjacent Segment. [3]

BGP Prefix Segment

The BGP prefix segment is similar to the IGP prefix in that a global block (SRGB) of labels are defined and assigned to each node, which is then advertised throughout the fabric via an extension to BGP.

Below shows an example, node 1 is assigned label 16001. Any packet with a top label of 16001 will be switched (forwarded) to 16001 aka node 1.

image2
Figure 4 - BGP Prefix Segment.[4]

BGP Peering Segment

The final segment is the BGP peering segment, which as the name suggests 'addresses' the peering links. When the routers within the WAN discover a peer then automatically assign a label, which is assigned to its MPLS data plane. In essence, this is the same as the IGP adjacency segment but applied to BGP.

image5
Figure 5 - BGP Peering Segment.[5]

SDN Controller

The final component to SR is the centralized controller (aka SDN controller). The controller receives the topology and segment information from the network via BGP-LS, in turn resulting in the SDN having a complete global picture of all the networks.

The typical SDN controller used with Segment Routing is PCE (Path Computation Element). PCE computes the segment lists based upon topology information, segment information, traffic demand and network constraints.

The computed resulted is then sent to the network nodes (aka PCC, Path Computation Client). The southbound protocol from the controller (PCE) to the client (PCC) is in fact immaterial. The standard model for PCE is to use PCEP as the southbound protocol. However, there are implementations where OpenFlow, when using white-box devices within the core. An example of this is Lumina's (based upon OpenDayLIght) SD-Core offering.

Application Engineered Routing (AER)

Now, this is where it all comes together - Application Engineered Routing.

With the controller having a complete understanding of the network, the application signals to the controller that would like to send traffic but it has a low-latency requirement.

The controller then computes the best path for the application to take, based on this requirement. In the case of our example below, this results in the lowest latency peer link being used, which in turn dictates the best path through the DC and WAN.

The controller then translates the computed path into a list of segments, which is then added to the ingress packet. As this point there is no state within the network about this path, all of the state is contained within a label stack within the ingress packet.

The packet is then switched through the network, each node that it transverses the relating label is popped from the stack until the packet finally makes it to its destination.

AER-1
Figure 6 - AER [6]

References


  1. "Introduction to Segment Routing - Cisco." https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/seg_routing/configuration/xe-3s/segrt-xe-3s-book/intro-seg-routing.pdf. Accessed 3 Jun. 2018. ↩︎

  2. "Traffic Engineering Using Segment Routing Cisco Canada - SlideShare." 20 May. 2015, https://www.slideshare.net/CiscoCanada/traffic-engineering-using-segment-routing. Accessed 30 May. 2018. ↩︎

  3. "Traffic Engineering Using Segment Routing Cisco Canada - SlideShare." 20 May. 2015, https://www.slideshare.net/CiscoCanada/traffic-engineering-using-segment-routing. Accessed 30 May. 2018. ↩︎

  4. "Traffic Engineering Using Segment Routing Cisco Canada - SlideShare." 20 May. 2015, https://www.slideshare.net/CiscoCanada/traffic-engineering-using-segment-routing. Accessed 30 May. 2018. ↩︎

  5. "Traffic Engineering Using Segment Routing Cisco Canada - SlideShare." 20 May. 2015, https://www.slideshare.net/CiscoCanada/traffic-engineering-using-segment-routing. Accessed 30 May. 2018. ↩︎

  6. "Segment Routing for Service Providers on TechWiseTV - YouTube." 14 Jan. 2016, https://www.youtube.com/watch?v=pDIRXLajRXo. Accessed 4 Jun. 2018. ↩︎

Ready to Master Network Automation? Start Your Journey Today!
Our membership provides:
  • Full deep-dive course library (inc. Batfish, pyATS, Netmiko)
  • Code repositories inc. full course code, scripts and examples
  • 24x7 multi-vendor labs (Arista, Cisco, Juniper)
  • Private online community
  • Live monthly tech sessions
  • Access to tech session library

Join Now ➜