Professional Documents
Culture Documents
HC110110036 SR Basic Principle
HC110110036 SR Basic Principle
Page 2 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
Upon completion of this course, you will be able to:
Page 3 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. SR Technical Background
2. SR Principle Analysis
Page 4 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
SR Background - Problems Faced by LDP
LDP
IGP Neighbor
LDP Session
LDP depends on IGP and uses local label switching to support ECMP.
Page 5 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
SR Background - Problems Faced by LDP
10
10
10
10
20 20
LDP LSP
LDP supports only the shortest IGP path (minimum cost) for path
calculation. TE(Traffic Engineering) is not supported.
Page 6 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
SR Background - Problems Faced by RSVP
Path Path Path
RSVP creates an end-to-end LSP hop by hop based on the CSPF path calculation result. The
label is a local label.
Hop-by-hop, traversing nodes maintain the status of the tunnel. Even if SDN is used, the
tunnel status needs to be maintained.
Eight types of RSVP protocol packets occupy network bandwidth and CPU processing.
Page 7 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
SR Background - Problems Faced by RSVP
RSVP
Tunnel 1
Tunnel 2
Page 8 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
SR Generation Background -SR Technology
C C Controller
Controller
Segment Routing
OpenFlow
C C C C C C
F F F F F F
F F F
Page 9 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
SR Background -SR Technical Framework
SR is a technical solution of packet forwarding provided by adding a series
of segment identifiers to a packet only on the source (an explicit path
loading node) node
The source node has all
Path selection information about the forwarding
path and is better used for path
Path computation explicit path control.
(SPT computation) (Segment List)
The IGP/BGP is
Communication with the controller:
extended to support Control plane
Collect the topology, program
segmentation path, and device information.
Routing protocol SDN controller:
extension (BGP_LS/PCEP/NetConf)
(ISIS/OSPF/BGP)
Page 10 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. SR Technical Background
2. SR Principle Analysis
2.1 Basic Concepts of SR
Page 11 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Basic Concepts of SR
SR Domain:Segment Routing Domain.It indicates the set of SR nodes.
Segment: An instruction that a node executes on an ingress packet (for example, forwarding a packet
to a destination according to a shortest path, forwarding a packet by using a designated interface, or
forwarding a packet to a specified application / service instance).
SID: Segment ID. Segment Routing defines the destination address prefix / node and adjacency on the
network as a segment and assigns segment IDs to these destination address prefixes / nodes and
adjacencies. The segment ID is equivalent to the MPLS label in the traditional MPLS technology, and is
mapped to the MPLS label at the forwarding plane.
SRGB: Segment routing global block,Local tag set reserved for a global segment. In MPLS, SRGB is a set
of local labels reserved for global labels. In IPv6, SRGB is a set of IPv6 addresses that have not been
used globally.
Segment List: It is a sort set of destination address prefix SID / node SID and adjacent SID ordered list,
and is used to identify a complete label switching path LSP(Label Switched Path). In the MPLS
architecture, the segment list is encapsulated in the packet header to guide forwarding.
Page 12 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Segment
The basic concept of SR is to divide the network into different Segments and then combine them to guide packet
forwarding based on the specified path.
SID: Segment ID, which identifies a unique segment. On the forwarding plane, MPLS labels are mapped.
Three basic segments of SR: Adjacent segment, forward drop segment, and node segment.
Generation
Segment Function Example
Mode
It identifies an adjacency of a node on the network. 1001 1002
Dynamically
allocated by It is allocated by the IGP protocol of the source node. It is valid only on the local node and has certain
Adjacency source directivity. 1003
Segment nodes
It is flooded to other NEs through IGP. It is globally visible and valid locally.
through
protocols It is identified by Adjacency Segment ID. Adjacency SID is a local SID outside the SRGB range.
It identifies the prefix of a destination address on the network.
Prefix Manually It is globally visible and globally valid, and is flooded to other NEs through IGP.
Segment configured 100
Prefix SID is the offset value in the SRGB range advertised by the source end. The receive end calculates x.x.x.x/x Prefix SID:100
the actual label value based on the SRGB value to generate MPLS forwarding entries.。
LoopBack LoopBack LoopBack
x.x.x.x x.x.x.x x.x.x.x
Node Node Node
Node Manually It is a special Prefix Segment used to identify a specific node. Configure an IP address as the prefix of the ID=101 ID=102 ID=103
Segment configured loopback interface on the node. The Prefix SID of the node is Node SID.
Page 13 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Segment —Prefix Segment
Based on Prefix Segment: IGP uses the SPF algorithm to calculate the shortest path, which is
also called SR-BE.As shown in the following figure, node Z is the destination node and its
Prefix SID is 100. After IGP flooding is enabled, all devices in the IGP area learn the Prefix
SID of PE2, and then use the SPF algorithm to obtain the shortest path to PE2.
Pkt Pkt
P1 P3 P5
2100
1100
cost:1 cost:1
Pkt cost:1 Pkt
cost:1
Primary path Prefix ID=100
Pkt
100
Pkt cost:8 cost:8 cost:8 x.x.x.x/x
PE2
PE1 Backup path
SRGB SRGB
[1000~1999] [1000~1999]
cost:2
cost:2
cost:2 cost:2
P2 P4 P6
SRGB
SRGB SRGB
[2000~2999]
[3000~3999] [2000~2999]
Page 14 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Segment —Adjacency Segment
Based on Adjacency Segment: The head node specifies a strict explicit path (Strict Explicit).
In this manner, path adjustment and traffic adjustment can be performed in a centralized
manner, so that Software-Defined Networking (SDN) can be better implemented. The
Adjacency Segment is mainly used for the Traffic Engineering (SR-TE).
405
Segment List 507
204
709
102 405
P1 Pkt P3
204 507 P5
405 709 204
102
507 Pkt
709
E PE2
PE1
709
507
Pkt
709
P2 P4 Pkt P6
Page 15 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Segment —Adjacency Segment + Node
Segment
Page 16 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
SRGB
SRGB[2000~2999] SRGB[3000~3999] SRGB[2000~2999]
SRGB[1000~1999]
SRGB[1000~1999]
The SRGB is a segment isolated from local label resources, and is specially used for Segment Routing, so that the Segment Routing global
label and the traditional MPLS coexist locally.
The node ID is the basis of the node SID. The globally unique node label must not conflict with the local label.
The SRGB range and start value need to be configured. Based on the start value, the index value of the node SID is offset to obtain the local
label.
• The scope of SRGB is not specified in the standard, and the implementation of different vendors is different.
• In the case of coexistence with traditional MPLS, the idle label space on each device cannot be the same.
Page 17 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. SR Technical Background
2. SR Principle Analysis
2.1 Basic Concepts of SR
Page 18 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Principle of SR
101
1006 1006
Node SID:101
1006
ECMP
2006
100
SR is a protocol designed for forwarding data packets on the network based on the MPLS protocol and
based on the source routing technology.
SR divides the destination address prefix / node and adjacency in the network into segments and
allocates SID (Segment ID) to these segments. The Adjacency SID (adjacent segment) and Prefix/Node
SID (destination address prefix / node segment) are arranged in order to obtain a forwarding path.
Page 19 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (IS-IS SR-BE) (Control
Plane)
SRGB SRGB
[200~299] [400~499]
cost:1
P1 P3 SRGB
SRGB [600~699]
[100~199]
cost:8
cost:8
LoopBack1
x.x.x.x
PE1
Node ID=10
PE2
cost:1
P2 P4
SRGB SRGB
[300~399] [500~599]
Information flooding
Page 20 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (IS-IS SR-BE)
(Control Plane) SRGB SRGB
[200~299] [400~499]
cost:1
P1 P3 SRGB
SRGB
[600~699]
[100~199]
cost:8
cost:8
LoopBack1
PE1 x.x.x.x
Node ID=10
PE2
cost:1
P2 P4
SRGB SRGB
[300~399] [500~599]
PE1→P1→P3→PE2: Label forwarding entry generated by PE1→P2→P4→PE2: : Label forwarding entry generated by
each node for the Node SID 10 each node for the Node SID 10
Node InLabel Outlabel Interface Node InLabel Outlabel Interface
Page 21 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (IS-IS SR-BE)
(Control Plane)
SRGB SRGB
[200~299] [400~499]
cost:1
P1 P3 SRGB
SRGB
[100~199] [600~699]
cost:8
cost:8
LoopBack1
PE1 x.x.x.x
Node ID=10
PE2
cost:1
P2 P4
SRGB SRGB
[300~399] [500~599]
Page 22 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (IS-IS SR-BE)
(Data Plane)
SRGB SRGB
[200~299] [400~499]
210
Pkt1 LoopBack1
cost:1 x.x.x.x
P1 P3 Node ID=10
Push
PE1 PE2
cost:8
Pkt1
cost:8
SRGB SRGB
[100~199] [600~699]
Pkt2
Push
cost:1
310
Pkt2 P2 P4
SRGB SRGB
[300~399] [500~599]
PE1→P1→P3→PE2: Label forwarding entry generated by PE1→P2→P4→PE2: : Label forwarding entry generated by
each node for the Node SID 10 each node for the Node SID 10
Page 23 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (IS-IS SR-BE)
(Data Plane) Swap
410
SRGB SRGB
[200~299] Pkt1 [400~499]
210
Pkt1 LoopBack1
cost:1 x.x.x.x
P1 P3 Node ID=10
PE1 PE2
cost:8
cost:8
SRGB SRGB
[100~199] [600~699]
cost:1
310
Pkt2 P2 P4
SRGB 510 SRGB
[300~399] [500~599]
Pkt2
Swap
PE1→P1→P3→PE2: Label forwarding entry generated by PE1→P2→P4→PE2: : Label forwarding entry generated by
each node for the Node SID 10 each node for the Node SID 10
PE2
PE1 Pkt1
cost:8
cost:8
SRGB
[600~699]
SRGB Pkt2
[100~199]
Pop
cost:1
610
P2 P4
Pkt2
SRGB SRGB
[300~399] [500~599]
PE1→P1→P3→PE2: Label forwarding entry generated by PE1→P2→P4→PE2: : Label forwarding entry generated by
each node for the Node SID 10 each node for the Node SID 10
Page 25 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (IS-IS SR-TE)
(Control Plane)
Controller Label table on the controller
PCEP
PE1 NA 1011
403
102
20
304
1
204
P1 Link P1 to P2 102
402
P2 P4
Node SID:2 Node SID:4 P1 Link P1 to P3 103
Note: …… …… ……
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 26 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (IS-IS SR-TE)
(Control Plane)
Controller
Label forwarding entries on PE1
SID/Inlabel Outlabel Interface
PCEP
1011 NA NA
501 NA PE1->P1
Node SID:1 Node SID:3 502 NA PE1>P2
Segment P1 P3
301 1001 1001 PE1->P1
List
501
103 1002 1002 PE1->P2
103
304 1003 1003 PE1->P1
406
1004 1004 PE1->P2
PE1 PE2
403
102
20
304
1022 1022 PE1->P1
1
204
402
P2 P4 SR-TE Tunnel label stack encapsulation table on PE1
Node SID:2 Node SID:4
SR-TE Tunnel Segment List
Note:
Tunnel 1 501/103/304/406
1. All nodes use the same SRGB[1000, 1999].
…… ……
2. The cost values of all links are 1.
Page 27 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (SR-TE Strict
Explicit Path) (Data Plane)
Controller
PCEP
103
304
The following table shows the label forwarding entries on
Node SID:1 Node SID:3
406
P1 P3 each node on the SR-TE Tunnel path from PE1 to PE2.
301
501 Pkt
103 Node SID/Inlabel Outlabel Interface
103
304
406 PE1 501 NA PE1->P1
Pkt
403 P1 103 NA P1->P3
102
20
304
1
PE1 PE2
Node SID:11 Node SID: P3 304 NA P3->P4
22
204 P4 406 NA P4->PE2
402
P2 P4
Node SID:2 Node SID:4
Note:
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 28 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (SR-TE Strict
Explicit Path) (Data Plane)
Controller
304
103 406
Node SID:1 Node SID:3
Segment 304
Pkt The following table shows the label forwarding entries on
P1 P3
301
List501 406 each node on the SR-TE Tunnel path from PE1 to PE2.
103 Pkt
103
304 Node SID/Inlabel Outlabel Interface
406
Pkt
PE1 501 NA PE1->P1
406
403
102
20
304
P1 103 NA P1->P3
1
Pkt
PE1 PE2
Node SID:11 Node SID:
22 P3 304 NA P3->P4
204
Pkt
P4 406 NA P4->PE2
402
P2 P4
Node SID:2 Node SID:4
Note:
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 29 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (SR-TE Strict
Explicit Path) (Data Plane)
Controller
304
103 406
Node SID:1 Node SID:3
Segment 304
Pkt The following table shows the label forwarding entries on
P1 P3
301
List501 406 each node on the SR-TE Tunnel path from PE1 to PE2.
103 Pkt
103
304 Node SID/Inlabel Outlabel Interface
406
Pkt
Pkt PE1 501 NA PE1->P1
406
403
102
20
304
P1 103 NA P1->P3
1
Pkt
PE1 PE2
Node SID:11 Node SID:
22 P3 304 NA P3->P4
204
Pkt
P4 406 NA P4->PE2
402
P2 P4
Node SID:2 Node SID:4
Note:
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 30 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (SR-TE Loose
Explicit Path) (Data Plane)
Controller
PCEP
Node SID:1 Node SID:3
P1 P3
Segment 301
List
1004
403 103
306
The following table shows the label forwarding entries on
each node on the SR-TE Tunnel path from PE1 to PE2.
Pkt
Node SID/Inlabel Outlabel Interface
403
102
20
304
1
PE1
Node SID:11 PE2 PE1 1004 1004 PE1->P2
Node SID:22
P2 1004 1004 P2->P4
204
1004
403 402 P4 1004 NA NA
306 P2 P4
Pkt Node SID:2 Node SID:4 P4 403 NA P4->P3
P3 306 NA P3->PE2
Note:
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 31 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (SR-TE Loose
Explicit Path) (Data Plane)
Controller
PCEP
Node SID:1 Node SID:3
P1 P3
Segment 301
List
1004
403 103
306
The following table shows the label forwarding entries on
each node on the SR-TE Tunnel path from PE1 to PE2.
Pkt
Node SID/Inlabel Outlabel Interface
403
102
20
304
1
PE1
Node SID:11 PE2 PE1 1004 1004 PE1->P2
Node SID:22
P2 1004 1004 P2->P4
204
1004
403 402 P4 1004 NA NA
306 P2 1004 P4
Pkt Node SID:2 403 Node SID:4 P4 403 NA P4->P3
306
Pkt P3 306 NA P3->PE2
Note:
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 32 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (SR-TE Loose
Explicit Path) (Data Plane)
Controller
PCEP
Node SID:1 Node SID:3
P1 P3
Segment 301
List
1004
403 103
306
The following table shows the label forwarding entries on
each node on the SR-TE Tunnel path from PE1 to PE2.
Pkt
306 Node SID/Inlabel Outlabel Interface
403
102
20
304
1
Pkt
PE1
Node SID:11 PE2 PE1 1004 1004 PE1->P2
Node SID:22
P2 1004 1004 P2->P4
204
1004
403 402 P4 1004 NA NA
306 P2 1004 P4
Pkt Node SID:2 403 Node SID:4 P4 403 NA P4->P3
306
Pkt P3 306 NA P3->PE2
Note:
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 33 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (SR-TE Loose
Explicit Path) (Data Plane)
Controller
PCEP
Node SID:1 Node SID:3
P1 P3
Segment 301
Pkt
List
1004
403 103
306
The following table shows the label forwarding entries on
each node on the SR-TE Tunnel path from PE1 to PE2.
Pkt
306 Node SID/Inlabel Outlabel Interface
403
102
20
304
1
Pkt
PE1
Node SID:11 PE2 PE1 1004 1004 PE1->P2
Node SID:22
P2 1004 1004 P2->P4
204
1004
403 402 P4 1004 NA NA
306 P2 1004 P4
Pkt Node SID:2 403 Node SID:4 P4 403 NA P4->P3
306
Pkt P3 306 NA P3->PE2
Note:
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 34 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Working Principle of SR- (SR-TE Loose
Explicit Path) (Data Plane)
Controller
PCEP
Node SID:1 Node SID:3
P1 P3
Segment 301
Pkt
List
1004
403 103
306
The following table shows the label forwarding entries on
each node on the SR-TE Tunnel path from PE1 to PE2.
Pkt
Pkt
306 Node SID/Inlabel Outlabel Interface
403
102
20
304
1
Pkt
PE1
Node SID:11 PE2 PE1 1004 1004 PE1->P2
Node SID:22
P2 1004 1004 P2->P4
204
1004
403 402 P4 1004 NA NA
306 P2 1004 P4
Pkt Node SID:2 403 Node SID:4 P4 403 NA P4->P3
306
Pkt P3 306 NA P3->PE2
Note:
1. All nodes use the same SRGB[1000, 1999].
2. The cost values of all links are 1.
Page 35 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
1. Which of the followings are the SR tunnel type ?( )
A. SR-BE tunnel
2. Which of the following actions may be performed when packets are forwarded
based on the SR label? ( )
A. Push
B. Pop
C. Swap
D. Switch
Page 36 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Summary
SR Background
Basic Concepts of SR
SR technical architecture
Page 37 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com