MPLS and Segment Routing · Topic 4 of 4

SR-TE, TI-LFA, PCE, Flex-Algo and SRv6

Describe SR traffic engineering policies, TI-LFA protection, PCE and PCC with PCEP, Flexible Algorithm, SRv6 locators, micro-segments and encapsulation.

  • 6 min
In a nutshell
  • An SR-TE policy is identified by headend, colour and end point.
  • The valid candidate path with the highest preference is used.
  • Automated steering matches a route colour and next hop to a policy.

What it is

These features build on basic segment routing to steer traffic, protect links and move to an IPv6 data plane.

SR-TE steers traffic with a policy. TI-LFA repairs failures quickly. A PCE can compute paths for the whole network.

Flexible Algorithm builds separate topologies, and SRv6 replaces MPLS labels with IPv6 addresses.

HeadendSR policysegment listNetworkfollows segmentsprotected byTI LFApre computed backup

How it works

Each feature adds control to the simple shortest path that a prefix segment gives.

SR-TE policies

An SR-TE policy is identified by the headend, a colour and an end point. It has one or more candidate paths, and the one with the highest preference that is valid is used. Each path holds a segment list.

A path can be explicit, with a fixed list, or dynamic, where the headend or a PCE computes the list from a metric and constraints. Traffic is steered into the policy when a route has the same colour and next hop. This is automated steering.

RP/0/RP0/CPU0:R1(config)# segment-routing
RP/0/RP0/CPU0:R1(config-sr)# traffic-eng
RP/0/RP0/CPU0:R1(config-sr-te)# segment-list SL1
RP/0/RP0/CPU0:R1(config-sr-te-sl)# index 10 mpls label 16002
RP/0/RP0/CPU0:R1(config-sr-te-sl)# index 20 mpls label 16003
RP/0/RP0/CPU0:R1(config-sr-te-sl)# exit
RP/0/RP0/CPU0:R1(config-sr-te)# policy POL1
RP/0/RP0/CPU0:R1(config-sr-te-policy)# color 100 end-point ipv4 3.3.3.3
RP/0/RP0/CPU0:R1(config-sr-te-policy)# candidate-paths
RP/0/RP0/CPU0:R1(config-sr-te-policy-path)# preference 100
RP/0/RP0/CPU0:R1(config-sr-te-policy-path-pref)# explicit segment-list SL1
RP/0/RP0/CPU0:R1# show segment-routing traffic-eng policy

On demand next hop (ODN) goes one step further. A BGP route that carries a colour makes the headend create the policy for that colour when it is needed.

TI-LFA

Topology independent loop free alternate (TI-LFA) gives fast repair in segment routing networks. Each router calculates, in advance, a backup path for each protected link or node. The backup follows the path the traffic would take after the failure.

The repair uses a short segment list, so no tunnel signalling is needed. It can protect against link, node and shared risk failures, and the commonly quoted target for the switch is about 50 ms.

RP/0/RP0/CPU0:R1(config)# router isis CORE
RP/0/RP0/CPU0:R1(config-isis)# interface GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:R1(config-isis-if)# address-family ipv4 unicast
RP/0/RP0/CPU0:R1(config-isis-if-af)# fast-reroute per-prefix
RP/0/RP0/CPU0:R1(config-isis-if-af)# fast-reroute per-prefix ti-lfa

PCE and PCC

A path computation element (PCE) calculates paths with a view of the whole network. The router that needs a path is the path computation client (PCC). They talk using PCEP, which runs over TCP port 4189.

The PCE learns the topology from the IGP, often through BGP link state. A stateful PCE also tracks the policies it knows about, so it can update them when the network changes.

RP/0/RP0/CPU0:R1(config)# segment-routing
RP/0/RP0/CPU0:R1(config-sr)# traffic-eng
RP/0/RP0/CPU0:R1(config-sr-te)# pcc
RP/0/RP0/CPU0:R1(config-sr-te-pcc)# source-address ipv4 1.1.1.1
RP/0/RP0/CPU0:R1(config-sr-te-pcc)# pce address ipv4 2.2.2.2

