O'Reilly logo

MPLS in the SDN Era by Krzysztof Grzegorz Szarkowicz, Antonio Sanchez Monge

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required


About This Book

There are many Multiprotocol Label Switching (MPLS) books available on the market. In particular, we have been very much influenced in the recent past by these two great books:

  • MPLS-Enabled Applications: Emerging Developments and New Technologies, Third Edition by Ina Minei and Julian Lucek (Wiley, 2010).

  • MPLS and VPN Architectures by Ivan Pepelnjak and Jim Guichard (Cisco Press, 2010).

What is the point in releasing another book about MPLS? In two words: interoperability and Software-Defined Networking (SDN).


Although this first edition is published in late 2015, the initial idea dates from mid-2012. This book was initially conceived to describe real MPLS interoperability.

Over the past decade, we have heard this sentence from many customers: “You vendors keep speaking about what you do better than your competitors, but you never tell us what you can do with them on a multivendor network.” Clearly, the answer, “We try to comply to the standards—ask the other vendors to do the same and it should be fine,” is not satisfactory enough for large feature sets. This book attempts to break that taboo by describing, for the first time in networking history, how a large portfolio of multivendor MPLS services can be deployed on real networks, down to the configuration level. We’ll look at what interoperates and what does not interoperate yet.

The two chosen network operating systems are Juniper’s Junos and Cisco’s IOS XR. Although there are other relevant MPLS vendors, a basic combinatory analysis shows that achieving interoperability among four vendors is six times as costly as doing it for two vendors.

MPLS in the SDN Era

In the early 2010s, some people claimed that Softwared-Defined Netwroking (SDN), specifically, OpenFlow would replace MPLS. However, after realizing the many challenges of the first OpenFlow version, SDN was redefined into a paradigm (SDN 2.0) that shares many of the principles that have made MPLS a very successful service provider technology for decades.

Looking at SDN and MPLS as competing technologies is fundamentally wrong. MPLS is a key SDN enabler. This statement holds particularly true if you look at MPLS as an architectural paradigm (not as an encapsulation). In a nutshell, this is the MPLS model:

  • Decoupling control plane from forwarding plane.

  • Decoupling service from transport.

  • Decoupling overlay from underlay.

  • Layered architecture with a feature-rich edge and a fast transport core. This approach can be applied to the WAN, to data centers, and so on.

  • Building overlay networks at the edge in order to support multitenancy and multiservice.

  • Minimizing the forwarding state on the core.

  • Advanced packet steering by either signaling forwarding paths and/or by stacking instructions on packet headers.

It is hard to imagine a scalable network that does not follow these principles. The implementation details (and the actual encapsulation is one of these details) are secondary. For example, this book considers Ethernet VPN (EVPN) with Virtual eXtensible LAN (VXLAN) transport as a genuine MPLS technology. Even if it does not make use of MPLS labels, this solution is truly based on the MPLS paradigm. Looking at the details, VXLAN does not implement instruction stacking and it uses an IP-based encapsulation whose header overhead is 10 times bigger than that of MPLS.

On the other hand, there is a fast-growing MPLS trend at large-scale data centers, especially for cloud providers. New data center solutions use the Border Gateway Protocol (BGP) and MPLS technologies in a similar way to what WAN service providers have done for decades. This trend not only includes the MPLS paradigm, but more and more, the MPLS encapsulation, too.

One of the proofs that MPLS is more relevant in the SDN era than ever is the exploding amount and variety of MPLS features that networking vendors are developing to meet the requirements of a fast-changing market. This book tries to reflect this reality by including technologies and use cases that are in their earliest life stage.

MPLS is a flexible technology that is not complex, per se. As any modular technology, it can become as complex as you want (or rather, as complex as the requirements are).

Live Book

This book is very practical, and the authors want to keep it alive after publication. Here are some additional resources that you can use:

  • For a better reading experience and for space reasons, this book only shows the configuration that is relevant for each section but not the full configurations. In the months following this book’s publication, the authors will start to upload some full configurations to this book’s blog at http://www.mplsinthesdnera.net.

  • The authors kept some interop scenarios in the cellar and they will post them periodically on this book’s blog at http://www.mplsinthesdnera.net.

  • You can write directly to the authors at mplsinthesdnera@gmail.com. Please keep it fair. Feedback, suggestions for new blog posts, or clarification queries are very welcome. Consultancy requests will not be answered.

Contents of This Book

