Académique Documents
Professionnel Documents
Culture Documents
Contact: training@apnic.net
WSDN01_v0.1
Segment Routing
SDN Workshop
WSDN01_v0.1
Overview
• In a nutshell
• Introduction to MPLS
• Segment Routing Introduction
• Architecture
• MPLS data plane
• IPv6 data plane
• BGP EPE
• LDP inter-working
3
In a nutshell
4
SDN architectural framework
Application Application Service
Plane
Northbound Interfaces REST/RESTCONF/NETCONF/XMPP
Open
Southbound Interfaces BGP-LS i2RS PCE-P ForCES IPFIX SNMP Netconf
Flow
Note: designations of north-bound and south-bound are relative to the control plane (“controller”)
5
Segment routing: in a nutshell…
6
MPLS
Introduction
7
Introduction
• MPLS: Multi-Protocol Label Switching
• Tunneling mechanism that supports a number of types of
payloads (hence “multi”)
• Concept of Forwarding Equivalence Class (FEC): groups of
packets that need to be forwarded in an identical manner.
– Each FEC is assigned a label, a 20-bit opaque value
Payload
Transport
LER LSR
9
MPLS label operations
• PUSH:
– Adds a new label to the label stack (which may be empty)
• SWAP:
– Acts on the top (outer) label
– Replaces the top label value with another label value
• POP:
– Removes the top label, exposing either another label or the payload
of the MPLS packet
10
MPLS tables
• NHLFE (Next Hop Label Forwarding Entry):
– Used for forwarding labeled packets
– Contains next-hop, label operation, link-layer encapsulation
information
11
MPLS node types
iLER eLER
12
MPLS VPN node types
P P P
PE PE
P P P
13
BGP/MPLS: service (VPN) label
exchange
P1 P2 P3
BGP-MPLS
CE1 PE1 FEC: VPN-X PE2 CE2
Label: 1234
192.168.1.11 192.168.2.22
P4 P5 Metric: 100
P6
14
LDP: building the ILM
ILM
ILM In- Out- Intf
label label
In- Out- Intf
ILM
label label 300 200 To-P3
In-label Out-label Interface
400 300 To-P2
200 100 To-PE2
192.168.1.1 192.168.1.2 192.168.1.3
ILM
P1 P2 P3 In-label Out-label Interface
100 - Local
LDP LDP
FEC: PE2 FEC: PE2
Label: 300 Label: 200
LDP
CE1 PE1 LDP
FEC: PE2 PE2 CE2
FEC: PE2
Label: 400 LDP Label: 100
192.168.1.11 FEC: PE2 192.168.2.22
Label: 300
ILM
All IGP metrics are equal to 10
In- Out- Intf
label label unless otherwise indicated
500 300 To-P2
15
LDP: traffic forwarding
Swap 400 Swap 300 Swap 200
for 300 for 200 for 100
300 200
1234 1234
192.168.1.1 192.168.1.2 192.168.1.3
Payload Payload
400 100
1234 P1 P2 P3 1234
Payload Payload
Payload Payload
CE1 PE1 PUSH 1234, 400 POP 100, 1234 PE2 CE2
192.168.1.11 192.168.2.22
P4 P5 Metric: 100
P6
16
LDP: building the ILM (with PHP)
ILM
ILM In- Out- Intf
label label
In- Out- Intf
ILM
label label 300 200 To-P3
In-label Out-label Interface
400 300 To-P2
200 - To-PE2
192.168.1.1 192.168.1.2 192.168.1.3
P1 P2 P3
LDP LDP
FEC: PE2 FEC: PE2
Label: 300 Label: 200
LDP
CE1 PE1 LDP
FEC: PE2 PE2 CE2
FEC: PE2
Label: 400 LDP Label: 3
(implicit null)
192.168.1.11 FEC: PE2 192.168.2.22
Label: 300
17
LDP: traffic forwarding (with PHP)
Swap 400 Swap 300
for 300 for 200 Pop 200
300 200
1234 1234
192.168.1.1 192.168.1.2 192.168.1.3
Payload Payload
400
1234 P1 P2 P3 1234
Payload Payload
Payload Payload
192.168.1.11 192.168.2.22
P4 P5 Metric: 100
P6
18
LDP: observations
• LDP forwarding follows the IGP shortest paths
• All nodes install an ILM entry for every LDP destination
• A single LDP label (associated with the destination) is
required to transport packets
• Labels are assigned by the downstream routers i.e. the
label a router uses for ILM lookup is that assigned by the
router itself
• LDP label changes at each hop as labels are locally-
significant
19
RSVP-TE: signaling an LSP (1)
RSVP-TE
Msg: PATH
192.168.1.1 Dest: PE2 192.168.1.2 192.168.1.3
RSVP-TE
Msg: PATH P1 P2 P3
Dest: PE2
RSVP-TE
CE1 PE1 Msg: PATH PE2 CE2
RSVP-TE
Dest: PE2 Msg: PATH
192.168.1.11 Dest: PE2
192.168.2.22
P4 P5 P6 RSVP-TE
Metric: 100 Msg: PATH
Dest: PE2
192.168.1.4 192.168.1.5 192.168.1.6
20
RSVP-TE: signaling an LSP (2)
ILM
ILM In- Out- Intf
label label
In- Out- Intf
label label 666 777 To-P5
555 666 To-P2
ILM
P1 P2 P3 In-label Out-label Interface
ILM
All IGP metrics are equal to 10
In- Out- Intf
label label unless otherwise indicated
777 888 To-P6
21
RSVP-TE: traffic forwarding
Swap 555 Swap 666
for 666 for 777
666
1234
192.168.1.1 192.168.1.2 192.168.1.3
Payload
555
1234 P1 P2 P3
Payload
Payload Payload
777
PUSH 1234,
CE1 PE1 555
1234 POP PE2 CE2
888 999,1234
Payload
192.168.1.11
1234
192.168.2.22
Payload
999
P4 P5 Metric: 100
P6 1234
Payload
192.168.1.4 192.168.1.5 192.168.1.6
Packet mapped
to LSP1 Swap 777 Swap 888
for 888 for 999 All IGP metrics are equal to 10
unless otherwise indicated
22
RSVP-TE: observations
• RSVP-TE allows the construction of arbitrary paths based
on traffic-engineering requirements i.e. longer IGP paths
may end up being preferred
• For two nodes to communicate, RSVP-TE LSPs need to be
signaled in both directions.
• RSVP-TE maintains soft-state which needs to be refreshed
periodically
• RSVP-TE label changes at each hop as labels are locally-
significant
23
MPLS label distribution protocols
Attribute LDP RSVP-TE BGP
Relative Complexity Low High Medium
Application Shortest-path routing Traffic engineering Scaling (seamless
MPLS)
Label allocation (unicast) Multipoint-to-point Point-to-point Point-to-point
Label significance Local Local Local
Multicast mLDP extensions p2mp LSPs N/A
Traffic-engineering No Yes No
Fast Reroute (FRR) Yes (xLFA extensions) Yes Yes (BGP PIC)
FRR coverage Usually <100% via 100% via link and Limited to BGP PIC
xLFA but not node protection
guaranteed
Scaling O(n) O(n^2) O(n)
One LSP per Full-mesh required for One LSP per
destination complete coverage destination
IGP interaction Dependent Required for TE N/A
extensions
24
Challenges
• How do we achieved fine-grained traffic-engineering at
scale ?
– RSVP-TE faces scaling challenges due to it’s connected-oriented
meshing requirement
– LDP does not have traffic-engineering capabilities
25
Segment
Routing
introduction
26
Standardisation
• Defined by the SPRING (Source Packet Routing in
Networking) in working group of the IETF
• The ability for a node to specify a forwarding path, other
than the normal shortest path, that a particular packet will
traverse, benefits a number of network functions:
– Some types of network virtualization, including multi-topology
networks and the partitioning of network resources for VPNs
– Network, link, path, and node protection such as fast reroute
– Network programmability
– OAM techniques
– Simplification and reduction of network signaling components
– Load balancing and traffic engineering
27
Requirements
28
Source Routing
• Segment Routing leverages the concept of Source Routing,
where the source of the packet includes routing information
within the data packet itself.
• Contrast this with hop-by-hop destination-based routing,
where each intermediate point makes a determination of
how a packet needs to be forwarded
• Supported data planes:
– MPLS – without any modification (this section focusses chiefly on the
MPLS data plane)
– IPv6 – with the use of a new IPv6 Routing Header type
29
How it works
• The source determines the path a packet should take and
encodes it within the packet as a sequence of segments or
instructions.
• For routing purposes, segments are topological
instructions:
– node: take shortest path to the node
– adjacency: send packet over the specified adjacency regardless of
IGP metric
30
Use case: IGP-based MPLS tunneling
VPN-X P3 P4 VPN-X
31
Use case: Fast Reroute (FRR)
• Support of FRR on any topology
• Precomputation and setup of backup path without any
additional signaling (other than the regular IGP/BGP
protocols)
• Support of shared risk constraints
• Support of node and link protection
• Support of micro-loop avoidance
32
Use case: traffic engineering
• Loose or strict options
• Bandwidth admission control
• Distributed vs. centralized model
• Disjointness in dual-plane networks
• Egress peer engineering
• Load balancing among non-parallel links (i.e., links connected to
different adjacent neighbors).
• Limiting (scalable, preferably zero) per-service state and signaling on
midpoint and tail-end routers.
• ECMP-awareness
33
• Routing:
– Traffic-engineered. The link from PE5 to
PE6 has a link-metric of 100 . How do we
Sneak preview: force traffic over this link ?
SR-TE example
• Segments Identifiers:
– Node and Adjacency segments
34
Objectives Objectives:
P1 P2 P3
P4 P5 Metric: 100
P6
35
Traffic forwarding
Node P2
Node P5
P5-P6 link
Node P2 Node PE2
Node P5 VPN X
P5-P6 link Payload
Node PE2
VPN X P1 P2 P3
Payload Node P5
P5-P6 link
Payload Payload
PE2 PE2
P4 P5 Metric: 100
P6
36
Architecture
37
Introduction
• Segment Routing (SR) allows a node to steer a packet
through an ordered list of instructions, called segments.
• Segments can represent any type of instruction:
– Topological
– Service
– Application
– Etc.
• Semantics of a segment can be local to an SR node or
global within the SR domain
• Allows steering of flows without requiring per-flow state at
intermediate points in the network
38
Terminology (1)
Segment
an instruction a node executes on an incoming packet. For example:
• 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
Global Segment
The related instruction is supported by all SR-capable routers in the
domain
39
Terminology (2)
Local Segment
The related instruction is only supported by the router originating it
40
Terminology (3)
Segment List
an ordered list of SIDs encoding the ordered set of instructions to be
applied to a packet as it traverses an SR domain. In an MPLS data plane,
the Segment List is instantiated as a stack of labels. In an IPv6 data
plane, it is instantiated as an ordered list of IPv6 addresses.
41
Terminology (4)
SR Global Block (SRGB)
set of local MPLS labels reserved for global segments.
42
Segment list (1)
• An ordered list of SIDs encoding the ordered set of
instructions to be applied to a packet as it traverses an SR
domain. In an MPLS data plane, the Segment List is
instantiated as a stack of labels. In an IPv6 data plane, it is
instantiated as an ordered list of IPv6 addresses.
• The Active Segment that must be used by the receiving
router to process the packet is:
– The top label in the MPLS dataplane
– The destination address of a packet with a Segment Routing Header
(SRH) in the IPv6 dataplane
43
Segment list (2)
• The segment list imposed by the SR node at the edge of
the SR domain can be computed either:
– locally by an operator
– provisioned via NETCONF
– provisioned via PCE-P
44
IGP segments
IGP Segments
Segments identifying information
advertised by an IGP
IGP-Adjacency Segments
IGP-Prefix Segments Local (Adjacency-SID)
Segment representing an IGP
Global (Prefix-SID)
adjacency
Segment representing an IGP Semantics:
prefix • SR header operation: NEXT
• Next-hop: related egress
interface
45
Node SIDs
• Node SIDs are used to identify nodes as destinations
• Globally significant, by default
• Nodes-SIDs are essentially instructions to forward a packet
via the shortest ECMP-aware IGP path to the destination
node
• Advertised by the link-state IGP (OSPF, IS-IS)
• Need to be manually configured
46
Anycast SIDs
• A SID that is advertised by all the members of an Anycast
set
• All routers in the set advertise the same Anycast prefix and
SID value
• Globally significant, by default
• Anycast-SIDs are essentially instructions to forward a
packet via the shortest ECMP-aware IGP path to the
topologically closest member of the Anycast set
• Advertised by the link-state IGP (OSPF, IS-IS)
47
Adjacency SIDs
• Nodes allocate one Adj-SID for each of its adjacencies
– Packets containing such an Adj-SID are then hashed across the different
adjacencies
48
BGP peering segments
An ingress border router of an
AS can steer a flow along a
selected AS, towards a
BGP Peering Segments
selected egress border router • Segments identifying by a BGP EPE (Egress
of the AS and through a Peer Engineering)-enabled node.
specific peer by using BGP • Enable the expression of source-routed inter-
Egress Peer Engineering domain paths
capabilities
49
Segment operations
Operation Segment MPLS data IPv6 data plane
Routing plane
semantic
PUSH Insertion of a PUSHing a new Setting of the first
segment at the top label on to the segment in the
of the segment list label stack IPv6 Segment
Routing Header
NEXT Signals completion POPping of the top Activation of the
of active segment label in the label next segment in
and activation of stack the IPv6 Segment
the next segment Routing Header
in the segment list segment list
CONTINUE Signals that the SWAP of the top Standard IPv6
currently active label forwarding based
segment is not yet on destination
complete and address
needs to remain
active
50
MPLS data plane
51
MPLS data plane
• A segment is encoded as an MPLS label
• An ordered list of segments is encoded as a stack of labels
• The active segment is the one on the top of the label stack
i.e. top MPLS label
• There is zero change to the operation of the standard
MPLS data plane
52
SR Global Block (SRGB)
• Set of local MPLS labels
reserved for global 1048575
segments.
• Network operation is
…
greatly simplified if all
32767
nodes in the SR domain
SRGB
are configured with the 16384
same SRGB.
0
range is 16483-32767
53
• Segment Identifiers:
– Node-SIDs
Label – Allocated as absolute globally-
advertisement significant MPLS label values
with common
SRGB • SRGB:
– Identical SRGB configured on all
nodes
54
SID advertisements (1)
Association of
SID to prefix
advertised by IGP
P1 P2 P3
103 - To-P3
55
SID advertisements (2)
Association of
SID to prefix
advertised by IGP
P1 P2 P3
56
SID advertisements (3)
Association of
SID to prefix
advertised by IGP
P1 P2 P3
101 - To-P1
57
Dealing with different SRGBs
• If nodes in the same SR
domain have different 1048575
…
• In such a case, a globally
32767
unique index is used
SRGB
instead. 16384
Index
• The local label at a given 0
used as
offset
58
Using index values
Example: index value of 100
1048575 1048575
Node A Node B
…
131071
…
SRGB
65536
32767
SRGB
16384
0 0
MPLS Label Space MPLS Label Space
59
• Segment Identifiers:
– Node-SIDs
– Allocated as globally-unique index
Label index values
advertisement
with SRGB • SRGB:
– Different SRGB configured on all
nodes
60
SID advertisements (1)
Association of
SID to prefix
advertised by IGP
P1 P2 P3
203 - To-P3
61
SID advertisements (2)
Association of
SID to prefix
advertised by IGP
P1 P2 P3
62
SID advertisements (3)
Association of
SID to prefix
advertised by IGP
P1 P2 P3
201 - To-P1
63
BGP/MPLS VPN • Routing:
(common to all subsequent – BGP/MPLS VPN label advertisement
use cases)
64
Example: service label exchange
All subsequent examples use
the service label value of 1234
P1 P2 P3
BGP-MPLS
CE1 PE1 FEC: VPN-X PE2 CE2
Label: 1234
192.168.1.11 192.168.2.22
P4 P5 Metric: 100
P6
65
• Routing:
– ECMP-aware shortest path routing
Use case 1:
• Segment Identifiers:
ECMP-aware – Node-SIDs only
– Allocated as absolute globally-
shortest path significant MPLS label values
routing
• SRGB:
– Identical SRGB configured on all nodes
66
Objectives Objectives:
P1 P2 P3
192.168.1.11 192.168.2.22
SID: 111 SID: 222
SRGB: 100-499 SRGB: 100-499
P4 P5 Metric: 100
P6
Use case 1
67
Building the ILM
ILM
ILM
In- Out- Intf
In- Out- Intf
label label
label label
In-label Out-label Interface
222 222 To-P2
222 222 To-P3 ILM
192.168.1.1 192.168.1.2 192.168.1.3 222 222 To-PE2
SID: 101 SID: 102 SID: 103
SRGB: 100-499 SRGB: 100-499 SRGB: 100-499
ILM
In- Out- Intf
label label
P1 P2 P3
222 222 To-P1
ILM
CE1 PE1 In- Out- Intf PE2 CE2
label label
P4 P5 Metric: 100
P6
Use case 1
68
Traffic forwarding
Swap 222 Swap 222 Swap 222
for 222 for 222 for 222
222 222
192.168.1.1 1234 192.168.1.2 1234 192.168.1.3
SID: 101 SID: 102 SID: 103
Payload Payload
222
222
P1 P2 P3 1234
1234
Payload
Payload
Payload Payload
192.168.1.11 192.168.2.22
SID: 111 SID: 222
P4 P5 Metric: 100
P6
Use case 1
Routing Shortest-path
192.168.1.4 192.168.1.5 192.168.1.6
SIDs Node SID: 104 SID: 105 SID: 106
Label Value Absolute
All IGP metrics are equal to 10
SRGB Common
unless otherwise indicated
69
• Routing:
– ECMP-aware shortest path routing
Use case 2:
• Segment Identifiers:
ECMP-aware – Node-SIDs only
– Allocated as index values
shortest path
routing
• SRGB:
– Different SRGB configured on different
nodes
70
Objectives Objectives:
P1 P2 P3
192.168.1.11
SID index: 11
SRGB: 100-199
P4 P5 Metric: 100
P6
Use case 2
71
Building the ILM
ILM
ILM
In- Out- Intf
In- Out- Intf
label label
label label
In-label Out-label Interface
222 322 To-P2
322 422 To-P3 ILM
192.168.1.1 192.168.1.2 192.168.1.3 422 822 To-PE2
SID index: 1 SID index: 2 SID index: 3
SRGB: 200-299 SRGB: 300-399 SRGB: 400-499
ILM
In- Out- Intf
label label
P1 P2 P3
122 222 To-P1
ILM
CE1 PE1 In- Out- Intf PE2 CE2
label label
P4 P5 Metric: 100
P6
Use case 2
72
Traffic forwarding
Swap 222 Swap 322 Swap 422
for 322 for 422 for 822
322 422
192.168.1.1 1234 192.168.1.2 1234 192.168.1.3
SID index: 1 SID index: 2 SID index: 3
Payload Payload
822
222
P1 P2 P3 1234
1234
Payload
Payload
Payload Payload
192.168.1.11 192.168.2.22
SID index: 11 SID index: 22
P4 P5 Metric: 100
P6
Use case 2
Routing Shortest-path
192.168.1.4 192.168.1.5 192.168.1.6
SIDs Node SID index: 4 SID index: 5 SID index: 6
Label Value Index
All IGP metrics are equal to 10
SRGB Different
unless otherwise indicated
73
• Routing:
– Traffic-engineered
• Segment Identifiers:
Use case 3: – Node-SIDs only
– Allocated as absolute globally-
SR-TE significant MPLS label values
• SRGB:
– Identical SRGB configured on all nodes
74
Objectives Objectives:
P1 P2 P3
192.168.1.11 192.168.2.22
SID: 111 SID: 222
SRGB: 100-499 SRGB: 100-499
P4 P5 P6
Use case 3
75
Building the ILM
In-label Out-label Interface
ILM ILM
222 222 To-PE2
ILM In- Out- Intf
label label 111 111 To-P2
In- Out- Intf
label label 105 105 To-P5 101 101 To-P2
102 102 To-P2 192.168.1.1 192.168.1.2 192.168.1.3
SID: 101 SID: 103 102 102 To-P2
SID: 102
SRGB: 100-499 SRGB: 100-499 SRGB: 100-499 103 - Local
ILM
CE1 PE1 Association of In- Out- Intf PE2 CE2
SID to prefix label label
advertised by IGP 222 222 To-PE2
192.168.1.11 192.168.2.22
SID: 111 SID: 222
SRGB: 100-499 SRGB: 100-499
P4 P5 P6
Use case 3
76
Traffic forwarding
102
Swap 102
for 102 105 Pop 102
222
102 192.168.1.1 1234 192.168.1.2 192.168.1.3
105 SID: 101 SID: 102 SID: 103
Payload
222
1234 P1 P2 P3
POP 222,
Payload 1234
P4 P5 P6 Swap 222
Pop 105 for 222
Use case 3
Routing Traffic-engineered
192.168.1.4 192.168.1.5 192.168.1.6
SIDs Node SID: 104 SID: 105 SID: 106
Label Value Absolute
All IGP metrics are equal to 10
SRGB Common
unless otherwise indicated
77
• Routing:
– Traffic-engineered. Difference from use case
3 is the link-metric of 100 from PE5 to PE6.
How do we force traffic over this link ?
• SRGB:
– Identical SRGB configured on all nodes
78
Objectives Objectives:
P1 P2 P3
192.168.1.11
SID: 111
SRGB: 100-499
P4 P5 Metric: 100
P6
Use case 4
79
Building the ILM
In-label Out-label Interface
ILM ILM
222 222 To-PE2
ILM In- Out- Intf
label label 111 111 To-P2
In- Out- Intf
label label 105 105 To-P5 101 101 To-P2
102 102 To-P2 192.168.1.1 192.168.1.2 192.168.1.3
SID: 101 SID: 103 102 102 To-P2
SID: 102
SRGB: 100-499 SRGB: 100-499 SRGB: 100-499 103 - Local
ILM
CE1 PE1 Association of In- Out- Intf PE2 CE2
SID to prefix label label
advertised by IGP 222 222 To-PE2
192.168.1.11 192.168.2.22
SID: 111 SID: 222
SRGB: 100-499 SRGB: 100-499
P4 P5 Metric: 100
P6
Use case 4
1001 - To-P6
80
Traffic forwarding
102
105
Swap 102
for 1022 1001 Pop 102
102 222
105 192.168.1.1 1234 192.168.1.2 192.168.1.3
SID: 101 SID: 102 SID: 103
1001 Payload
222
1234 P1 P2 P3
POP 222,
Payload 105 1234
81
• Routing:
– Traffic-engineered
• Segment Identifiers:
Use case 5: – Node-SIDs and Anycast-SIDs
– Allocated as absolute globally-
SR-TE significant MPLS label values
• SRGB:
– Identical SRGB configured on all nodes
82
Anycast segments
All routers in the anycast set
Anycast-SID allows ECMP- Anycast Group A
advertise the same anycast prefix
192.168.2.1
aware shortest-path forwarding SID: 100 with the same SID value
to the closest node of the
anycast set
A1 A3
192.168.1.11 192.168.1.13
SID: 111 SID: 113
SRGB: 100-499 R1 R3 SRGB: 100-499
A2 A4
PE1 PE3
PE2 PE4
B1 B3
192.168.1.12 192.168.1.14
SID: 112 R2 R4 SID: 114
SRGB: 100-499 SRGB: 100-499
Use case 5 B2 B4
Routing Traffic-engineered
SIDs Node, Anycast Anycast Group B All IGP metrics are equal to 10
192.168.2.2 unless otherwise indicated
Label Value Absolute SID: 200
SRGB Common Identical SRGB on all nodes
83
Objectives Objectives:
Anycast Group A
192.168.2.1
• All traffic from PE1 to
SID: 100 PE3 should traverse
the top plane
A1 A3
192.168.1.11 192.168.1.13
SID: 111 SID: 113
SRGB: 100-499 R1 R3 SRGB: 100-499
A2 A4
PE1 PE3
PE2 PE4
B1 B3
192.168.1.12 192.168.1.14
SID: 112 R2 R4 SID: 114
SRGB: 100-499 SRGB: 100-499
Use case 5 B2 B4
Routing Traffic-engineered
SIDs Node, Anycast Anycast Group B All IGP metrics are equal to 10
192.168.2.2 unless otherwise indicated
Label Value Absolute SID: 200
SRGB Common Identical SRGB on all nodes
84
Traffic forwarding
100 113 PE1 forces packets destined
113 Swap
Pop 1234 113 for PE3 to go via Anycast
100 100 113 for
Swap 1234 Payload 113 1234 Group A
113 Swap
100 for Payload 113 for
1234 Payload 113
100 113
Payload A1 A3 1234
192.168.1.11 Payload 192.168.1.13
SID: 111 SID: 113
SRGB: 100-499 R1 R3 SRGB: 100-499
PUSH POP
1234, A2 A4 113,
113, PE1 PE3 1234
100
PE2 PE4
B1 B3
192.168.1.12 192.168.1.14
SID: 112 R2 R4 SID: 114
SRGB: 100-499 SRGB: 100-499
Use case 5 B2 B4
Routing Traffic-engineered
SIDs Node, Anycast Anycast Group B All IGP metrics are equal to 10
192.168.2.2 unless otherwise indicated
Label Value Absolute SID: 200
SRGB Common Identical SRGB on all nodes
85
IPv6 data plane
86
IPv6 data plane
• Requires a new type of Routing Header
• A segment is encoded as an IPv6 address (prefix-SID is the
prefix itself). SRv6 Segment (abbreviated as SRv6-SID) is an
128-bit value
• An ordered list of segments is encoded as an ordered list of IPv6
addresses in the routing header
• The active segment is indicated by the Destination Address (DA)
of the packet. The DA of the packet changes at each segment
completion. The final DA of the packet is encoded as the last
segment of the path
• The next active segment is indicated by a pointer in the new
routing header
87
Segment Routing Header (SRH)
32 bits
last entry:
- index of last element of
the segment list
flags:
- P: protected, set when
packet has been
rerouted through an FRR
segment list[n] (128 bits IPv6 address) mechanism
- O: set for OAM packets
- A: alert for presence
of TLV objects
- H: HMAC is present if
optional TLVs set
88
Segment Routing Header (SRH)
• The SRH is added to the packet at its source, either:
– At the node originating the packet (host, server)
– At the ingress mode of an SR domain where the ingress node
receives an IPv6 packet and encapsulates it into an outer IPv6
header followed by a Segment Routing Header
– The source address of the packet is the ingress node
– The destination address is set as the first segment of the path
– The last segment of the path is the egress node of the SR domain
89
Creating the SRH
• The source SR node does the following:
90
Handling the SRH
• At each segment of the SRH, the following operations take
place:
91
BGP Egress Peer
Engineering
(EPE)
92
BGP Egress Peer Engineering
93
SR BGP-EPE
• Segment Routing enables a centralised (SDN) controller to
program any egress peer selection policy at ingress border
routers or at hosts within the domain:
– Solution is called BGP Egress Peer Engineering (BGP-EPE)
94
BGP peering segments
An ingress border router of an
AS can steer a flow along a
selected AS, towards a
BGP Peering Segments
selected egress border router • Segments identifying by a BGP EPE (Egress
of the AS and through a Peer Engineering)-enabled node.
specific peer by using BGP • Enable the expression of source-routed inter-
Egress Peer Engineering domain paths
capabilities
95
• Routing:
– Traffic-engineered
96
BGP-EPE network
BGP EPE
Controller
Node-
SID: 32 B D G
AS2
L/8
A AS4
AS1 K/8
Node-
SID: 16 Node- C E
SID: 64
AS3 K
97
BGP-EPE Segments
BGP-LS NLRIs
corresponding to
the BGP-EPE BGP EPE
segments Controller
Node-
SID: 32 B D G
AS2
L/8
A AS4
AS1 K/8
Node-
SID: 16 Node- C E
SID: 64
C’s ILM
AS3 K
In Op Out intf
Label
F
1012 Pop Link to D
1022 Pop Link to E
1032 Pop Upper link to F
Peer Node Segments Peer Adj Segments Peer Set Segments 1042 Pop Lower link to F
BGP Peering D 1012 Upper link to F 1032 E, F 1060 1052 Pop Load balance on any
segments E 1022 Lower link to F 1042 link to F
allocated by PE C
F 1052 1060 Pop Load balance on any
link to E or F
98
BGP-LS advertisements
BGP-LS NLRIs
corresponding to
the BGP-EPE BGP EPE
segments Controller
Descriptors:
Node: BGP-router-ID(C), AS1
Peer: BGP-router-ID(D), AS2
Link: IP address of C’s link to D, IP
address of D’s link to C
99
SR BGP-EPE input policy
100
Input policy programming
Input policy configured with SR-TE tunnel
+steering policy via PCE-P/Netconf BGP EPE
Controller
Node-
SID: 32 B D G
AS2
L/8
A AS4
AS1 K/8
Node-
SID: 16 Node- C E
SID: 64
C’s ILM
AS3 K
In Op Out intf
Label
F
1012 Pop Link to D
1022 Pop Link to E
1032 Pop Upper link to F
Example input policy: route all traffic to L/8 via egress border router C’s 1042 Pop Lower link to F
lower link to peer F
1052 Pop Load balance on any
SR-TE tunnel TE1: push {1042, 64} link to F
ip route L/8 next-hop TE1 1060 Pop Load balance on any
link to E or F
101
Traffic flow
BGP EPE
Controller
PUSH 64 Node-
1042,
SID: 32 B D G
64
1042
Payload
AS2
L/8
A AS4
AS1 K/8
Node-
SID: 16 Node- C E
SID: 64
Pop 64,
AS3 K
1042
Payload F
102
Interworking
with LDP
103
Distributing SR labels in LDP
– create LDP bindings for each Prefix-SID and Node-SID learned in the
SR domain
104
Segment Routing Mapping Server (1)
• Segment Routing Mapping Server (SRMS):
– SR-capable router that advertises mappings between prefixes and
labels for prefixes that it does now own itself.
– That is, the SRMS advertises prefix-to-SID mappings on behalf of
non-SR-capable routers.
– Control-plane function only; the SRMS is not in the data path and can
be located anywhere
– Multiple SRMSs can be used for redundancy
– Requires the use of SR IGP extensions
105
Segment Routing Mapping Server (2)
– create LDP bindings for each Prefix-SID and Node-SID learned in the
SR domain
106
• Routing:
– Traffic-engineered
• Segment Identifiers:
Use case: – Node-SIDs
– Allocated as absolute globally-
SR-TE significant MPLS label values
• SRGB:
– Identical SRGB configured on all nodes
107
Mixed-LDP/SR network
SID: 102
SRGB: 100-200
PE2 PE4
SR-only
108
LDP to SR direction: label distribution
ILM
SID: 102 In-label Out-Label Intf
SRGB: 100-200
801 701 To-P7
PE1 P5 P6 P7 P8 PE3
SID: 106
SID: 101 SID: 105 SRGB: LDP FECs
SRGB: SRGB: 100-200 advertised
100-200 100-200 SR-only
LDP labels
allocated by P7 ILM LDP-only
109
LDP to SR direction: traffic flow
SID: 102
SRGB: 100-200
POP 101,
1234
PE1 P5 P6 P7 P8 PE3
101 SID: 106 701 801
SID: 101 SID: 105 101 SRGB:
SRGB: 1234 SRGB: 100-200 1234
100-200 100-200 1234 1234 SR-only
Payload Payload Payload Payload
SR domain LDP domain
SR & LDP
LDP-only
110
SR to LDP direction: label distribution
ILM ILM
In-label Out-Label Intf In-label Out-Label Intf
SID: 102
SRGB: 100-200 103 103 To-P7 803 303 To-PE3
Configured as SR
PE2 Mapping Server PE4
(SRMS)
PE1 P5 P6 P7 P8 PE3
SID: 106
SID: 101 SID: 105 SRGB: LDP LDP
SRGB: SRGB: 100-200 FEC: PE3 FEC: PE3
100-200 100-200 SR-only
Label: 803 Label: 303
SIDs advertised
by P5 ILM LDP-only
111
SR to LDP direction: traffic flow
SID: 102
SRGB: 100-200
PUSH
1234, 103
PE1 P5 P6 P7 P8 PE3
103 SID: 106 803 303
SID: 101 SID: 105 103 SRGB:
SRGB: 1234 SRGB: 100-200 1234
100-200 100-200 1234 1234 SR-only
Payload Payload Payload Payload
SR domain LDP domain
SR & LDP
LDP-only
112
IGP extensions
113
OSPFv2: SR capabilities
• An OSPFv2 router’s SR capabilities are advertised in the Router
Information Opaque LSA (RFC7770)
SR-Algorithm TLV SID/Label Range TLV
Used within the Router Information Opaque Used within the Router Information Opaque
LSA to advertise the supported algorithms LSA to advertise the SRGB
32 bits 32 bits
SID/Label Sub-TLV
Used to advertise the SID or label value
32 bits
type length
SID/Label
114
OSPFv2: Extended Prefix Opaque LSA
115
OSPFv2: Extended Prefix TLV
sub-TLVs:
- E.g. OSPF2 Prefix-SID sub-TLV
116
OSPFv2: Prefix SID sub-TLV
flags:
Prefix-SID sub-TLV - NP: No-PHP
Sub-TLV of the OSPF Extended Prefix TLV (RFC7684) - M: Mapping Server
- E-Flag: Explicit-Null
32 bits - V: if set, SID is an absolute value
- L: set for local significance
type length
flags reserved MT-ID algorithm MT:
SID/Index/Label (variable) - Multi-Topology ID
algorithm:
Flags - 0: SPF
- 1: Strict SPF
NP M E V L
117
OSPFv2: Extended Prefix Range TLV
Flags
IA
118
OSPFv2: Extended Link Opaque LSA
119
OSPFv2: Extended Link TLV
120
OSPFv2: Adjacency SID sub-TLV
weight:
Flags - used for load-balancing purposes
B V L G P
121
ISIS: SR capabilities
• An ISIS router’s SR capabilities are advertised in the IS-IS Router
Capability TLV-242
SID/Label Sub-TLV
Used to advertise the SID or label value
32 bits
type length
SID/Label
122
IS-IS: Prefix SID sub-TLV
Prefix-SID sub-TLV
• Carries an IGP-Prefix-SID
flags:
• Can be present in TLV-135,235,236,237,Binding- - R: Re-advertisement flag, prefix
TLV has been propagated from another
level
32 bits
- N: set for Node-SID
type length flags algorithm - P: no PHP if set
SID/Index/Label (variable) - E-Flag: Explicit-Null
- V: if set, SID is an absolute value
- L: set for local significance
Flags algorithm:
R N P E V L - 0: SPF
- 1: Strict SPF
123
IS-IS: SID/Label Binding TLV
Prefix-SID sub-TLV
• Used to advertise prefixes to SID/Label mappings
flags:
as part of Segment Routing Mapping Server - F: if set, IPv6 encap. Else, IPv4
(SRMS) function - M: set for a mirrored context
- S: set to allow flooding across
32 bits
entire domain
type length flags reserved - D: set when TLV is leaked from L2
range to L1
prefix length prefix
- A: attached flag
prefix (continued, variable)
sub-TLVs(variable) range:
- allows advertising a range of
prefixes and their labels
Flags
F M S D A sub-TLVs:
- e.g. Prefix-SID sub-TLV signifying
start of the SID range
124
IS-IS: Adjacency SID sub-TLV
Adjacency-SID sub-TLV
• Carries an IGP-Adj-SID
flags:
• Can be present in TLV-22, 23, 222, 223, 141
- F: if set, IPv6 encap. Else, IPv4
- B: Adjacency is eligible for
32 bits protection
- V: if set, SID is an absolute value
type length flags weight - L: set for local significance
SID/Index/Label (variable) - S: refers to a set of adjacencies
- P: Adj-SID is persistently
allocated
Flags weight:
F B V L S P - used for load-balancing purposes
125
References
126
References
• RFC7855 - Source Packet Routing in Networking (SPRING) Problem Statement and
Requirements
• draft-ietf-spring-segment-routing-12
• draft-ietf-spring-segment-routing-mpls-10
• draft-ietf-spring-segment-routing-central-epe-06
• draft-ietf-6man-segment-routing-header-06
• draft-ietf-ospf-segment-routing-extensions-17
• draft-ietf-isis-segment-routing-extensions-13
• draft-ietf-spring-segment-routing-ldp-interop-08
127
Thank You !
End of session
WSDN01_v0.1