Flexible Algorithm

Flexible Algorithm lets operators define their own SPF, with numbers from 128 to 255. The definition sets the metric, such as IGP metric or delay, and can exclude links by affinity.

Only routers that take part in the algorithm are used, and each gets its own prefix segment for it. The result is a separate topology, such as a low latency plane, with no per path state. A delay metric needs link delay values from measurement or configuration.

RP/0/RP0/CPU0:R1(config)# router isis CORE
RP/0/RP0/CPU0:R1(config-isis)# flex-algo 128
RP/0/RP0/CPU0:R1(config-isis-flex-algo)# metric-type delay
RP/0/RP0/CPU0:R1(config-isis-flex-algo)# advertise-definition

SRv6

SRv6 uses IPv6 addresses as segments. A locator is an IPv6 prefix that a node owns. Each segment, or function, is made by adding bits to the locator, so the SID is a locator plus a function.

The main functions are End, which is a node segment, and End.X, which is an adjacency segment. Functions such as End.DT4 give services, by decapsulating into a VRF.

RP/0/RP0/CPU0:R1(config)# segment-routing srv6
RP/0/RP0/CPU0:R1(config-srv6)# locators
RP/0/RP0/CPU0:R1(config-srv6-locators)# locator MAIN
RP/0/RP0/CPU0:R1(config-srv6-locator)# prefix fcbb:bb00:1::/48

A micro-segment (uSID) compresses the list. Several short SIDs share one 128 bit address, and each router shifts to the next one as the packet moves. This keeps the packet small.

SRv6 encapsulation

At the ingress, SRv6 wraps the original packet in an outer IPv6 header. The destination address is the first SID.

If the path needs more than one SID, a Segment Routing Header (SRH) holds the rest. A reduced form leaves the first SID out of the header, so the header is smaller.

Interworking gateways

A gateway joins two kinds of domain. An SR-MPLS and SRv6 gateway sits at the border and converts between a label stack and an IPv6 SID list. The LDP mapping server from the last page is a similar bridge for LDP.

SR MPLS domainlabel stackgateway convertsBorder nodeinterworkingSID listSRv6 domainIPv6 SIDs

What to remember for the exam

Eight facts cover most questions on this topic.

  • An SR-TE policy is identified by headend, colour and end point.
  • The valid candidate path with the highest preference is used.
  • Automated steering matches a route colour and next hop to a policy.
  • TI-LFA pre computes a post convergence backup, with a repair target of about 50 ms.
  • PCEP runs over TCP port 4189, between a PCC and a PCE.
  • Flexible Algorithm numbers are 128 to 255, each with its own SPF definition.
  • An SRv6 SID is a locator plus a function, with End and End.X as the main functions.
  • uSID packs several short SIDs into one IPv6 address, and a reduced SRH leaves out the first SID.
Exam tip

ODN and automated steering both rely on colour. If a question mentions colour, think SR-TE.

Common mistakes

These four mistakes appear often.

Expecting a policy to work without a matching colour. Traffic is not steered into it.

Thinking TI-LFA needs RSVP. It uses segment lists and no tunnel signalling.

Confusing PCE and PCC. The PCC is the router that asks, and the PCE is the one that computes.

Treating uSID as a new protocol. It is a compression of SRv6 SIDs.

Watch out

SRv6 and uSID syntax varies between IOS XR releases. Check the release notes before you configure.

Check yourself

Work through these three questions.

  • What identifies an SR-TE policy?

    The headend, the colour and the end point.

  • What is the role of a PCC?

    The PCC is the router that asks the PCE for a path, using PCEP.

  • What is an SRv6 locator?

    It is an IPv6 prefix that a node owns, and each SID is the locator plus a function.

Topic 4 of 4 in MPLS and Segment Routing

Test yourself on MPLS and Segment Routing

The full Cisco CCNP 350-501 SPCOR question bank has 738 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.