2. Segment routing: in a nutshell…
The source determines the path a packet should take
By encoding the path within the packet as a sequence of
segments or instructions.
To reduce network state and allow centralized computation
of paths
What
How
Why
3. MPLS 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
• Packets are classified into FECs at network ingress and an
MPLS label corresponding to the FEC is added to the packet
• Intermediate hops swap the MPLS label and forward the
packet onwards to their next-hops
4. MPLS label stack entry
Payload
Transport
IP
Data Link
layer
Encapsulatio
n
LER LSR
MPLS Shim Header
5. 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
6. MPLS tables
• NHLFE (Next Hop Label Forwarding Entry):
– Used for forwarding labeled packets
– Contains next-hop, label operation, link-layer encapsulation
information
• ILM (Incoming Label Map):
– Mapping between incoming labels and NHLFEs
• FEC to NHLFE map (FTN):
– Used for forwarding unlabeled packets
– Maps each FEC to a set of NHLFEs
7. MPLS node types
LSR
LSR LSR
LSR
elERilER
LSR
LSR
Ingress Label Edge
Router (iLER)
MPLS router that
pushes MPLS label
Label Switch Router
(LSR)
MPLS router that
swaps MPLS label
Egress Label Edge
Router (eLER)
MPLS router that
pops MPLS label
Label Switch Path
Path taken by MPLS
packets from iLER to
eLER
8. MPLS VPN node types
P
P P
P
PEPE
P
P
Provider Edge
VPN LER
Provider Router (P)
LSR in an MPLS VPN
network
Provider Edge
VPN LER
Label Switch Path
Path taken by MPLS
packets from PE to PE
9. 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
10. 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
11. MPLS label distribution protocols
Attribute LDP RSVP-TE BGP
Relative Complexity Low High Medium
Application Shortest path routing Traffic engineering Scaling(Seamless BGP)
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
xLFA but not guaranteed
100% via link and
node protection
Limited to BGP PIC
Scaling O(n) One LSP per
Destination
O(n^2) Full-mesh
required for complete
coverage
O(n) One LSP per
Destination
IGP interaction Dependent Required for TE
extensions
N/A
12. 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
• We need a mechanism that marries the best of RSVP-TE
with the best of LDP
14. Standardization
• 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
15. Requirements
• MUST allow incremental and selective deployment without
requiring a flag day or massive upgrade of all network
elements
• MUST allow putting policy state in the packet header and not
in the intermediate nodes along the path i.e. there should be
no policy state in mid-points and tail-ends.
16. 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
17. 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
• Intermediate hops inspect the segment list and route as per
the instructions implied by it; no per-path state is kept
18. 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
19. 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
21. 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
22. 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
23. Terminology (2)
Local Segment
• The related instruction is only supported by the router
originating it
Segment Identifier (SID)
identifier for a segment. Current options include:
• An absolute MPLS label value
• An index value in an MPLS label space
• An IPv6 address
24. 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.
Segment Routing Domain (SR Domain)
the set of nodes participating in the source-based routing model
SR Global Block (SRGB)
set of local MPLS labels reserved for global segments.
Segment List Depth
The number of segments in a segment list
25. 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
26. 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
27. Node SIDs
• Node SIDs are used to identify nodes as destinations
• Globally significant, by default
• Nodes-SIDs are essentially instructions to forward a packetvia
the shortest ECMP-aware IGP path to the destination node
• Advertised by the link-state IGP (OSPF, IS-IS)
• Need to be manually configured
28. 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)
29. Adjacency SIDs
• Nodes allocate one Adj-SID for each of its adjacencies
• Nodes may allocate multiple Adj-SIDs to the same adjacency
• A node may allocate the same Adj-SID to multiple adjacencies:
– Packets containing such an Adj-SID are then hashed across the different
adjacencies
• Locally significant, by default, and is installed only in the FIB of the originating
router
• Adj-SIDs are essentially instructions to forward a packet out a specific
interface regardless of IGP link metric
• Advertised by the link-state IGP (OSPF, IS-IS)
30. Segment operations
Operation Segment Routing
semantic
MPLS data plane IPv6 data plane
PUSH Insertion of a segment at
the top of the segment
list
PUSHing a new label
on to the label stack
Setting of the first segment
in theIPv6 Segment Routing
Header
NEXT Signals completion of
active segment and
activation of the next
segment in the segment
list
POPping of the top
label in the label stack
Activation of the next
segment in the IPv6
Segment Routing Header
segment list
CONTINUE Signals that the currently
active segment is not yet
complete and needs to
remain Active
SWAP of the top label Standard IPv6 forwarding
based on destination
Address
32. 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
33. SR Global Block (SRGB)
• Set of local MPLS labels reserved
for global segments.
• Network operation is greatly
simplified if all nodes in the SR
domain are configured with the
same SRGB.
• In this example, SRGB range is
16483-32767
SRGB
1048575
32767
0
16483
MPLS Label Space
34. Label advertisement
with common SRGB
• Segment Identifiers:
– Node-SIDs
– Allocated as absolute
globally significant MPLS
label values
• SRGB:
– Identical SRGB configured
on all nodes
35. SID advertisements (1)
P1 P3P2
In label Out-Label Interface
103 103 To-P2
ILM
In label Out-Label Interface
103 103 To-P3
ILM(no PHP)
In label Out-Label Interface
103 - To-P3
ILM(with PHP)
In label Out-Label Interface
103 - Local
ILM
192.168.1.1
SID: 101
SRGB: 100-199
192.168.1.2
SID: 102
SRGB: 100-199
192.168.1.3
SID: 103
SRGB: 100-199
Association of SID to
prefix advertised by IGP
Identical SRGB on all nodes
36. Dealing with different SRGBs
• If nodes in the same SR domain
have different SRGBs, absolute
label values can not be used
• In such a case, a globally unique
index is used instead.
• The local label at a given node
is found by adding the globally-
unique index to the node’s SRGB.
SRGB
1048575
32767
0
16483
MPLS Label Space
Index
used as
offset
37. Using index values
SRGB
1048575
32767
0
16384
MPLS Label Space
SRGB
1048575
131071
0
MPLS Label Space
Example: index value of 100
Absolute label value
= 16384+100 = 16484
Absolute label value
= 65536+100 = 65636
65536
38. Label index
advertisement with
SRGB
• Segment Identifiers:
– Node-SIDs
– Allocated as globally-unique
index values
• SRGB:
– Different SRGB configured on
all nodes
39. SID advertisements (1)
P1 P3P2
In label Out-Label Interface
103 203 To-P2
ILM
In label Out-Label Interface
203 303 To-P3
ILM(no PHP)
In label Out-Label Interface
203 - To-P3
ILM(with PHP)
In label Out-Label Interface
303 - Local
ILM
192.168.1.1
Label Index: 1
SRGB: 100-199
192.168.1.2
Label Index: 2
SRGB: 200-299
192.168.1.3
Label Index: 3
SRGB: 300-399
Association of SID to
prefix advertised by IGP
40. Example: BGP/MPLS VPN service label
exchange
P1
P4 P6
P3
PE2PE1
P5
P2
CE1 CE2
All IGP metrics are equal to 10
unless otherwise indicated
192.168.1.2192.168.1.1 192.168.1.3
192.168.1.5 192.168.1.6192.168.1.4
192.168.1.11 192.168.2.22
Metric 100
BGP-MPLS
FEC: VPN-X
Label: 1234
All subsequent examples use
the service label value of 1234
41. Use case 1: ECMP-aware
shortest path routing
• Routing:
– ECMP-aware shortest path
routing
• Segment Identifiers:
– Node-SIDs only
– Allocated as absolute globally
significant MPLS label values
• SRGB:
– Identical SRGB configured on all
nodes
42. Building the ILM
Use Case 1
Routing Shortest Path
SIDs Node
Label value Absolute
SRGB Common
P1
P4 P6
P3
PE2PE1
P5
P2
CE1 CE2
192.168.1.1
SID: 101
SRGB: 100-499
192.168.1.2
SID: 102
SRGB: 100-499
192.168.1.3
SID: 103
SRGB: 100-499
192.168.1.4
SID: 104
SRGB: 100-499
192.168.1.5
SID: 105
SRGB: 100-499
192.168.1.6
SID: 106
SRGB: 100-499
192.168.2.22
SID: 222
SRGB: 100-499
192.168.1.11
SID: 111
SRGB: 100-499
In label Out-Label Interface
222 222 To-P2
ILM
In label Out-Label Interface
222 222 To-P3
ILM
In label Out-Label Interface
222 222 To-PE2
ILM
In label Out-Label Interface
222 222 To-P5
ILM
In label Out-Label Interface
222 222 To-P6
ILM
In label Out-Label Interface
222 222 To-PE2
ILM
In label Out-Label Interface
222 222 To-P1
ILM
Metric: 100
Association of
SID to prefix
advertised by IGP
All IGP metrics are equal to 10
unless otherwise indicated
Identical SRGB on all nodes
Objectives:
• Deliver traffic between
PE1 and PE2 via the
shortest IGP path
43. Payload
Traffic forwarding
Payload
Use Case 1
Routing Shortest Path
SIDs Node
Label value Absolute
SRGB Common
P1
P4 P6
P3
PE2PE1
P5
P2
CE1 CE2
192.168.1.1
SID: 101
SRGB: 100-499
192.168.1.2
SID: 102
SRGB: 100-499
192.168.1.3
SID: 103
SRGB: 100-499
192.168.1.4
SID: 104
SRGB: 100-499
192.168.1.5
SID: 105
SRGB: 100-499
192.168.1.6
SID: 106
SRGB: 100-499
192.168.2.22
SID: 222
SRGB: 100-499
192.168.1.11
SID: 111
SRGB: 100-499
Metric: 100
222
1234
Payload
PUSH 1234, 222
Swap 222 for 222 Swap 222 for 222Swap 222 for 222
222
1234
Payload
222
1234
Payload
222
1234
Payload
POP 1234, 222
All IGP metrics are equal to 10
unless otherwise indicated
44. Use case 2:
ECMP-aware shortest path
routing
• Routing:
– ECMP-aware shortest path routing
• Segment Identifiers:
– Node-SIDs only
– Allocated as index values
• SRGB:
– Different SRGB configured on
different
nodes
45. Building the ILM
Use Case 1
Routing Shortest Path
SIDs Node
Label value Index
SRGB Different
P1
P4 P6
P3
PE2PE1
P5
P2
CE1 CE2
In label Out-Label Interface
222 322 To-P2
ILM
In label Out-Label Interface
322 422 To-P3
ILM
In label Out-Label Interface
422 822 To-PE2
ILM
In label Out-Label Interface
522 622 To-P5
ILM
In label Out-Label Interface
622 322 To-P6
ILM
In label Out-Label Interface
722 822 To-PE2
ILM
In label Out-Label Interface
122 222 To-P1
ILM
Metric: 100
Association of
SID to prefix
advertised by IGP
All IGP metrics are equal to 10
unless otherwise indicated
192.168.1.1
SID: 1
SRGB: 200-299
192.168.1.2
SID: 2
SRGB: 300-399
192.168.1.3
SID: 3
SRGB: 400-499
192.168.1.4
SID: 4
SRGB: 500-599
192.168.1.5
SID: 5
SRGB: 600-699
192.168.1.6
SID: 6
SRGB: 700-799
192.168.1.11
SID: 11
SRGB: 100-499
192.168.2.22
SID: 22
SRGB: 800-899
46. Payload
Traffic forwarding
Payload
Use Case 1
Routing Shortest Path
SIDs Node
Label value Index
SRGB Different
P1
P4 P6
P3
PE2PE1
P5
P2
CE1 CE2
Metric: 100
222
1234
Payload
PUSH 1234, 222
Swap 222 for 322 Swap 422 for 822Swap 322 for 422
322
1234
Payload
422
1234
Payload
822
1234
Payload
POP 822, 1234
All IGP metrics are equal to 10
unless otherwise indicated
192.168.1.1
SID: 1
SRGB: 200-299
192.168.1.2
SID: 2
SRGB: 300-399
192.168.1.3
SID: 3
SRGB: 400-499
192.168.1.4
SID: 4
SRGB: 500-599
192.168.1.5
SID: 5
SRGB: 600-699
192.168.1.6
SID: 6
SRGB: 700-799
192.168.1.11
SID: 11
SRGB: 100-499
192.168.2.22
SID: 22
SRGB: 800-899