This book is written so that you can read it in a linear fashion, from its first page to the last one, which is the approach that we recommend. However, if you are only interested in certain chapters, the following list alerts you to the interchapter dependencies. For example, the dependencies for Chapter 9 are Chapter 1, Chapter 2, and Chapter 3. This means that in order to read Chapter 9 you need to master the concepts explained in the first three chapters but you can skip Chapter 4 through Chapter 8 if you’d like.

Chapter 1, Introduction to MPLS and SDN lays the foundation for the rest of the book by introducing basic MPLS and SDN concepts and by providing a static LSP example. There are no chapter dependencies.

Chapter 2, The Four MPLS Builders covers the four methods for signaling dynamic MPLS LSPs: LDP, RSVP-TE, IGP (IS-IS, OSPF) SPRING, and BGP. Chapter dependencies: 1.

Chapter 3, Layer 3 Unicast MPLS Services explains 6PE (IPv6 transport over an IPv4/MPLS core) and BGP/MPLS IP VPNs (also known as L3VPNs). Chapter dependencies: 1, 2.

Chapter 4, Internet Multicast Over MPLS provides an IP multicast introduction and describes one interoperable method to transport global (non-VPN) IP multicast traffic over MPLS. Chapter dependencies: 1, 2, 3.

Chapter 5, Multicast VPN extensively covers most if not all of the interoperable flavors of BGP MVPN, previously known as next-gen MVPN. Chapter dependencies: 1, 2, 3, 4.

Chapter 6, Point-to-Point Layer 2 VPNs is all about pseudowires. The LDP-based and BGP-based flavors are both discussed. Chapter dependencies: 1, 2, and the first L3VPN sections of 3 (RD and RT concepts).

Chapter 7, Virtual Private LAN Service describes multipoint L2VPNs whose MAC learning is implemented at the forwarding plane. Chapter dependencies: 1, 2, 6.

Chapter 8, Ethernet VPN describes multipoint L2VPNs whose MAC learning is implemented at the control plane. Several flavors are discussed: EVPN with MPLS transport, EVPN with VXLAN transport, and PBB EVPN. Chapter dependencies: 1, 2, 6.

Chapter 9, Inter-Domain MPLS Services focuses on BGP/MPLS IP VPN Inter-AS options A, B, and C. Chapter dependencies: 1, 2, 3.

Chapter 10, Underlay and Overlay Architectures explores the myth of control-plane and forwarding-plane separation by presenting architectures that are very similar despite being used for quite different purposes: multiforwarder devices, fabrics, and virtualization overlays. Chapter dependencies: 1.

Chapter 11, Network Virtualization Overlays is the first genuine SDN chapter in this book. It describes how you can use the MPLS paradigm to interconnect VMs with one another and with subscribers. Dependencies: 1, 3, 8, 9 (option B), 10.

Chapter 12, Network Function Virtualization explains how to build Service Function Chains in order to steer traffic through virtualized network appliances. Chapter dependencies: 1, 10, 11.

Chapter 13, Introduction to Traffic Engineering explains how explicit paths can be dynamically computed upon static constraints such as metric, colors, and Shared-Risk Link Groups. The main focus is on RSVP-TE and there is also a scenario based on BGP-LU for Egress Peer Engineering (EPE). Chapter dependencies: 1, 2.

Chapter 14, TE Bandwidth Reservations shows how to reserve bandwidth with RSVP-TE, both statically and dynamically (auto-bandwidth). It also describes container LSPs applied to RSVP-TE load balancing. Chapter dependencies: 1, 2.

Chapter 15, Centralized Traffic Engineering introduces a model in which LSP path computation is performed by a central controller that communicates to network devices via PCEP. Chapter dependencies: 1, 2, 13.

Chapter 16, Scaling MPLS Transport and Seamless MPLS covers IGP and RSVP-TE scaling best practices and many flavors of LSP hierarchy with applications for service providers and data centers, with or without controllers. Chapter dependencies: 1, 2, 3, 9 (option C).

Chapter 17, Scaling MPLS Services describes common strategies to reduce the control plane load on low-scale devices. The focus is on L3VPN services. Chapter dependencies: 1, 2, 3.

Chapter 18, Transit Fast Restoration Based on the IGP explains how to achieve sub-50 ms convergence upon failure of transit links/nodes with IGP (OSPF, IS-IS) mechanisms, some of them tactically combined with RSVP-TE. It covers technologies like LFA, RLFA, TI-LFA, TI-FRR, and MRT. Chapter dependencies: 1, 2.

