Sample
Sample
6. Under the book listing, click on the Access Bonus Content link.
When you register your book, your Pearson Test Prep practice test access code will automati-
cally be populated with the book listing under the Registered Products tab. You will need
this code to access the practice test that comes with this book. You can redeem the code at
PearsonTestPrep.com. Simply choose Pearson IT Certification as your product group and log
into the site with the same credentials you used to register your book. Click the Activate New
Product button and enter the access code. More detailed instructions on how to redeem your
access code for both the online and desktop versions can be found on the companion website.
If you have any issues accessing the companion website or obtaining your Pearson Test Prep
practice test access code, you can contact our support team by going to pearsonitp.echelp.org.
This page intentionally left blank
CCNP
SPCOR
350-501
Official Cert Guide
Cisco Press
iv CCNP SPCOR 350-501 Official Cert Guide
Mohammad Khalil
Published by:
Cisco Press
Hoboken, New Jersey
All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage and retrieval
system, without written permission from the publisher, except for the inclusion of brief quotations in a
review.
For information regarding permissions, request forms, and the appropriate contacts within the Pearson
Education Global Rights & Permissions department, please visit www.pearson.com/global-permission-
granting.html.
$PrintCode
Library of Congress Control Number: 2024947468
ISBN-13: 978-0-13-532480-6
ISBN-10: 0-13-532480-7
The information is provided on an “as is” basis. The authors, Cisco Press, and Cisco Systems, Inc.
shall have neither liability nor responsibility to any person or entity with respect to any loss or damages
arising from the information contained in this book or from the use of the discs or programs that may
accompany it.
The opinions expressed in this book belong to the author and are not necessarily those of
Cisco Systems, Inc.
Trademark Acknowledgments
All terms mentioned in this book that are known to be trademarks or service marks have been
appropriately capitalized. Cisco Press or Cisco Systems, Inc., cannot attest to the accuracy of this
information. Use of a term in this book should not be regarded as affecting the validity of any trademark
or service mark.
v
Feedback Information
At Cisco Press, our goal is to create in-depth technical books of the highest quality and value. Each book
is crafted with care and precision, undergoing rigorous development that involves the unique expertise of
members from the professional technical community.
Readers’ feedback is a natural continuation of this process. If you have any comments regarding how we
could improve the quality of this book, or otherwise alter it to better suit your needs, you can contact us
through email at [email protected]. Please make sure to include the book title and ISBN in your
message.
GM K12, Early Career and Professional Learning: Copy Editor: CAH Editorial
Soo Kang
Technical Editor: Brad Edgeworth
Alliances Manager, Cisco Press: Caroline Antonio
Editorial Assistant: Cindy Teeters
Director, ITP Product Management: Brett Bartow
Cover Designer: Chuti Prasertsith
Executive Editor: James Manly
Composition: codeMantra
Managing Editor: Sandra Schroeder
Indexer: Timothy Wright
Development Editor: Christopher A. Cleveland
Proofreader: Jennifer Hinchliffe
Senior Project Editor: Tonya Simpson
vi CCNP SPCOR 350-501 Official Cert Guide
Before his tenure at Cisco, Bradley gained invaluable experience working with various
Fortune 500 companies, where he was instrumental in designing and operating small,
medium, and large networks. His 20-year career is marked by a diverse background in
successfully implementing technical campaigns across multiple industries, including
transport, service provider, enterprise, industrial, and mobility networking.
In addition to his role at Cisco, Bradley is a recognized thought leader and educator. As
a Cisco Press author and a distinguished speaker at Cisco Live, he has contributed to the
body of knowledge in networking, sharing his insights and expertise through various
publications. Moreover, his dedication to education is widely demonstrated, not only
within Cisco but also through his role as a NetAcad instructor, where he has mentored
and guided aspiring network professionals.
Bradley’s dedication to excellence and his ability to simplify complex concepts have made
him a respected figure in the networking community. His contributions continue to shape
the future of networking, driving innovation and excellence in the industry. Bradley’s
refreshing no-nonsense approach to problem-solving has earned him a credible reputation
among customers and peers alike.
Dedications
To my beautiful wife, Evelina, who has supported me throughout the development of this
book. You have challenged my assumptions, sharpened my ideas, and made some parts
truly exceptional.
—Bradley Riapolov
I want to dedicate this book with affection to my wife, Qamar, and my precious children,
Sireen and Saeed, who have supported me and motivated me to accomplish this effort. To
my wise father, who believed in me and encouraged me all the way. Lastly, to my second
home Estarta, which provided me with the support and environment to walk through.
—Mohammad Khalil
viii CCNP SPCOR 350-501 Official Cert Guide
Acknowledgments
I would like to thank the Cisco Press team, especially James Manly and Christopher
Cleveland, for their patience, guidance, and consideration.
I would like to thank the technical editor, colleague, and friend, Brad Edgeworth, for his
time, technical expertise, and readiness to generously share knowledge without expecting
anything in return.
I would like to thank Bikram Gandhok, Cisco Certification Program Manager, for driving
Cisco Certifications to stay relevant and impactful.
I would like to thank Kent Dailey, my steadfast accomplice, who has navigated both
challenges and victories with equal zeal.
I would like to thank my mentors, Marty Fierbaugh and Emerson Moura, for helping me
gain insights that extend beyond my own perceptions.
Finally, I would like to thank my co-author, Mohammad, for sharing the burden of this
challenging endeavor.
—Bradley Riapolov
I would like to massively thank our development editor, Chris Cleveland, for his guidance
and the contribution he provided. James Manly’s support was remarkable; a big thanks for
his kindness.
I want to thank our technical editor, Brad, for his great insights, patience, and kindness
for sharing his amazing practical experience and guiding us throughout the content
development.
And I don’t want to forget to thank my friend, Adeeb Al-Husseini, for his time sharing his
practical experience and insights.
Finally, I would like to thank my partner, Bradley, for his seamless cooperation,
contribution, and kindness to share his ideas and thoughts with me.
—Mohammad Khalil
ix
Contents at a Glance
Introduction xxx
Part I Architectures
Chapter 1 Service Provider Architectures 2
Part II Routing
Chapter 4 Routing Fundamentals 72
Index 1032
Online Elements
Appendix B Memory Tables
Contents
Introduction xxx
Part I Architectures
Part II Routing
H-VPLS 519
ITU-T G.8032 Ethernet Ring Protection Switching 525
CFM Protocols and Link Failures 526
Ethernet Connectivity Fault Management 526
Customer Service Instance 527
Maintenance Domain 528
Ethernet CFM Maintenance Domain 528
Maintenance Point 529
Maintenance Association 529
Maintenance Endpoints 530
CFM Messages 531
Cross-Check Function 532
Ethernet CFM and Ethernet OAM Interaction 533
Provider Bridges (802.1ad) 535
802.1ad Ports 537
Service Provider Bridges 538
S-Bridge Component 538
C-Bridge Component 539
NNI Port 539
Provider Backbone Bridging (PBB) 539
PBB-EVPN Components 541
EVPN 543
Next-Generation Solutions for L2VPN 545
CE Multihoming 545
Frame Duplication 545
MAC Flip-Flopping 545
MPLS-Based Data Plane EVPN 547
Exam Preparation Tasks 550
Review All Key Topics 550
Define Key Terms 551
Command Reference to Check Your Memory 551
Review Questions 552
Bibliography 552
CGNAT 887
NAT64 888
Stateless NAT64 889
Stateful NAT64 892
DNS64 895
DS-Lite 897
MAP-E 898
MAP-T 899
Exam Preparation Tasks 900
Review All Key Topics 900
Define Key Terms 900
Command Reference to Check Your Memory 900
Review Questions 901
Bibliography 901
Index 1032
Online Elements
Appendix B Memory Tables
■ Boldface indicates commands and keywords that are entered literally as shown. In
actual configuration examples and output (not general command syntax), boldface
indicates commands that are manually input by the user (such as a show command).
■ Braces within brackets ([{ }]) indicate a required choice within an optional element.
xxviii CCNP SPCOR 350-501 Official Cert Guide
Preface
I’m not an academic or engineer with a PhD, just an ordinary person like many of you.
Back in 2000, when I lost my job, my college roommate’s brother-in-law handed me a
book on networking (The CCNA Certification Guide). I started my career at the very
bottom, shlepping printers. I worked with various customers for eight years, thinking I
was a pretty smart engineer until I joined Cisco, where smart engineers were as common
as raindrops in a storm. Throughout my career, I’ve been fortunate to work with many
networks, from small to massive, for over a quarter of a century. The insights in this book
come from someone who’s built real networks and learned from clever mentors, mistakes,
and experiences.
While my writing style might not adhere to academic conventions, it remains practical,
mirroring my approach to problem-solving. It offers an opportunity to assess your
problem-solving approach and perhaps discover new perspectives. I aim to help you pass
a particularly challenging exam and impart valuable skills to those who build networks,
not just academics, whom I deeply respect. So, expect my approach to differ from what
you’re used to, with a focus on hands-on, real-world scenarios.
What makes this exam so tough? Having worked across various networking domains, I
find that service provider networks are especially complex compared to their enterprise,
data center, or mobility counterparts. Cisco acknowledges this complexity in its exam
structure. Expect tough questions, and be pleasantly surprised when you encounter the
ones easier than that.
As you prepare, pay close attention to the exam blueprint and how its sections are
worded. Questions deliberately fall into four categories: Describe, Compare, Config-
ure, and Troubleshoot. “Describe” sections assume a solid grasp of general knowledge
and concepts. “Compare” sections probe deeper, expecting candidates to differentiate
between similar topics. “Configure” sections require advanced familiarity to configure
or spot errors accurately. “Troubleshoot” sections demand the highest skill level, testing
your ability to solve complex problems with twists.
What’s my top tip for acing the exam on your first attempt? Practice. I have structured
my portions of the content for you to follow in the book and the command line. In
theory, there is no difference between theory and practice. I can tell you that in practice,
there is. There’s no substitute for hands-on keyboard time in mastering service provider
networks.
—Bradley Riapolov
xxix
To add to what Bradley mentioned, we tried our best to add new terms within the book
from brainstorming and use cases to make it more realistic from practical experience and
to assist with some design guidelines for the service provider technologies.
—Mohammad Khalil
xxx CCNP SPCOR 350-501 Official Cert Guide
Introduction
The Implementing and Operating Cisco Service Provider Network Core Technologies
(SPCOR 350-501) exam is the required “core” exam for the CCNP Service Provider certi-
fications. This exam tests your knowledge of implementing core service provider network
technologies including architecture, services, networking, automation, quality of service,
security, and network assurance.
Implementing and Operating Cisco Service Provider Network Core Technologies (SPCOR
350-501) is a 120-minute exam.
TIP You can review the exam blueprint from Cisco’s website at https://
learningnetwork.cisco.com/s/spcor-exam-topics.
This book gives you the foundation and covers the topics necessary to start your CCNP
Service Provider or CCIE Service Provider journey.
TIP The SPCOR core exam is also the qualifying exam for the CCIE Service Provider
certification. Passing this exam is the first step toward earning both of these certifications.
The following table breaks down each of the domains represented in the exam.
Total 100%
Domain 1: Architecture: This domain is covered in Chapters 1–3, 14, 16–18, and 21.
Domain 2: Networking: This domain is covered in Chapters 4–8, 19, and 20.
Domain 3: MPLS and Segment Routing: This domain is covered in Chapters 10, 14, and 15.
3.3.d TI-LFa
3.3.e PCE-PCC architectures
3.3.f Flexible algorithm
3.3.g SRv6 (locator, micro-segment, encapsulation, interworking gateway)
5.1 Describe the programmable APIs used to include Cisco devices in network
automation
5.2 Interpret an external script to configure a Cisco device using a REST API
5.3 Describe the role of Network Services Orchestration (NSO)
5.4 Describe the high-level principles and benefits of a data modeling language, such as
YANG
5.5 Describe configuration management tools, such as Ansible and Terraform
5.6 Describe Secure ZTP
5.7 Configure dial-in/out, TCP, TLS, and mTLS certificates using gRPC and gNMI
5.8 Configure and verify NetFlow/IPFIX
5.9 Configure and verify NETCONF and RESTCONF
5.10 Configure and verify SNMP (v2c/v3)
Introduction xxxv
2. Once you have logged in, make sure that “Test Candidate” from the drop-down
menu is selected.
4. Select the Schedule exam button under the exam you wish to take.
5. Verify your information and continue throughout the next few screens.
6. On the Enter payment and billing page, click the Add Voucher or Promo Code
button if applicable. Enter the voucher number or promo/discount code in the field
below and click the Apply button.
7. Continue through the next two screens to finish scheduling your exam.
Once there, navigate to the FAQs section of the page, where you’ll find helpful informa-
tion on everything from scheduling your exam to system requirements, testing policies,
and more.
learn and understand the topics. This book is designed to help you pass the Implement-
ing and Operating Cisco Service Provider Network Core Technologies (SPCOR 350-501)
exam by using the following methods:
■ Helping you discover which exam topics you have not mastered
■ Supplying exercises that enhance your ability to recall and deduce the answers to
test questions
■ Providing practice exercises on the topics and the testing process via test questions
on the companion website
■ Foundation Topics: These are the core sections of each chapter. They explain the
concepts for the topics in that chapter.
■ Brainstorming: These encourage you to actively apply their knowledge. You are
invited to take a step beyond mere fact retrieval and engage deeply with the mate-
rial you’ve covered. This is your opportunity to think critically about what you’ve
learned and attempt to apply it on your own. Most of the time, we guide you
through the process, but these exercises are designed to help you assess an exam
question and provide an educated, well-reasoned answer. By participating in these
sessions, you’ll develop the skills to approach challenges with confidence and creativ-
ity, ensuring you’re prepared to succeed independently.
■ Exam Preparation Tasks: After the “Foundation Topics” section of each chapter, the
“Exam Preparation Tasks” section lists a series of study activities that you should do
at the end of the chapter:
■ Review All Key Topics: The Key Topic icon appears next to the most important
items in the “Foundation Topics” section of the chapter. The Review All Key
Topics activity lists the key topics from the chapter, along with their page
numbers. Although the contents of the entire chapter could be on the exam, you
should definitely know the information listed in each key topic, so you should
review these.
■ Define Key Terms: Although the Implementing and Operating Cisco Service
Provider Network Core Technologies (SPCOR 350-501) exam may be unlikely to
ask a question such as “Define this term,” the exam does require that you learn
and know a lot of cybersecurity terminology. This section lists the most impor-
tant terms from the chapter, asking you to write a short definition and compare
your answer to the glossary at the end of the book.
Introduction xxxvii
■ Review Questions: Confirm that you understand the content you just covered by
answering these questions and reading the answer explanations in Appendix A.
■ Web-based practice exam: The companion website includes the Pearson Cert
Practice Test engine, which allows you to take practice exam questions. Use it to
prepare with a sample exam and to pinpoint topics where you need more study.
To access the companion website, which gives you access to the electronic content that
accompanies this book, start by establishing a login at www.ciscopress.com and register-
ing your book by December 31, 2027. To do so, simply go to www.ciscopress.com/
register and enter the ISBN of the print book: 9780135324806. After you have registered
your book, go to your account page and click the Registered Products tab. From there,
click the Access Bonus Content link to get access to the book’s companion website.
Note that if you buy the Premium Edition eBook and Practice Test version of this book
from Cisco Press, your book will automatically be registered on your account page.
Simply go to your account page, click the Registered Products tab, and select Access
Bonus Content to access the book’s companion website.
Please note that many of our companion content files can be very large, especially image
and video files.
If you are unable to locate the files for this title by following these steps, please visit
www.pearsonITcertification.com/contact and select the Site Problems/Comments option.
Our customer service representatives will assist you.
■ You can get your access code by registering the print ISBN 9780135324806 on
https://www.ciscopress.com/register. Make sure to use the print book ISBN, regard-
less of whether you purchased an eBook or the print book. After you register the
book, your access code will be populated on your account page under the Registered
Products tab. Instructions for how to redeem the code are available on the book’s
companion website by clicking the Access Bonus Content link.
xxxviii CCNP SPCOR 350-501 Official Cert Guide
■ If you purchase the Premium Edition eBook and Practice Test directly from the
Pearson IT Certification website, the code will be populated on your account page
after purchase. Just log in at https://www.ciscopress.com, click Account to see
details of your account, and click the Digital Purchases tab.
NOTE After you register your book, your code can always be found in your account
under the Registered Products tab.
Once you have the access code, to find instructions about both the PTP web app and the
desktop app, follow these steps:
Step 1. Open this book’s companion website, as was shown earlier in this
Introduction under the heading “The Companion Website for Online Content
Review.”
Step 3. Follow the instructions listed there both for installing the desktop app and for
using the web app.
Note that if you want to use the web app only at this point, just navigate to
www.pearsontestprep.com, establish a free login if you do not already have one, and
register this book’s practice tests using the registration code you just found. The process
should take only a couple of minutes.
■ Study mode: Allows you to fully customize your exams and review answers as you
are taking the exam. This is typically the mode you would use first to assess your
knowledge and identify information gaps.
■ Flash Card mode: Strips out the answers and presents you with only the question
stem. This mode is great for late-stage preparation when you really want to challenge
yourself to provide answers without the benefit of seeing multiple-choice options.
This mode does not provide the detailed score reports that the other two modes do,
so you should not use it if you are trying to identify knowledge gaps.
In addition to these three modes, you will be able to select the source of your questions.
You can choose to take exams that cover all of the chapters or you can narrow your
selection to just a single chapter or the chapters that make up specific parts in the book.
All chapters are selected by default. If you want to narrow your focus to individual
Introduction xxxix
chapters, simply deselect all the chapters and then select only those on which you wish
to focus in the Objectives area.
You can also select the exam banks on which to focus. Each exam bank comes complete
with a full exam of questions that cover topics in every chapter. The two exams printed
in the book are available to you as well as two additional exams of unique questions.
You can have the test engine serve up exams from all four banks or just from one
individual bank by selecting the desired banks in the exam bank area.
There are several other customizations you can make to your exam from the exam set-
tings screen, such as the time of the exam, the number of questions served up, whether
to randomize questions and answers, whether to show the number of correct answers for
multiple-answer questions, and whether to serve up only specific types of questions. You
can also create custom test banks by selecting only questions that you have marked or
questions on which you have added notes.
Sometimes, due to many factors, the exam data may not fully download when you
activate your exam. If you find that figures or exhibits are missing, you may need to
manually update your exams. To update a particular exam you have already activated and
downloaded, simply click the Tools tab and click the Update Products button. Again,
this is only an issue with the desktop Windows application.
If you wish to check for updates to the Pearson Test Prep exam engine software,
Windows desktop version, simply click the Tools tab and click the Update Application
button. This ensures that you are running the latest version of the software engine.
Figure Credits
Figure 1-15 © ITU 2024
Cover, insta_photos/shutterstock
CHAPTER 15
Segment Routing
CAUTION The goal of self-assessment is to gauge your mastery of the topics in this chap-
ter. If you do not know the answer to a question or are only partially sure of the answer, you
should mark that question as wrong for purposes of the self-assessment. Giving yourself
credit for an answer you correctly guess skews your self-assessment results and might pro-
vide you with a false sense of security.
1. Which of the following are viable options for assigning SRGB ranges? (Select all that
apply.)
a. Globally
b. Per IGP
c. Dynamically
d. Statically
2. Which labels cannot be a part of SRGB? (Select all that apply.)
a. 15999
b. 16000
c. 24999
d. 1,048,576
3. Which TLVs play an important role in Segment Routing? (Select all that apply.)
a. 22
b. 41
c. 135
d. 163
4. Which of the following is not an option for the SR Control Plane?
a. RSVP-TE
b. IS-IS
c. OSPF
d. BGP
5. Which of the following is not a viable option to supply SR policy to the ingress
router?
a. NETCONF
b. FIB
726 CCNP SPCOR 350-501 Official Cert Guide
c. CLI
d. PCEP
6. Which behavior properly describes an SR policy?
a. An SR policy uses Network Service Orchestrator (NSO) to program its data plane.
b. SR-PCE will use BGP-LS to program an SR policy into the ingress node.
c. An SR policy encodes the list of constraints into the MPLS headers.
d. An SR policy will use BSID entries to program its forwarding table.
7. Which of the following describes TI-LFA functionality? (Select all that apply.)
a. TI-LFA must rely on LDP functionality to provide double-segment protection.
b. TI-LFA uses next-hop neighbor as the point of local repair.
c. TI-LFA preprograms the post-convergence path into a router’s data plane.
d. TI-LFA can use P space to calculate the post-convergence path.
8. Viable repair tunnel endpoints are found at which intersections?
a. At midpoints of extended spaces
b. At the intersection of point of local repair and double segments
c. At the intersection of PQ nodes
d. At the intersection of P and Q spaces
9. Which component serves the needs of long-term network engineering and capacity
planning?
a. Crosswork Network Controller
b. Crosswork Optimization Engine
c. WAN Automation Engine
d. Crosswork Cloud
10. Which of the following protocols are used by PCEP to calculate network paths?
(Select all that apply.)
a. IS-IS
b. BGP-LS
c. RSVP-TE
d. OSPF
Foundation Topics
Over time, a skilled engineer learns to make the most of the available resources. Over the
past three decades, various strategies have been explored to maximize the potential of com-
puter networks. The traditional approach to steering network traffic has been to manipulate
the Interior Gateway Protocol (IGP) and rely solely on destination-based routing strategies.
This only provided a restricted range of options for directing traffic within the network. The
main limitation of using IGP metrics has been the “all or nothing” approach. Some of the
links inevitably become congested while other links remain underutilized even though they
are high bandwidth or low latency. IGP metrics simply lack optimization capabilities because
they do not allow you to map different services to different paths. Despite years of featured
improvements, such challenges persist and remain unsolvable with conventional IGP manipu-
lations and destination-based routing strategies.
Chapter 15: Segment Routing 727
Thus, in the 1990s, the development of the Label Distribution Protocol (LDP) and
Resource Reservation Protocol with Traffic Engineering extensions (RSVP-TE) marked a sig-
nificant advancement in networking. These capable adjunct protocols effectively addressed
specific challenges and provided network operators with crucial Traffic Engineering tools to
overcome a wide variety of traffic-steering issues. Network operators could now manipulate
how traffic flowed through the network to make the most of the available paths. Never-
theless, while providing network optimization, these protocols also introduced intricate
challenges.
In the case of LDP, an additional process had to be created and maintained on the network,
which led to a complex interaction with the Interior Gateway Protocol. LDP-IGP synchroni-
zation problems would cause traffic disruptions until these two protocols could settle on an
agreement regarding the best way to forward traffic.
When dealing with RSVP-TE, reserving bandwidth accurately involves placing traffic within
RSVP-TE tunnels. While this approach is feasible in smaller networks with minimal traffic 15
engineering needs, it becomes exceedingly intricate on a larger scale. Managing hundreds of
tunnels, their backup paths, and upkeep of a pertinent set of rules in the face of a dynami-
cally evolving network posed formidable challenges, demanding considerable time and
effort. Such scaling issues led many operators to limit their RSVP-TE deployments to the fast
reroute (FRR) use cases. RSVP-TE is also not “ECMP-friendly,” so it can never use all IGP-
derived paths, forcing the operator to create more tunnels. An additional aspect to consider
is that RSVP-TE generates a persistent “always-on” network state where every router must
account for available bandwidth and that state must be constantly monitored. This incurs a
cost in terms of network compute resources and the hardware required to sustain this con-
tinuous state irrespective of whether the network experiences congestion or not.
Could network optimization be further improved? These were the experiences and thoughts
of the designers behind Segment Routing. They proposed that a properly designed network
should have enough capacity to effectively handle an expected volume of traffic without
congestion, even in the presence of a probable set of independent failures. IGP coupled with
ECMP can competently absorb the majority of the traffic volume. In less frequent instances
of congestion, traffic engineering tools would address applications intolerant of such net-
work bottlenecks. This represented a simpler and more resource-efficient approach, both in
terms of hardware and human efforts.
They proposed that it is better to distribute labels associated with IGP-signaled prefixes
within the IGP framework itself, rather than relying on a separate protocol such as LDP to
perform this task. This would solve the LDP-IGP synchronization problem during network
failures because there now would be a single source of truth (IGP) to find available network
paths. The network would precalculate such paths even before the failure occurred. IGP can
have such “preknowledge”—think of an EIGRP-feasible successor—which is aware of the
best available network route even before the failure occurs.
Second, why not give the network operator the power to direct any packet to any path at
the ingress router only (where the packet enters the network), without having to maintain the
expensive and complex “always-on” state throughout the entire network domain? This would
lower control plane pressure, conserve network resources, and give the operator the full flex-
ibility to force any packet anywhere.
728 CCNP SPCOR 350-501 Official Cert Guide
Cisco engineers formulated the Segment Routing concept, obtained approval from their
management in 2012, presented the idea to IETF in March 2013, authored numerous IETF
drafts, and significantly influenced the industry in 2015 with the introduction of Segment
Routing on IOS XR platforms (IOS and NX-OS carry some of the SR features). The mar-
ket positively responded with other vendors supporting this capable technology. It is also
referred to as Source Routing outside of Cisco. As of the present moment, Cisco alone has
documented more than 1200 operational Segment Routing production deployments.
Segment Routing can be deployed on two data planes:
■ MPLS data plane where segments will be encoded with MPLS labels.
■ IPv6 data plane where segments will be encoded with IPv6 addresses.
Segment Types
Think of segments as a set of instructions. In Segment Routing, a source (an ingress router,
as an example) chooses a certain path through the network and encodes the path in the
packet header as an ordered list of instructions. These instructions are termed segments
because they describe components of a divided whole.
In SR-MPLS (Segment Routing based on MPLS data plane), such an identifier refers
to an ordered list of segments represented by a stack of MPLS labels. When you instruct
routers to follow these labels in a given sequence, the packets will take this path through the
network. In SRv6 (Segment Routing based on IPv6 data plane), it refers to an ordered
list of segments encoded into a routing extension header. When you instruct routers to fol-
low this list, the packets will flow via this path. In Figure 15-1, assigning such identifiers to
routers can provide instructions for a specific path to send packets.
Service Provider
PE2 P4 PE6
CE1 CE8
PE3 P5 PE7
Global Segments
Every router in a Segment Routing, or SR, domain understands such instruction and installs it
in its forwarding table. This instruction is a domain-wide (watch the misleading name global
because it is not known globally around the world) unique label value (a numerical number)
that comes from the Segment Routing Global Block (SRGB) database. Table 15-2 shows
how the Label Switching Database (LSD) carves the following default ranges (some can
be changed) on Cisco routers running Segment Routing–capable software.
Chapter 15: Segment Routing 729
In Figure 15-1, every node in the domain knows that label 16002 always and uniquely rep-
resents Router PE2, 16003 always represents Router PE3, and so on. These are referred to as
Node SIDs (Segment Identifiers).
A Node SID is a type of Prefix SID, as it represents any prefix linked to a node. To send a
set of segment routing instructions is to specify these labels (Node SIDs); 16002, 16003 15
literally means “send this traffic via shortest ECMP path to PE2, then same to PE3.” If the
“uniqueness” rule is broken (two distinct routers are assigned the same label value), there will
be an issue on your network because the nodes will not be able to accurately determine the
appropriate path for routing traffic. (Technically, what happens is that IS-IS will prioritize the
“first programmed” label and ignore the “second” one. This can get complex as to what “first
programmed” means, as in when a router reboots or has failed, which router becomes “first
programmed”? OSPF, on the other hand, will withdraw both SIDs. Don’t worry about this
because this topic is highly unlikely to show up on the exam, but good to know.)
Global Segments are always distributed as a unique value via IGP (remember that SR no
longer relies on LDP as the label distribution mechanism). This value must be unique and
comes from a combination of a label range (SRGB) + index. The default SRGB range for
Cisco routers is 16000–23999 (notice how it does not overlap with the LDP range) and the
index is zero based (the first index = 0). In our scenario, we start adding index values to our
routers (index 2 for PE2, index 3 for PE3), so we will come up with globally known unique
values of 16002 and 16003 for these routers. Cisco gives an option to also define these as an
absolute value. There is no difference in daily operations whether absolute or relative indexes
are used.
There are two minimum requirements to enable Segment Routing:
■ Enable Segment Routing and Node SID in the IGP (shown later in the chapter under
respective protocols)
Example 15-1 demonstrates SRGB assignment on both IOS XE as well as IOS XR operating
systems.
Example 15-1 SRGB Verification on IOS XE and IOS XR
IOS
PE2# show running-config segment routing
!
730 CCNP SPCOR 350-501 Official Cert Guide
segment-routing
global-block 16000 23999
!
PE2#
IOS XR
RP/0/0/CPU0:PE4# show running-config segment-routing
!
segment-routing
global-block 16000 23999
!
RP/0/0/CPU0:PE4#
Local Segments
This instruction is allocated and understood by the originating node. It is locally significant
only (which aligns with the intended meaning regarding the local router). A locally allocated
MPLS label would be a good example of a local segment. Sometimes a router has more
than a single link for forwarding traffic. The operator can prefer one of these paths over
the other. In Figure 15-2, a packet arrives at PE3 (via label 16003). PE3 intends to send this
packet to PE6, and there are two shortest available paths—through P4 and P5. These links
are identified with local labels 24100 and 24150. Selecting one of them will instruct the
local router to pick the appropriate link.
Service Provider
PE2 P4 PE6
CE1 CE8
00
16003
241
24150
PE3 P5 PE7
IGP Segments
Segments construct a path through a network. There are two building blocks distributed by
IGP: Prefix Segments and Adjacency Segments.
■ Known as Prefix-SID
Observe this behavior in Figure 15-3 (note that we removed two links to better illustrate our
example), where different routers are used to forward traffic to P5 based on label 16005,
destined to the loopback address of 10.1.100.5. For this Segment Routing domain, PE3,
P4, PE6, and PE7 send traffic directly to P5 because when these routers look at the MPLS
forwarding table, label 16005 will be associated with the one interface directly connecting
to P5. The only exception is PE2 which will have two equal paths available due to ECMP.
How did all the routers learn that prefix 10.1.100.5/32 is associated with label 16005? R5 has
generated this value from the combination of the SRGB label base 16000, added its operator
assigned index +5, and advertised this label via IGP.
Service Provider
PE2 P4 PE6
16005 05
0
16005
16
CE1 CE8
16005
16005 16005
PE3 P5 PE7
10.1.100.5/32
to show up on the exam, but we include Example 15-2 to clear up any confusion regarding
the difference.
Example 15-2 Node SID and the N Flag
This example from IS-IS shows the R2 is receiving SR information from R1, which has IPv4
(1.1.1.1/32) and IPv6 (2001:1:1:1::1/128) prefixes advertised with the N (Node) flag set to 1—a
Node SID, not a Prefix SID.
■ Known as Adj-SID
Figure 15-4 illustrates this. Now, the packet has arrived at P5 and needs to travel further to
PE6 (10.1.100.6). The operator has a choice to impose a local decision on P5 on which links
to use—the direct link to PE6 or two-hop link via PE7. In this case, the link to PE7 is pre-
ferred (higher bandwidth, lower latency, encryption—take your pick), and label 24150 steers
the traffic toward PE7.
Service Provider
PE2 P4 PE6
E
CE1 0
10
CE8
24
24150
PE3 P5 PE7
1. Specify the sequential list of segment IDs in the packet header, known as a label stack
with the top label being read first.
2. Path is not signaled, and per flow state is not created (as in RSVP-TE).
3. A single protocol (IS-IS, OSPF, BGP) distributes this instruction.
In Figure 15-5, a network operator instructs PE2 to steer traffic to PE6 by sending it to P5
first via two available ECMP paths. Once P5 gets the packet, the top label 16005 is removed,
and P5 uses the direct link to PE6 by looking up this interface in the forwarding table where
it is associated with the dynamic adjacency label 24100.
16005
24100 Service Provider
Packet to 10.1.100.5/32
PE6
PE2 P4 PE6
CE1 CE8
24100
Packet to
PE6
PE3 P5 PE7
NOTE Please note that I (Brad) am simplifying the mechanics of Segment Routing to its
basic elements to facilitate a clear understanding of the fundamental concepts. In practice,
multiple labels may be used, including transport labels and service labels that carry L3VPN
traffic along with traffic engineering. Additionally, the number of labels a platform can
handle depends on its hardware capabilities. Generally, Segment Routing can accommodate
multiple labels in the label-switched path (LSP), with some platforms supporting up to 6, 9,
or even 12 labels. However, most networks do not typically construct such elaborate paths,
although it is possible and some customers have implemented them. Figure 15-6 shows a
simple example of a label stack where PE2 assigns the inner service label 24192 for VPN
traffic between CE1 and CE8. Labels are disposed along the way with PE6 associating this
VPN label with the connection to CE8.
Chapter 15: Segment Routing 735
16005
24100 Service Provider
24192 24192
Pac
PE2 P4 PE6 ket t
CE8 o
CE1 CE8
24100
24192
PE3 P5 PE7
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
SID/Index/Label (Variable)
IS-IS allocates the SRGB along with the Adjacency-SIDs and advertises both in IS-IS for
the enabled address-families. IS-IS enables MPLS forwarding for all non-passive interfaces.
Example 15-3 shows commands necessary to turn on Segment Routing in IS-IS.
Example 15-3 Commands to Turn on Segment Routing in IS-IS
IOS XR
RP/0/0/CPU0:PE4# show running-config router isis
router isis CCNP
set-overload-bit on-startup 300
is-type level-2-only
net 49.0001.0000.0000.0004.00
distribute link-state
nsf ietf
Chapter 15: Segment Routing 737
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Advertising Router
LS Sequence Number
LS Checksum Length
Opaque Information
Similar to IS-IS, OSPF will allocate and advertise the SRGB to its neighbors. It activates
MPLS forwarding on all OSPF interfaces, excluding loopback interfaces, and assigns Adja-
cency-SIDs to these interfaces. Example 15-4 shows commands necessary to turn on OSPF
for Segment Routing.
Example 15-4 Commands to Turn on OSPF for Segment Routing
IOS XR
RP/0/0/CPU0:PE4# show running-config router ospf
router ospf CCNP
nsr
distribute link-state
log adjacency changes detail
router-id 10.1.100.10
segment-routing mpls
segment-routing forwarding mpls
fast-reroute per-prefix
Chapter 15: Segment Routing 739
What about OSPFv3? While OSPFv3 has the potential to accommodate Segment Routing
for IPv6 and utilize a native IPv6 data plane, specific extensions outlined in an IETF draft are
required for implementation. It’s worth noting that, at press time, these extensions have not
been integrated into Cisco IOS XR and IOS XE.
architectures. To meet the demands of high-intensity east-west traffic found in these com-
pute clusters, operators frequently opt for variations of Clos or Fat-tree topologies. In these
massive data center networks, symmetrical topologies with numerous parallel paths con-
necting two server-attachment points are common. It is in this context that BGP excels and
arguably surpasses the IGP approach. The assertion that “BGP is a better IGP” challenges
traditional viewpoints and has sparked conversations.
What would make BGP an attractive choice? Remember that these massive data centers seek
maximum bandwidth to be transferred across the midpoint of the system. Such network
structures are designed to be both highly scalable, cost-effective, and are constructed from
affordable, low-end access-level switches. To maintain this level of scale, the designs call for
a single protocol with simple behavior and wide vendor support. With the above in mind,
when it comes to simplicity, BGP certainly has its advantages because it has less of a state
machine and fewer data structures. This may not appear intuitive at first glance, but it does
not take long to realize that the BGP RIB structure is simpler than those of Link-State Data-
bases (LSDBs). There is a very clear picture of “which routing information is sent where.”
There is a RIB-In and RIB-Out, a far easier construct for tracing exact routing paths than
following link-state topology constraints with areas and levels. When it comes to operational
troubleshooting, this is definitely a strength. Also, event propagation is more constrained in
BGP because link failures have limited propagation scope. We can argue that BGP has more
stability due to the reduced “event-flooding” domains. When it comes to traffic steering,
BGP allows for per-hop Traffic Engineering that can be used for unequal cost Anycast load-
balancing. In addition, BGP is widely supported by practically all vendors, so from the per-
spective of interoperability, BGP beats IGPs. We have been conditioned to perceive BGP as
slow and suitable primarily for inter-domain routing, but it has no issues with demonstrating
its adaptability and effectiveness in modern topologies. Therefore, it is advisable to approach
BGP with an open mind, recognizing its potential to perform as well as, or even better than,
traditional IGP alternatives in contemporary implementations.
BGP will advertise a BGP Prefix-SID associated with a prefix via BGP Labeled Unicast (BGP-
LU) IPv4/IPv6 Labeled Unicast address-families. BGP Prefix-SID is a global SID, and the
instruction forwards the packet over the ECMP-aware BGP best path to the associated pre-
fix. RFC 8277 specifies that Label-Index TLV must be present in the BGP Prefix-SID attri-
bute attached to IPv4/IPv6 Labeled Unicast prefixes. This 32-bit value represents the index
value in the SRGB space and has the format illustrated in Figure 15-9.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Label Index
The Prefix-SID for a locally originated BGP route can be set with a route-policy.
Example 15-5 shows how to attach a label-index with network and redistribute commands.
Example 15-5 Attaching a Label-Index via a Route-Policy
route-policy SIDs($SID)
set label-index $SID
end-policy
!
router bgp 100
address-family ipv4 unicast
network 10.1.100/4/32 route-policy SID(1)
allocate-label all 15
route-policy SIDs
if destination in (10.1.100.4/32) then
set label-index 1
endif end-policy
!
router bgp 100
address-family ipv4 unicast
redistribute connected route-policy SIDs
allocate-label all
One last thing regarding having BGP for a Segment Routing control plane. Remember the
Anycast load-balancing I mentioned earlier in this section? Anycast allows different nodes to
advertise the same BGP prefix. It is an application of Prefix SIDs to achieve anycast opera-
tions. Look at Figure 15-10, where I again moved some links around to represent a data
center’s spine-and-leaf architectures, with spines located at the top. PE2 and P4, while adver-
tising their individual BGP Prefix-SIDs (16002 and 16004, respectively), have been made
members of the same unicast set. Both of them advertise anycast prefix 10.1.100.24/32 with
BGP-Anycast SID 20001. PE3 wants to send traffic to PE7 but would like to exclude spine
PE6. BGP-Anycast SID 20001 will load-balance the traffic to any member of the Anycast set
and then forward it to PE7.
Additionally, due to BGP Prefix-SID global label usage, BGP-LU local labels are going to
be the same across all of the network’s ASBRs. As a result, these Anycast loopbacks can be
used as the next-hop for BGP-LU prefixes. That is pretty good resiliency! Nothing to scoff
at, for sure.
742 CCNP SPCOR 350-501 Official Cert Guide
20001
10.1.100.24/32
PE2 P4 PE6
20001
16007 16007
PE3 P5 PE7
Figure 15-10 BGP-SR Anycast Load-Balancing
destination. Then, the Segment List fields indicate the sequence of nodes in 128-bit IPv6
addresses to be visited from bottom to top. Segment List [n] shows the first node in the path;
Segment List [0] shows the last node in the path.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
...
■ Function: Represents any possible network instruction bound to the node that gen-
erates the SRv6 SID (network instruction) and is executed locally on that particular
node, specified by the locator bits.
1111:2222:3333:4444:5555:6666:7777:8888
Locator Function
Figure 15-12 IPv6 Segment Identifier
You now have the ability to send packets to a node (locator) and then instruct the node to
execute an action (function). This is not a subtle difference! In SR-MPLS, IGP with exten-
sions advertised the transport mechanism, and services (L2VPNs, L3VPNs) were signaled
independently via LDP or MP-BGP. You could change your transport (from MPLS to SR)
without affecting the upper protocols that ran on top of it. For the first time in the indus-
try, transport and services instructions are coupled and signaled in the SID. You will see an
example of this coming up shortly where an L3VPN is written into the SID.
744 CCNP SPCOR 350-501 Official Cert Guide
■ Source Node: This node has the capability to generate an IPv6 packet incorporating a
Segment Routing Header (SRH), essentially forming an SRv6 packet. Alternatively, it
serves as an ingress node that can apply an SRH to an existing IPv6 packet.
■ Transit Node: Found along the SRv6 packet’s path, the transit node functions without
inspecting the SRH. The destination address of the IPv6 packet does not align with
the transit node, and its role is primarily to forward the packet.
■ Endpoint Node: Located within the SRv6 domain, this node acts as the termination
point for the SRv6 segment. The destination address of the IPv6 packet containing an
SRH corresponds to the endpoint node. The endpoint node executes the specific func-
tion associated with the SID bound to the segment.
2001:db8:0600:0700:0300:f001:0000:0000
CE8
PE3 P5 PE7
2001:db8:0300::/48 2001:db8:0700::/48
PE6 and PE7 using a single (!) SRv6 SID (note that without uSID, a sequential Segment List
would have to be specified). Let’s unpack this:
1. PE2, PE6, PE7, and PE3 are SRv6 capable and are configured with 32-bit SRv6 block
2001:db8.
2. P4 and P5 run classic IPv6 forwarding and do not change the Destination Address.
3. PE6, PE7, and PE3 advertise their corresponding 2001:db8:0600::/48,
2001:db8:0700::/48, and 2001:db8:0300::/48 routes.
4. PE2 receives an IPv4 packet from CE1, encapsulates it, and sends an IPv6 packet with
the destination address 2001:db8:0600:0700:0300:f001:0000:0000. This is an SRv6
uSID Carrier that contains a sequence of micro-SIDs (instructions 0600, 0700, 0300,
f001, and 0000).
5. The 0600, 0700, and 0300 uSIDs are used to construct a traffic engineering path
to PE3 with two stops along the way—PE6 and PE7. uSID f001 is a BGP-signaled 15
instruction sent by PE3 indicating the VPNv4 service. uSID 0000 indicates the end of
instructions.
6. What happens at P4? P4, running only classic IPv6, forwards the packet along the
shortest path to PE6.
7. PE6 receives the packet, pops its own uSID 0600, and advances the micro-program by
looking up the shortest path to the next Destination Address (DA) 2001:db8:0700::/48.
Now the DA is 2001:db8:0700:0300:f001:0000:0000:0000. This behavior is called shift
and forward.
8. PE7 receives the packet, pops its own uSID 0700, and advances the micro-program by
looking up the shortest path to the next Destination Address (DA) 2001:db8:0300::/48.
Now the DA is 2001:db8:0300:f001:0000:0000:0000:0000. Shift and forward again.
9. P5 forwards the packet to PE3, just like P4 did.
10. PE2 receives the packet and executes the VPNv4 function based on this own instruc-
tion f001. It decapsulates the IPv6 packet, performs IPv4 table lookup, and forwards
the IPv4 packet to CE8.
outer IPv6 header with P4’s destination address. In the opposite direction, PE3 removes the
outer IPv6 header, looks up the destination prefix, and pushes MPLS label 16002 for the
BGP next-hop of PE2.
SR-MPLS SRv6
Prefix SID 16002 Prefix SID 16003 SRv6 Locator 2001:db8:0::3/48 SRv6 Locator 2001:db8:0::4/48
10.1.100.2/32 10.1.100.3/32 2001:db8:0::3/128 2001:db8:0::4/128
PE2 P4
PE3
Interworking Gateway
172.16.1.0/24 172.16.2.0/24
PE2 P4 PE6
Lo1 10.1.100.2/32 PE3 P5 PE7
Lol 10.1.100.7/32
3. PE7 finds LDP label binding 24016 from its neighbor PE6 for PE2’s Forwarding Equiv-
alence Class (FEC) of 10.10.100.2/32 and forwards the packet to PE6.
4. PE6 finds LDP label binding 24020 from its neighbor PE5 for PE2’s FEC of
10.10.100.2/32, swaps 24016 for 24020, and forwards the packet to PE5.
5. PE5 finds LDP label binding 24036 from its neighbor PE4 for PE2’s FEC of
10.10.100.2/32, swaps 24020 for 24046, and forwards the packet to P4.
6. P4 lacks an LDP binding originating from its next-hop PE3 for the FEC associated
with PE1. What it does carry, though, is an SR node segment pointing to an IGP route
leading to PE2. P4 engages in label merging, wherein it replaces its local LDP label
(24036) for FEC PE2 with the corresponding SR node segment label, which is 16002.
7. PE3 pops label 16002 (assuming penultimate hop popping function is used) and for-
wards the packet to PE2.
8. PE2 receives the packet, looks up its service label of 30001, and drops the packet into 15
the appropriate customer VRF.
We now have an end-to-end LDPÐSR path. Simple. What about in the opposite direction?
This is where we will encounter a problem going from SRÐLDP. Can you take a moment to
think what the problem would be by looking at Figure 15-14 before you examine Figure
15-15? PE2 needs to send traffic to 172.16.2.0/24 with service label 40001 that it received
with the BGP next-hop of 10.1.100.7/32. Since PE2 only speaks SR, when it looks up the
node segment for 10.1.100.7/32, what will it find in its label database? Nothing. Why?
Because such label mapping does not exist on the network, since the operator has never con-
figured it; therefore, no router advertises or receives this label mapping. There must be some-
thing to associate PE7’s loopback with SR label mapping. The better answer here is Segment
Routing Mapping Server (SRMS). All analogies finally break down, but it is possible to think
of SRMS as a sort of route reflector for SR labels. Just as in BGP, we can centrally instruct all
routers in our SR domain. Look at Figure 15-16.
172.16.1.0/24 172.16.2.0/24
PE2 P4 PE6
Lo1 10.1.100.2/32 PE3 P5 PE7
SRMS Lol 10.1.100.7/32
16007 = 10.1.100.7/32
4. PE2 finds an SR label binding 16007 it has received from the SRMS PE3 for PE7’s FEC
of 10.10.100.7/32 and forwards the packet to PE3 as the IGP next-hop.
5. PE3 finds an SR label binding 16007 pointing to its neighbor P4 as the IGP next-hop,
swaps 16007 for 16007, and forwards to P4.
6. P4 does not have an SR label for PE7’s IGP route, but it holds LDP label 24011 for this
FEC. It swaps 16007 for 24011 (remember the process is called label merge) and for-
wards to P5.
7. P5 swaps 24011 for 24022 and forwards to PE6.
8. PE6 pops the label (due to PHP in this setup) and forwards to PE7.
9. PE7 receives the packet, looks up its service label of 40001, and drops the packet into
the appropriate customer VRF.
What should you remember here? Segment Routing Mapping Server labels are only neces-
sary in the SRÐLDP direction. SR and LDP labels come from separate label database ranges
(16000–23999 for SR and 24000+ for LDP), so unless the operator has deliberately violated
this guidance, there is not a chance the network will be in a state of confusion, since the SR
and LDP labels do not overlap each other. The network must maintain continuous SR con-
nectivity in the SR domain. The network must also maintain continuous LDP connectivity in
the LDP domain. If you understood the packet walkthrough, these points should be clear.
One last thing to know for completeness. By default, Cisco routers prefer LDP as the label
imposition mechanism when the MPLS features are turned on. The way to enable SR for
label imposition is shown in Example 15-6.
Example 15-6 Segment Routing Label Imposition Preferred
IS-IS
OSPF
Figure 15-17 illustrates this best. PE2 needs to send traffic for prefixes 172.16.100.0/24 and
172.16.200.0/24 to the same PE7 router, since it is the egress point connecting these two net-
works. However, traffic destined for 172.16.100.0/24 must follow the top low-delay path due
to latency requirements, and traffic for 172.16.200/24 must take the bottom low-cost path
because the customer is not paying for the premium service. Try doing this with IGP alone!
SR policies, on the other hand, easily differentiate traffic between the same pair of routers
by steering them into differently colored policies (different numeric values) that properly
groom traffic onto the desired paths.
PE2 P4 PE6
172.16.100.0/24
172.16.200.0/24
PE3 P5 PE7
SR Policy “Black” for Low-Cost Paths:
1) Headend = PE2
2) Tailend = PE7
3) Color = Black (Numeric Value 200)
Figure 15-17 Segment Routing Policy Places Traffic on Diverse Paths
750 CCNP SPCOR 350-501 Official Cert Guide
Binding-SID (BSID)
Binding Segment Identifier (BSID) is a SID value that is an opaque representation of a
Segment Routing Policy. BSID shows a chosen path to upstream routers. It provides isolation
and decoupling between distinct source-routed domains while increasing overall network
scalability. Do not forget that SR Policies use BSID to program a router’s forwarding table
(just mentioned in point 6).
Note how in Figure 15-18 different routing/SR domains are involved. The list of SIDs to steer
traffic onto the imagined low-delay path between DC1 and DC5 (DC2, PE2, P4, P4-ADJ-
SID, PE7, DC5) can be long. A single BSID can represent the entire Segment Routing Policy
sending it through the WAN Core domain, requiring only three SIDs (DC Primary, WAN
Core SR Policy, DC Secondary). This reduces the number of segments imposed by the
source.
DC1 DC6
DC3 DC5
PE3 P5 PE7
Additionally, this approach keeps one domain unaffected by routing changes in another
domain, since BSID does not change during these events. Domain internal operations can be
thus hidden (opaque) from each other, which can be beneficial to service providers who do
not want to disclose the details of how they provide services to their customers.
Flex-Algo
Flex-Algo is the best way to do traffic engineering today. Flex-Algo, short for Flexible
Algorithm, enhances Segment Routing Traffic Engineering (SRTE) by introducing additional
segments with distinct properties compared to the Interior Gateway Protocol Prefix seg-
ments. It expands the SRTE capabilities by including customizable, user-defined segments in
the toolbox. It can also use Segment Routing on-demand next hop (ODN) and Automated
Steering to create traffic-engineered paths based on user intentions; these are outside of the
scope of this book.
IETF has standardized algorithms 0 through 127. Routers run the default algorithm 0 as the 15
IGP shortest path derived from the IGP metric. Additional algorithms 128 through 255 can
be customized by network operators. They are known as SR IGP Flexible Algorithms, or
Flex-Algo as the shorter version. It is called flexible because you can decide which metric
you want to use in your intent.
In our earlier discussion of Prefix-SID in this chapter, we focused solely on explaining the
default aspect of Prefix-SID behavior, specifically the one linked to algorithm 0. When you
read (you really should) RFC 8867 and RFC 8665, you will notice that both IS-IS and OSPF
include Prefix-SID sub-TLV algorithm field in the formats illustrated in Figure 15-19 and
Figure 15-20.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
SID/Index/Label (Variable)
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Type Length
SID/Index/Label (Variable)
Algo 128
R2 R4
R1 R2 R3
R5 R8 R9
R6 R7
Algo 129
1. The operator can define Flex-Algo 128 to prioritize IGP metric and avoid link-affinity
“dark-gray” on the bottom.
2. The operator can define Flex-Algo 129 to delay metric and avoid link-affinity “light-
gray” on the top.
3. Routers R1 and R9 would be added to participate in algo 0, 128, and 129.
4. Routers R1, R2, R3, and R4 would be added to participate in algo 0, 128.
5. Routers R5, R6, R7, and R8 would be added to participate in algo 0, 129.
Consider how powerful the network has become. The operator has bisected the network
into two distinct profiles. The top part has routes based on the shortest path according to
the IGP. The bottom half will route delay-sensitive traffic through the part of the network
that uses dynamic link-delay measurement, which will be advertised by the IGP. Someone
reroutes your optical underlay path? Does not matter. Someone moves a circuit without
bothering to notify your department? Does not matter. The network will recalculate the
best path according to the intent you had in mind. If you see the beauty of this approach,
you will understand that the limitation of what can be done on a network at scale exists
only in the minds of its architects. Low-cost delay-optimized paths (my personal SP opera-
tor nirvana, because this is where I make money) have now become a reality because we can
now finally differentiate services on our infrastructure. It is my opinion that while SR poli-
cies are effective for carving dynamic paths on the network, the simplicity and flexibility
of Flex-Algo allow the operator to easily slice the network into multiple planes that can be
used to carry encrypted, application-dependent, dynamic delay-based, low-cost, and other
intent-based traffic. You can even drain all network traffic to the bottom dark-gray plane of
the network, run upgrades on the top light-gray plane of the network, and repeat the process
again in the other direction—accomplishing zero downtime for your customers.
That is the power of Flex-Algo—operational simplicity and scale. You can finally manage
massive networks with a simple picture in mind, rather than constructing hundreds of SR
Policies for individual applications. Flex-Algo is applicable to SR-MPLS and SRv6. In the
Chapter 15: Segment Routing 753
case of SR-MPLS, you will get an extra label for the router’s loopback. In SRv6, you get a
different locator (recall our earlier discussion on this topic). SP operators are really beginning
to heavily use this approach with SRv6 (IPv6).
Something you need to be aware of that is directly called out in the exam blueprint is encap-
sulation. SR-MPLS uses SRTE policies (on-demand or manual) to steer traffic into Flex-
Algo. If you want traffic to follow a particular path, you specify a list of SIDs. When you
specify the SID associated with Flex-Algo, the traffic takes that specific Flex-Algo plane.
In contrast, SRv6 does not use policies. In SRv6, the ingress PE will directly encapsulate
traffic based on the Service SID advertised in BGP. That Service SID (remember locator +
function?) is a combination for the Algo locator and decapsulation function. Transport and
Service become blended and are encoded into the transport intent (Algo locator). Transport
intent and Service function are encapsulated into the same instruction. SRv6 is a much sim-
pler approach to driving traffic intent.
15
TI-LFA
To date, TI-LFA is the number one reason why network operators deploy SR: they want an
automated way to compute a backup path by IGP. No need to do MPLS-TE (traffic engineer-
ing tunnels) for fast reroute (FRR). Topology-independent loop-free alternate (TI-LFA)
provides a simple, automatic, optimal, and topology-independent sub-50ms per-prefix pro-
tection to the network. It can protect Segment Routing, LDP, and IP traffic without relying
on the construction of backup tunnels of any sort, as is the case in RSVP-TE. Whether IS-IS
or OSPF is used, these protocols precompute a backup path for each active path per IP pre-
fix destination. They run an SPF algorithm for the primary path and then automatically run
the SPF again, excluding the primary path—deriving the backup path. IGP pre-installs this
path in the data plane and immediately uses it once the active destination path is impacted.
Be careful with analogies, because they all finally breakdown, but it can be helpful to think
of how an EIGRP-feasible successor works. The router already knows what the post-
convergence path will look like even before the failure occurs.
Figure 15-22 shows a fundamental TI-LFA operation from router PE2’s perspective; once
the protected PE4–P2 link fails, traffic is rerouted over the post-convergence path, which is
known and preprogrammed before the link failure occurs. The recommendation is to enable
this functionality on all routers in your Segment Routing domain. This approach creates
automatic backup paths throughout the network without the burden of manually provision-
ing backup tunnel paths.
PE2 P4 PE6
PE3 P5 PE7
Figure 15-22 TI-LFA Operation
754 CCNP SPCOR 350-501 Official Cert Guide
P-Space
In Figure 15-23, we return to our topology and remove some of the internal links to create a
ring topology to better understand these reference areas.
PE2 P4 PE6
P-Space
PE3 P5 PE7
Q-Space
Q-space refers to a set of backup paths or alternate next hops that are precomputed for use
during a failure. Figure 15-24 shows the other side of the protected PE2–P4 link from router
P4’s perspective, and the same rules apply again. When following the same rules, the set of
routers reachable from P4 via the shortest path without possibly going through the protected
link only include PE6 and PE7.
PQ Node
Viable repair tunnel endpoints are found at intersections of P- and Q-Spaces. In
Figure 15-25, there is no common node that belongs to both reference areas and hence no
viable repair tunnel endpoint is present.
Chapter 15: Segment Routing 755
PE2 P4 PE6
Q-Space
PE3 P5 PE7 15
PE2 P4 PE6
Q-Space
P-Space
PE3 P5 PE7
Extended P-Space
Because PE4 needs to repair the protected PE4–P2 link and reach any router in this ring
topology without using the protected link, the concept of Extended P-Space was intro-
duced. Extended P-Space is the union of each of PE4’s neighbors. In this case, this is router
PE3 in Figure 15-26, whose P-Space contains routers P5 and PE7. By combining P-Spaces
of PE2 and PE3, we extend PE2’s reach, and PE7 becomes a common point for P- and
Q-Spaces. A PQ node of a node PE2, in relation to a protected link PE2–P4, is a node that
belongs to both the P-space (or extended P-space) of PE2 for that link and the Q-space of P4
for the same link. PE7 is chosen as the repair tunnel endpoint. Why? Because repair tunnels
are chosen from a set of PQ nodes.
756 CCNP SPCOR 350-501 Official Cert Guide
PE2 P4 PE6
Extended P-Space
PQ Node
Q-Space
PE2’s
P-Space
PE2 P4 PE6
Q-Space
P-Space
PE3 P5 PE7
P9
back to PE2, looping the doomed packets. This is a real problem that, in the rLFA (Remote
LFA) cases, can sometimes be solved by a Targeted LDP session, where PE2 would establish
a remote LDP session with PE7, but this approach also has limitations that are outside of
the scope of this exam. TI-LFA handles this topology though a “double-segment” coverage,
where two labels are pushed (PE3, PE3-R5 ADJ-SID) to overcome this problem.
Second, notice the additional P9 router. Let’s suppose it is not a part of the network core
or planned for capacity. Classic LFA will steer the traffic on this suboptimal backup path.
Additional case-specific operator involvement would be necessary to avoid such undesired
backup paths.
In contrast, a topology-independent loop free alternate (TI-LFA) provides 100 percent cover-
age and uses the post-convergence path as the fast reroute (FRR) backup path.
TI-LFA delivers significant improvements over the traditional loop-free alternate fast reroute
(LFA-FRR) approach. TI-LFA uses a post-convergence path after a link failure occurs. This 15
path is known before a failure occurs and is preprogrammed into the data plane. TI-LFA uses
PQ nodes, or a combination of P and Q nodes located on the post-convergence path to com-
pute backup paths. Traffic will be rerouted in sub-50ms on any topology.
While the blueprint does not focus on configuration of Segment Routing features, you
need to know how to configure TI-LFA. So, here is your homework for this section: return
to Example 15-3, which I took from a massive production lab we have within Cisco to show
the latest technologies. Study it and locate the two highlighted commands that start with
fast-reroute. I recommend you enable this on all provider facing links; they will provide
“automagic” protection mechanisms for your entire network without having to build backup
tunnels. Know that TI-LFA works seamlessly with Flex-Algo we discussed in the previous
section.
NOTE One last thing that will not come up on the exam (as TI-LFA is positioned as a bet-
ter alternative). Be aware that the TI-LFA concept is not new. RFC 4090 (Fast Reroute Exten-
sions to RSVP-TE for LSP Tunnels) described this very technique in 2005, 10 years before
Segment Routing hit the street) in Section 3.1 (One-to-one Backup method), albeit RSVP
used signaling for tunnels and Segment Routing uses a label stack to guide the packet onto
the new path. I’m here to assist you in preparing for your exam and provide valuable back-
ground information, without engaging in debates over differing viewpoints.
PCE-PCC Architecture
PCE-PCC architecture involves a Path Computation Element (PCE) that centrally com-
putes optimal network paths and a Path Computation Client (PCC) that requests these paths,
enabling efficient and scalable traffic engineering across the network. To take a step back,
Segment Routing Traffic Engineering (SRTE) allows the network operator to force a packet
anywhere on the network. The ingress router will contain the policy containing the opera-
tor’s intent. If the network is small like the basic topology we have been using for our exam-
ples, there are only a handful for routers that we have to individually configure with such
policies. A great majority of service provider networks you are likely to encounter in your
career will contain dozens, hundreds, or maybe thousands of nodes. The task of deploying a
758 CCNP SPCOR 350-501 Official Cert Guide
uniform policy on such a distributed network domain becomes laborious and operationally
costly. How do you scale this type of rollout? There are many other limitations operators
have encountered on distributed SR (or RSVP-TE for that matter) networks. Among the more
notable ones is stale policies, in which operators define a set of policies and in six months
traffic patterns change, which leads to continuous “rinse-and-repeat” of policy redeploy-
ment. Another one would be applications requesting the best available path in real time—not
something that can by automatically done with the SRTE approach we have described thus
far. What about being able to offer paths that meet certain SLAs? There are many other ones.
From the beginning of Traffic Engineering, the need for a centralized optimization element
that can dynamically adjust policies based on current network conditions was apparent.
Enter Path Computation Element Protocol (PCEP). It was initially specified to support
the classic RSVP-TE protocol. With the introduction of Segment Routing, PCEP has been
extended to support SRTE. RFC 4655 defines multiple terms that support PCEP-based archi-
tecture. Of immediate interest to us are the following terms:
■ Path Computation Element (PCE), which is “an entity that can compute a network
path or route based on a network graph, and of applying computational constraints
during the computation. The PCE entity is an application that can be located within a
network node or component, on an out-of-network server, etc.…” (RFC 4655)
Notice that you can run PCE on the router itself or can rely on another adjunct processor to
perform this function. In the case of Cisco products, that would be the Crosswork Network
Controller, which provides a wide assortment of functionalities that helps customers to sim-
plify and automate intent-based network service provisioning, visualization, monitoring, and
optimization in a multivendor network environment with a common GUI and API. In Cisco’s
documentation, you will often encounter references to SR-PCE. When you see these, it will
either be a router running PCE or the Crosswork Network Controller. It can also think of
PCE as a BGP Route-Reflector for Segment Routing and associated services. The following is
a partial list of its capabilities (get the overall picture, do not memorize these for the exam):
■ Segment Routing (SR) policy provisioning with explicit intent (for example, bandwidth
constraints, latency minimization, etc.).
■ Services provisioning (for example, L2VPN, L3VPN services with associated segment
routing policy).
■ Monitoring and troubleshooting the health of L2VPN and L3VPN services through
empirical data plane verification.
What makes the SR-PCE controller so powerful is that it provided centralized SRTE visibil-
ity into multidomain topologies, something that SRTE routers are not able to deliver. North-
bound APIs allow SR-PCE to compute paths in real time. Because of the above, the SR-PCE
can construct SLA-aware path computations even across network domains while delivering
end-to-end network topology awareness. Again, you should not view SR-PCE as a single all-
overseeing device but rather think of a BGP Route-Reflector deployment model where intent 15
is centrally disseminated.
Figure 15-28 shows a screenshot taken from the Crosswork Network Controller’s GUI
console.
The Cisco Crosswork Optimization Engine stands as a key element within the Crosswork
Automation Suite, offering real-time network optimization capabilities. Network operators
can enhance network utility and accelerate service deployment through dynamic Traffic
Engineering and proactive optimization. Working seamlessly with the Crosswork Optimi-
zation Engine, the WAN Automation Engine (WAE) caters to diverse aspects of capacity
management. It spans from long-term network engineering to capacity planning and Traffic
Engineering, ensuring optimal network operation under various conditions. Furthermore, the
WAN Automation Engine serves a valuable role in simulation analysis, aiding in the identifi-
cation of potential network hotspots during failure scenarios.
760 CCNP SPCOR 350-501 Official Cert Guide
BGP control plane, Binding Segment Identifier (BSID), Candidate Paths, Extended
P-Space, Flex-Algo, Global Segments, IGP Adjacency Segment, IGP Prefix Segment, IS-IS
Control Plane, Label Distribution Protocol (LDP), Label Switching Database (LSD), Local
segment, OSPFv2 Control Plane, P-Space, Path Computation Client (PCC), Path Computa-
tion Element (PCE), Path Computation Element Protocol (PCEP), PCE-PCC architecture,
PQ node, Q-space, Segment Routing, Segment Routing Control Plane, Segment Rout-
ing Global Block (SRGB), SR-MPLS (Segment Routing based on MPLS data plane), SRv6
(Segment Routing based on IPv6 data plane), SRv6 control plane, Topology-Independent
Loop-free Alternate (TI-LFA)
To test your memory of the commands, cover the right side of Table 15-6 with a piece of
paper, read the description on the left side, and then see how much of the command you can
remember.
The 350-501 exam focuses on practical, hands-on skills that are used by networking profes-
sionals. Therefore, you should be able to identify the commands needed to configure and
test. Note that not all commands are fully covered in the chapter, but their presence in the
table below should lead you to investigate them further to understand this technology.
Review Questions
As a part of the review, we encourage you to provide a single-sentence answer (keep your
answers as short as possible) to the following questions. If you struggle to complete this
answer in a single sentence, this may indicate a lack of clarity or reveal gaps in your under-
standing. We have constructed these questions to help you consolidate this chapter’s infor-
mation and extract the essence of the covered content.
The answers to these questions appear in Appendix A. For more practice with exam format
questions, use the Pearson Test Prep Software Online.
1. How does the implementation of Segment Routing enhance network scalability and
simplify Traffic Engineering compared to traditional routing protocols?
2. In what ways can Segment Routing contribute to improved network resiliency and
faster convergence times, especially in the face of dynamic changes or failures?
3. How can Segment Routing adapt to support emerging trends such as 5G networks,
edge computing, and the increasing demand for network automation?
4. What specific scenarios or network topologies benefit the most from using the TI-LFA
loop-free backup path mechanism?
5. Can you name one key benefit of integrating SRv6 to meet the evolving demands of
modern applications, services, and emerging technologies?
Chapter 15: Segment Routing 763
Bibliography
S. Bryant, C. Filsfils, S. Previdi, M. Shand, and N. So. RFC 7490, Remote Loop-Free Alter-
nate (LFA) Fast Reroute (FRR), https://www.ietf.org/rfc/rfc7490.txt, IETF, April 2015.
P. Camarillo, Ed. RFC 8986, Segment Routing over IPv6 (SRv6) Network Programming,
https://www.ietf.org/rfc/rfc8986.txt, IETF, February 2021.
D. Dukes, Ed. RFC 8754, IPv6 Segment Routing Header (SRH), https://www.ietf.org/rfc/
rfc8754.txt, IETF, March 2020.
A. Farrel, J.-P. Vasseur, and J. Ash. RFC 4655, A Path Computation Element (PCE)-Based
Architecture, https://www.ietf.org/rfc/rfc4655.txt, IETF, August 2006.
C. Filsfils. Segment Routing, Part II: Traffic Engineering, Self-published, 2019 (ISBN:
978-1095963135).
C. Filsfils, K. Talaulikar, Ed., D. Voyer, A. Bogdanov, and P. Mattes. RFC 9256, Segment
Routing Policy Architecture, https://www.ietf.org/rfc/rfc9256.txt IETF, July 2022. 15
L. Ginsberg, Ed. RFC 8667, IS-IS Extensions for Segment Routing, https://www.ietf.org/
rfc/rfc8667.txt, IETF, December 2019.
LabN. RFC 5250, The OSPF Opaque LSA Option, https://www.ietf.org/rfc/rfc5250.txt,
IETF, July 2008.
J. Liste. A Guide to a Successful Segment Routing Deployment, Cisco Live Presentation,
2023.
S. Litkowski, A. Bashandy, C. Filsfils, P. Francois, and B. Decraene. Internet Draft, Topol-
ogy Independent Fast Reroute Using Segment Routing, https://www.ietf.org/archive/id/
draft-ietf-rtgwg-segment-routing-ti-lfa-11.html, IETF, June 2023.
P. Pan, G. Swallow, and A. Atlast, Eds. RFC 4090, Fast Reroute Extensions to RSVP-TE
for LSP Tunnels, https://www.ietf.org/rfc/rfc4090.txt, IETF, May 2005.
S. Previdi, Ed. RFC 8665, OSPF Extensions for Segment Routing, https://www.ietf.org/
rfc/rfc8665.txt, IETF, December 2019.
S. Previdi. RFC 8670, BGP Prefix Segment in Large-Scale Data Centers, https://
www.ietf.org/rfc/rfc8670.txt, IETF, December 2019.
S. Previdi and L. Ginsberg, Eds. RFC 8402, Segment Routing Architecture, https://
www.ietf.org/rfc/rfc8402.txt, IETF, July 2018.
Redback Networks, Inc. RFC 5305, IS-IS Extensions for Traffic Engineering, https://
www.ietf.org/rfc/rfc5305.txt, IETF, October 2008.
E. Rosen. RFC 8277, Using BGP to Mind MPLS Labels to Address Prefixes, https://
www.ietf.org/rfc/rfc8277.txt, IETF, October 2017.
A. Roy. Internet Draft, OSPFv3 LSA Extendibility, https://datatracker.ietf.org/doc/html/
draft-ietf-ospf-ospfv3-lsa-extend-23, IETF, January 2018.
Segment Routing website: https://www.segment-routing.net
This page intentionally left blank
Index
source-based, 393–394
requirements for support in an mVPN,
Q
614
Q-in-Q encapsulation, 535
RP trees, 395
QoS (Quality of Service), 659,
RPs (rendezvous points), 410 938–939
PIMv2, 437–439 Best Effort, 659
PIMv6, 433–437 CBTS (Class-Based Tunnel Selection),
ping, 431, 633–634, 637–646 716–720
ping mpls ipv4 command, 488–489 congestion avoidance, 961
platform qos marker-statistics RED (Random Early Detection),
command, 968 962–964
PLE (Prive Line Emulation), 21 WRED (Weighted Random Early
Detection), 964–966
PLR (Point of Local Repair), 696
DiffServ, 660
point-to-point network, IS-IS, 134
IntServ, 659
policy. See also QoS (Quality of
Service) IPv6 Flow Label, 971–972
-based QoS, 660 MPLS, 660–661
CoPP, 768–769 Pipe mode, 661–662
route, 251–253 Short Pipe mode, 662
Segment Routing, 749, 750 Uniform mode, 661
trigger, 869 MPLS TE
ports, 802.1ad, 537–538 DiffServ-TE solution, 712–713
MAM (Maximum Allocation
POTS (plain old telephone service), 18
Model), 713–714
PQ Node, 754–755
RDM (Russian Dolls Model),
prefix advertisement, BGP, 246–248 714s-716
using network statement, 250 PBTS (Policy-Based Tunnel Selection),
using redistribution, 253–255 717–720
prefix list, 100–103 policy-based, 660
prefix set, 103–105 priority queuing, 958
priority queuing, 958 traffic classification, 940–942
privileged EXEC mode, 44 802.1Q VLAN tag, 942
provider bridge, 535–537 CoS (Class of Service), 944–945
pseudonode, 132 DSCP (Differentiated Services
Code Point), 943–945
pseudowire, 6
IP Precedence, 943–944
P-Space, 754
matching on access-lists, 946
punt a packet, 491
MPLS EXP field, 945–946
pwd command, 55 ToS (Type of Service) byte,
943–945
route map 1057