Segment Routing MPLS Guide
Segment Routing MPLS Guide
#CiscoLive
Cisco Webex App
Questions?
Use Cisco Webex App to chat
with the speaker after the session
How
1 Find this session in the Cisco Live Mobile App
2 Click “Join the Discussion”
3 Install the Webex App or go directly to the Webex space Enter your personal notes here
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
Agenda
• Introduction
• The Labels
• MPLS Forwarding
• Ti-LFA
• SR Policy
• On Demand Next Hop (ODN)
• SR Operations, Administration, and Maintenance (OAM)
• Key Takeaways
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Introduction
Stay Up-To-Date
http://www.segment-routing.net/
https://www.linkedin.com/groups/8266623
https://twitter.com/SegmentRouting
https://www.facebook.com/SegmentRouting/
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
Before We Get Started
IPv4 IPv6
IPv4 IPv6 VPWS VPLS eVPN
VPN VPN
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
Why SR?
• No LDP
• But interworking is still possible
• No RSVP-TE
• Load balancing by default Autoroute Announce (AA)
Autoroute Destination
• Simplified forwarding replacing Static route
Access-list Based Forwarding
• Based on color (ABF)
• Automated steering
Path Disjointness (Multi-plane) Point-to-Multipoint delivery with
• Simplified troubleshooting Real-Time Low Latency Services
Tree-SID: Multicast leveraging
mVPN
Egress Peer Engineering (EPE)
• Better protection Bandwidth Optimization
Flex-Algo
On-Demand Next-Hop (ODN) +
Path Disjointness (Multi-plane) Automated steering (AS)
• Many new features Micro-loop avoidance
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
In a Nutshell Source Routing paradigm
Stateless IP fabric
Data Plane
MPLS IPv6 +
IPv6
Label SR
MPLS
(segment labels) (+ SR extension header) Stack O Header
Label (SRH)
Label
R SRH
Control Plane
Path expressed in the packet Data
Path Options
Traffic Engineered path
Dynamic
Explicit
(Optimized CSPF
(expressed in the packet)
computation)
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
The Labels
A Segment
• A segment is an instruction
• with MPLS forwarding: segment = label
16099 Prefix-SID
24001 24001 Loopback0
16007 Label 16099
Segment 1 16007
CE1 PE1 P1 P2 P3 P4
16007 Prefix-SID
Loopback0
Label 16007
Segment 3 16007
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
MPLS
Forwarding
SR-enabled router
SIDs
SR
• Prefix SID
• SID encoded as an index IGP Advertised
• Index represents an offset from SRGB base SRGB as base =
16000 and
• Index globally unique [16000 – 23999] range =
8000
• SRGB may vary across LSRs
Advertised
• SRGB (base and range) advertised with
1 per
Prefix SID as prefix
router capabilities SID index
router 16005 =5
• Adjacency SID
Advertised
• SID encoded as absolute (i.e. not indexed) 1 per Adjacency SID as 24012
(local
value link
24012 MPLS
label)
• Locally significant
• Automatically allocated for each adjacency Adjacency SID
24042
• From label range [24,000-max] used for Adjacency SID
dynamic label allocation 24042
Adjacency SID
24042
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Global Labels
• Recommended same SRGB on all routers
• ‘Node’ label = get the traffic to me, by shortest route, possibly with ECMP
• A packet injected anywhere with top label 16006 will go to R6
my loopback is 10.0.0.6/32
Prefix SID index = 6
16006 16006
P2 P4 P6
16006 16006
P1 16006
16006
my link3 is 10.4.5.4/24
Adjacency SID = 24003
24003
16006
16004
24003 P2 P4 P6
16006
link3
P1
16006
P3 P5
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
No Change in MPLS Forwarding
• MPLS label operations:
• Push, Pop, and Swap
• We have, as before, … Label EXP S TTL
• Special labels {0 - 15}
• PHP (default behavior, also for SR) 20 3 1 8 bits
bits bits bit
• explicit-null for IPv4 and IPv6
• QOS propagation (EXP bits)
• Still uniform model, pipe, and short Layer 2 Layer 3
pipe model MPLS Header
Header Header
• TTL propagation as usual
• Load balancing as before
• FAT label support
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
MPLS Label Operation: Push Label(s)
• Push can occur at ingress of MPLS domain
• MPLS label stack added in CEF (FIB) table
• Top label is SR label; other labels can be service labels (MPLS VPN, BGP-LU, etc.)
R1 R2 R3 R4
IP MPLS
RP/0/0/CPU0:R1# show route 10.100.1.3/32
RP/0/0/CPU0:R1# show cef 10.100.1.3/32
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
MPLS Label Operation: Swap Label(s)
• Swap occurs at intermediate MPLS (P) router
• Only top label is swapped
• MPLS label is swapped in LFIB
• Other labels are not touched (EXP bits, TTL)
• Within one SR segment, top label is swapped with same label
16004 16004 • Top label is swapped
16009 16009
payload payload
R1 R2 R3 R4
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
MPLS Label Operation: Pop Label(s)
• Pop occurs at intermediate MPLS (P) router: top label is removed
• By default on penultimate router of one SR segment
• Label stack could become unlabeled
• Label stack can still have other labels
• e.g. when packet is moved from one SR segment to another SR segment
R1 R2 R3 R4 Segment 2
Segment 1 (label 16004) (label 16009)
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
LFIB • SR Prx or SR Adj
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Ti-LFA
Ti-LFA
• It is LFA+
• No Signaling
• Link or node protection
• Protects IP and MPLS traffic
• Repair path can consist of Global Labels, and Adjacency SID Labels
• Makes LFA Topology Independent (Ti)
• Algorithm, with similar tiebreakers
• Using segments to force traffic over backup path
• 100% coverage
• Protected traffic is on Post-Convergence (PC) path
• Avoiding another path move at regular convergence after failure
• Not available with LFA
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
Ti-LFA Example
• Link State routing provides full topology view
• MPLS label stack can force the traffic to go anywhere
• Without risk of (micro-)loop
Ti-LFA protection always works by pushing
Backup R5
Direct extra MPLS labels
LFA • Any number; rarely more than 2
100 100 • Any combination of Prefix SID or
Adjacancy SID labels
s R1
10 R2 D
primary
10 16002 10
16004
PC 16002
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Single-Segment Example
Ti-LFA Example primary 10.0.0.5/32
RIB IP route, but MPLS forwarding
RP/0/RP0/CPU0:R3# show route 10.0.0.5/32 entries are also protected 10
R3 R5
Prefix-SID 3
Routing entry for 10.0.0.5/32
Known via "isis 1", distance 115, metric 10, labeled SR, type level-2
Installed Apr 26 13:59:29.323 for 3d00h 10 10
Routing Descriptor Blocks backup
10.3.4.4, from 10.0.0.5, via GigabitEthernet0/0/0/2, Backup (TI-LFA)
Repair Node(s): 10.0.0.6 10.0.0.6/32
Route metric is 30
10.3.5.5, from 10.0.0.5, via GigabitEthernet0/0/0/1, Protected 10
Route metric is 10 R4 R6
No advertising protos. Prefix-SID 4 Prefix-SID 6
ISIS
RP/0/RP0/CPU0:R3# show isis fast-reroute 10.0.0.5/32
L2 10.0.0.5/32 [10/115]
via 10.3.5.5, GigabitEthernet0/0/0/1, R5, SRGB Base: 16000, Weight: 0
Backup path: TI-LFA (link), via 10.3.4.4, GigabitEthernet0/0/0/2 R4, SRGB Base: 16000, Weight: 0, Metric: 30 one additional label
P node: R6.00 [10.0.0.6], Label: 16006
Prefix label: 16005
Backup-src: R5.00
FIB
RP/0/RP0/CPU0:R3# show cef 10.0.0.5/32
10.0.0.5/32, version 212, labeled SR
remote adjacency to GigabitEthernet0/0/0/1
Prefix Len 32, traffic index 0, precedence n/a, priority 1
via 10.3.4.4/32, GigabitEthernet0/0/0/2, 17 dependencies, weight 0, class 0, backup (TI-LFA) [flags 0xb00]
path-idx 0 NHID 0x0 [0xf1244a0 0x0]
next hop 10.3.4.4/32, Repair Node(s): 10.0.0.6
repair node one additional label
local label 16005 labels imposed {16006 16005}
via 10.3.5.5/32, GigabitEthernet0/0/0/1, 17 dependencies, weight 0, class 0, protected [flags 0x400]
path-idx 1 bkup-idx 0 NHID 0x0 [0xf29e070 0xf29d0b0]
next hop 10.3.5.5/32
local label 16005 labels imposed {ImplNull}
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
SR Policy
What is an SR Policy?
• Simple, automated, and scalable
No signaling protocol
• No core state: state in the packet header
• Traffic engineered “SR Policy” No bandwidth without
• No headend a-priori configuration: on-demand policy controller
instantiation
• No headend a-priori steering: on-demand-steering Protection is Ti-LFA
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Definition of a SR Policy
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
SR Policy Breakdown
• Candidate path with preference
• Higher preference is preferred, default = 100
• Metric
• Type = IGP, hopcount, latency, TE
• Margin
• Constraints
• Affinity
• Disjoint-path
• Bounds (cumulative metric)
• Segments (protection type or SID algorithm)
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
SR Policy Examples segment-routing
segment-routing segment-routing
traffic-eng
traffic-eng traffic-eng
logging
logging !
policy status
policy status policy policy-1
!
! color 1000 end-point ipv4 10.0.0.2
policy to-PE2-PCE
segment-list explicit-to-ABR-1 candidate-paths
binding-sid mpls 1234
index 5 address ipv4 10.1.3.3 preference 100
color 3000 end-point ipv4 10.0.0.2
index 10 mpls label 16007 dynamic
candidate-paths
index 20 mpls label 16009 pcep
preference 100
index 30 mpls label 16005 !
dynamic
! metric
pcep
policy to-ABR1 type te
!
binding-sid mpls 1000
metric
color 1000 end-point ipv4 10.0.0.5
type igp
candidate-paths
preference 100 segment-routing segment-routing
dynamic traffic-eng traffic-eng
metric policy policy-1 policy POLICY_1
type igp candidate-paths end-point ipv4 1-.1.1.3 color 1
! preference 100 candidate-paths
! dynamic preference 50
! metric dynamic mpls pce
preference 200 sid-limit 5 unprotected
explicit segment-list explicit-to-ABR-1 margin absolute 100 invalidation drop
segment-routing segment-routing
traffic-eng traffic-eng
policy test policy test
candidate-paths candidate-paths
preference 100 preference 100
constraints constraints
disjoint-path group-id 100 type {link | node| srlg | srlg-node} affinity {exclude-any | exclude-group | exclude-item | include-all| include-any}
segment-routing
traffic-eng
policy test
candidate-paths
preference 100
constraints
bounds cumulative type {hopcount | igp | latency | te}
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
Binding-SID
• Head end receives a packet with Binding Segment label and steers packet into SR policy
• Binding-SID is incoming label in LFIB
• Binding SID is automatically associated with every SR policy (overwritten if configured)
segment-routing
Hierarchy of SR
global-block 16000 23999 Policies area 1 area 2
traffic-eng
logging
policy status Shorter SID list and
!
policy to-ABR1 isolation of churn
binding-sid mpls 1000
color 1000 end-point ipv4 10.0.0.5 {16003, 16006, 25000} 16003 16006 16009 16008 16077 16099
candidate-paths
instead of
… Binding-SID = 25000
{16003, 16006, 16009, 16008, 16077, 16099}
16006
{16006,
25000}
Binding-SID = 25000
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 31
Automated Steering
per-destination per-flow
automatically steers service routes on their
automatically steers service routes on their
matching (color + endpoint) SR Policy per
matching (color + endpoint) SR Policy
Forward Class
• Static into policy is possible • Forward Class is internal to router
• COS can be mapped to FC
• Up to 8 ways
segment-routing segment-routing
traffic-eng traffic-eng
policy c100 policy c100
color 100 end-point ipv4 10.0.0.3 Matching color and endpoint color 100 end-point ipv4 10.0.0.3
candidate-paths candidate-paths
preference 100 preference 100
dynamic dynamic
metric metric
type igp type igp
! !
policy c101
color 101 end-point ipv4 10.0.0.3
candidate-paths
preference 100
dynamic
metric
router static
type hopcount
address-family ipv4 unicast
!
10.0.0.12/32 sr-policy srte_c_100_ep_10.0.0.6
policy c1000
color 1000 end-point ipv4 10.0.0.3
candidate-paths
preference 100 Each color is separately
per-flow defined for same
forward-class 0 color 100 endpoint
forward-class 1 color 101
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
On Demand
Next Hop (ODN)
ODN
BGP
Automated SR Policy
PCEP PCE S-RR
Inter-AS & Seamless MPLS: no need for BGP-
LU (RFC3107)
SLA-aware BGP service
PE1 P1 ABR1 ABR2 P2 PE2
P3 ABR3 ABR4 P4
area 1 area 2
• On-demand Next-hop automates and simplifies the service head end configuration
• No SR Policy config on the head end router
• No complex/explicit steering on the service head end for the service
• For example: no autoroute-announce, no static routes
• No need for full path knowledge on head end router is SR-PCE is used
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
ODN Behavior
service service
6
P3 BGP tags prefixes with
Update FIB table
for 10.5.5.1/32 ext comm (color)
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
SR-PCE 2 Computation
SR TE 3DB4 IGP,
5
Path Computation PCEP Path Computation 1 2 6 10
BGP-LS, ...
Element (PCE) Client (PCC)
(controller) (router) 7 8 9
7 8 9
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 36
SR Operations,
Administration,
and Maintenance
(OAM)
SR MPLS OAM
• Ping, traceroute for Prefix SIDs and Adj-SIDs for IGP
ping mpls ipv4 10.1.1.1/32
• Regular MPLS OAM works for SR traceroute mpls ipv4 10.1.1.1/32
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 38
NIL-FEC
• Nil FEC (defined in RFC4379), specifies that no explicit FEC (Control Plane)
is associated with the label
• Typically used to carry labels in reserved range (explicit-null or router alert)
for diagnostic purpose
• Ping and traceroute
• But very powerful tool to check any combination of segments on any path!
• Does not carry any information to identify the intended target
• The packet may be forwarded wrongly somewhere, but still make it
• No control plane validation is performed at originator or responder
• This was an interim solution
• Can force traffic over non-least cost path
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
NIL-FEC Example User specifies:
Outgoing label stack (one or more labels)
Outgoing interface
10 Next-hop interface address
R2 R3
10 10
R1 R4
10 R7
10 1000 Specify outgoing interface and next hop
10
R5 R6
RP/0/0/CPU0:R1# trace mpls nil-fec labels 16006,24000,16007 output interface gigabitEthernet 0/0/0/1 nexthop 10.1.5.5
Tracing MPLS Label Switched Path with Nil FEC with labels [16006,28097,16007], timeout is 2 seconds Specify segments as list of labels in comma
separated list (first label is top label)
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
'L' - labeled output interface, 'B' - unlabeled output interface,
'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label,
'P' - no rx intf label prot, 'p' - premature termination of LSP,
'R' - transit router, 'I' - unknown upstream index,
'X' - unknown return code, 'x' - return code 0
24000 is adj-SID label from R6 to R4
Type escape sequence to abort.
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
Key Takeaways
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 41
Technical Session Surveys
• Attendees who fill out a minimum of four
session surveys and the overall event
survey will get Cisco Live branded socks!
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 42
Pay for Learning with
Cisco Learning Credits
Cisco Learning and Certifications (CLCs) are prepaid training
vouchers redeemed directly
From technology training and team development to Cisco certifications and learning with Cisco.
plans, let us help you empower your business and career. www.cisco.com/go/certs
Here at the event? Visit us at The Learning and Certifications lounge at the World of Solutions
#CiscoLive BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 43
• Visit the Cisco Showcase
for related demos
BRKENT-2005 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public 44
Thank you
#CiscoLive
#CiscoLive