Chapter 19, Transit Fast Restoration Based on the RSVP-TE explains how to achieve sub-50 ms convergence upon failure of transit links/nodes by exclusively using RSVP-TE. Two models of path protection are described: facility protection and one-to-one protection. Chapter dependencies: 1, 2.

Chapter 20, FIB Optimization for Fast Restoration is a very vendor-specific chapter that explains how both Junos and IOS XR enhance their FIB structures to meet fast restoration requirements. Chapter dependencies: 1, 2, 3.

Chapter 21, Egress Service Fast Restoration explains how to achieve sub-50 ms convergence upon failure of transit egress links/nodes. It includes technologies like BGP PIC, tail-end protection and EPE protection. Chapter dependencies: 1, 2, 3, 6, 20.


The honest intention of the two authors has been to show working interoperable scenarios, focusing on the successful scenarios rather than criticizing any implementations. We have made every effort to remain neutral, despite both being Juniper Networks employees when we were writing this. If you spot any kind of favoritism, we can assure you that it was not intentional.

This book exclusively reflects the opinion of the authors and not the company for which they work. It does not contain any corporate message from Juniper Networks or any other vendors.

Every statement you see in this book is a conclusion drawn from personal research and lab testing. Let’s use the example of statements that are worded as follows: “vendor X supports, or implements, or does not support, or behaves, or interoperates, etc.” The actual meaning of this type of sentence is: “after some unofficial research and lab testing, these book authors came to the personal conclusion that vendor X seems to support, or seems to implement, or seems not to support, or seems to behave, or seems to interoperate, and so on.


This book is not a vendor official document.

Please also be aware of the following:

  • Some scenarios have been built with alpha prototypes. It is possible that at the time of publication some of the features and commands were not yet generally available. Vendors are not committed to releasing any of the features that are described in this book and have not yet been released. There is a good side: this book opens a window to the real state of the art and you have the opportunity to spy on the things that may be coming.

  • It is possible that some of the commands used in this book will change or become obsolete in the future. Syntax accuracy is not guaranteed.

Finally, for space and brevity reasons, the authors took the liberty to edit the command output examples by removing lines, columns, or characters. For this reason, this book’s examples do not have guaranteed accuracy either.

Conventions Used in This Book

The following typographical conventions are used in this book:


Indicates new terms, URLs, standards, drafts, email addresses, filenames, and file extensions.

Constant width

Used for device configuration, operation commands and their output, as well as protocol captures.


This element signifies a tip or suggestion.


This element signifies a general note.


This element indicates a warning or caution.

Safari® Books Online


Safari Books Online is an on-demand digital library that delivers expert content in both book and video form from the world’s leading authors in technology and business.

Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.

Safari Books Online offers a range of plans and pricing for enterprise, government, education, and individuals.

Members have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and hundreds more. For more information about Safari Books Online, please visit us online.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

  • O’Reilly Media, Inc.
  • 1005 Gravenstein Highway North
  • Sebastopol, CA 95472
  • 800-998-9938 (in the United States or Canada)
  • 707-829-0515 (international or local)
  • 707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://bit.ly/mpls-sdn-era.

To comment or ask technical questions about this book, send email to .

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia


MPLS in the SDN Era has two authors and four key contributors (Harold Ritter, Javier Antich, Gonzalo Gómez, and David Roy), who are further credited at the end of the book, together with Raghu Subramanian.

The first thing a book requires is time to write. The authors would like to thank their families for an outstanding level of patience, support, and understanding. Also to Pablo Mosteiro, Jos Bazelmans, and higher management for tactically freeing up time so the authors could write.

Then, it requires an editor and a publisher. Patrick Ames has helped in every phase of this 18-month project since its early scoping, and the authors could not have been in better hands. He took care of everything so they could focus exclusively on writing. O’Reilly has proven their excellence with a great flexibility, respect for the writers’ work, and top-notch editing (special thanks to Nicole Shelby, Courtney Allen, Octal Publishing and to The Book Analyst) and execution.

Minto Jeyananth, the main inventor of tail-end protection, helped countless times and produced a handful of interoperability fixes while displaying a mix of brightness and humility. In terms of innovation, the authors were also very lucky to count on the strong, bright, and humble support of several other inventors (in alphabetical order: Bruno Decraene, Hannes Gredler, Kaliraj Vairavakkalai, Nischal Sheth, Nitin Singh, Pushpasis Sarkar, Santosh Esale, Wen Lin, and more mentioned in the list that follows) who are helping to drive many of the latest developments explained in this book.

Writing about MPLS in the SDN era needs the guidance of people who have a 360-degree technological vision, like Bruno Rijsman, Pravin Bhandarkar, and Stuart Mackie. The authors also had the priviledge of interacting with two essential creators of MPLS and SDN: Kireeti Kompella and Yakov Rekhter.

This is a practical book and it would be nothing without labs. Many people helped but three of them were absolutely key. Manuel Cornejo spent several days developing a homemade solution to interconnect vMX with IOS XRv virtual machines, allowing for arbitrary interop topologies (something unimaginable just a short time ago). Sree Lakshmi Sarva and the Contrail Solutions Engineering team kindly designed, built and shared a set of latest and greatest SDN scenarios. Mohammed Khan and his team built physical ASR9K and MX topologies, which were essential for some feature sets that were not still supported by one or both of the two virtual network OSs.

Ato and Krzysztof are overwhelmed by so much help from many other great people who performed technical reviews, concept clarifications, hands-on lab tasks, or copyediting; and who provided access to valuable prototypes, fixed interop issues, wrote helpful blog posts, or simply freed up time so the authors could write.

Among the many valuable technical reviews, those conducted by Alejandro Tovar, Camilo Cardona, and Péter Maros covered many chapters and were exceptionally thorough.

It would take a full chapter to explain who did what. In strict alphabetical order, this is the (probably incomplete) list of additional key contributors:

Ahmed Guetari, Alvaro de las Heras, Ambrose Kwong, Andrea Di Donato, Andy Ingram, Anil Lohiya, Ankur Singla, Anshu Verma, Antoine Sibout, Anton Bernal, Antonio Huete, Antonio Sanchez-Benavente, Aravind Srikumar, Ashish Ranjan, Balaji Rajagopalan, Bill Dicks, Bill Twibill, Bob Russell, Brian Anderson, Carlos Durán, Chandrasekar Ramachandran, Chris Bowers, Chris Hellberg, Colby Barth, Colleen Lobner, Cressida Downing, Cyril Margaria, Damien Garros, Dan Fauxsmith, David Delgado, David Lobo, Dianne Russell, Didier Bousser, Dilip Sundarraj, Diogo Montagner, Disha Chopra, Domiciano Alonso, Doug Hanks, Efraín González, Erdem Sener, Evgeny Bugakov, Fawad Shaikh, Fernando (Fertxo) Muñoz Macaya, Francisco Sánchez, Guilhem Tesseyre, Guy Davies, Harish Sitaraman, Harshad Nakil, Hartmut Schroeder, Hassan Hosseini, Iria Varela, Ivan Pepelnjak, Ivan Tomić, Javier Campos, Jeetendra Lulla, Jeff Haas, Jeffrey Fry (Fryguy), Jeffrey (Zhaohui) Zhang, José Cid, José Luis Perez, José Miguel Huertas, Joseph Li, Julian Lucek, Julie Wider, Kapil Arora, Kevin F Wang, Kishore Tiruveedhula, Kostas Anagnopoulos, Mahesh Narayanan, Manish Gupta, Manoj Sharma, Manuel Delgado, Marco Rodrigues, María Caraballo, Matthew Jones, Michael Henkel, Michael Langdon, Michael Pergament, Michał Styszyński, Miguel Barreiros, Miguel Cros, Nacho Martín, Oleg Karlashchuk, Oscar Carnicero, Oscar Santiago, Pablo Sagrera, Parantap Lahiri, Paul Jarvis, Paul Obsitnik, Pedro Marques, Ping Wang, Pierre François, Pooja Mangla, Praveen Karadakal, Qasim Arham, Rafał Jan Szarecki, Rahul Kasralikar, Rakesh Manocha, Ramdas Machat, Ramesh Yakkala, Ranjini Rajendran, Raveendra Torvi, Ravi Singh, Rendo Wibawa, René Triana, Robert Kebler, Rocío Benavente, Rodny Molina, Sachin Natu, Sanju Abraham, Sean Clarke, Selvakumar Sivaraj, Shraddha Hegde, Sreedhevi Sankar, Steve Kensil, Sudharsana Venkataraman, Sue Oliva, Suman Dara, Suneel Pentala, Sunesh Rustagi, Sunil Malali, Tao (Tony) Liu, Tapraj Singh, Thomas Murray, Tom Adams, Usman Latif, Vallinayakam Somasundaram, Vasu Venkatraman, Victor Ganjian, Víctor Rodríguez, Vinay K Nallamothu, Vishal Nagaonkar, Vivek Shenoy, Walter Goralski, Xander Thuijs, Yimin Shen, and Zeeshan Sabri.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required