Praise for Network Programmability and Automation
Jason, Scott, and Matt have been key contributors in educatingnetwork engineers about both network automation and Linux networking.They have written and talked extensively about the importance ofautomation, on how automation impacts network engineers, and on themechanics of automating networking devices.
Kirk Byers
Creator of the Netmiko Python Library
Network automation is no longer just a proof of concept: itrepresents both the present and the future! Network Programmabilityand Automation provides the needed background for modern engineers, bywidening the toolset for more consistent, stable and reliablenetworks.
Mircea Ulinic
Network Systems Engineer, Cloudflare
Network automation is not hype anymore; it is a means to do your job faster, more consistently and more reliably. However, network automation is not just a single discipline; it is a collection of protocols, tools, and processes that can be overwhelming to the uninitiated. This book does a great job covering everything you will need to get your automation up and running.
David Barroso
creator of NAPALM
Network Programmability and Automation
by Jason Edelman , Scott S. Lowe , and Matt Oswalt
Copyright 2018 Jason Edelman, Scott S. Lowe, Matt Oswalt. All rights reserved.
Printed in the United States of America.
Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
- Editors: Virginia Wilson and Courtney Allen
- Production Editor: Colleen Cole
- Copyeditor: Dwight Ramsey
- Proofreader: Rachel Monaghan
- Indexer: Judy McConville
- Interior Designer: David Futato
- Cover Designer: Karen Montgomery
- Illustrator: Rebecca Demarest
- Technical Reviewers: Patrick Ogenstad, Akhil Behl, Eric Chou, Sreenivas Makam
- February 2018: First Edition
Revision History for the First Edition
- 2018-02-02: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781491931257 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. Network Programmability and Automation, the cover image, and related trade dress are trademarks of OReilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
978-1-491-93125-7
[M]
Dedication
I dedicate this book to all network engineers starting their network automation journey. I sincerely hope it provides each of you with the knowledge needed to further enhance your career. Id also like to thank Scott, Matt, and the whole OReilly teamI know it was a much longer process than we all planned, but we ultimately got through it! Thanks to everyone for making it a reality.
Jason Edelman
Id like to dedicate this book to the Lord, who granted me the wisdom and understanding I needed to write this book (Exodus 31:3 NIV). Id also like to dedicate it to my wife, Crystal, without whose support things like this wouldnt be possible.
Scott S. Lowe
I dedicate this book to anyone with a hunger and a passion for learningevery word was written with you in mind. Id also like to thank my wife Jamie, who keeps me motivated and upbeat when life gets a little too crazy.
Matt Oswalt
Preface
Welcome to Network Programmability and Automation!
The networking industry is changing dramatically. The drive for organizations and networking professionals to embrace the ideas and concepts of network programmability and automation is greater now than perhaps it has ever been, fueled by a revolution in new protocols, new technologies, new delivery models, and a need for businesses to be more agile and more flexible in order to compete. But what is network programmability and automation? Lets start this book with a quick look at how to answer that question.
What This Book Covers
As its title implies, this book is focused on network programmability and automation. At its core, network programmability and automation is about simplifying the tasks involved in configuring, managing, and operating network equipment, network topologies, network services, and network connectivity. There are many, many different components involvedincluding operating systems that are now seeing far broader use in networking than in the past, the use of new methodologies like Continuous Integration, and the inclusion of tools that formerly might have fallen only in the realm of the system administrator (tools like source code control and configuration management systems). We feel like all of these play a part in the core definition of what network programmability and automation is, so we cover all these topics. Our goal for this book is to enable readers to establish a foundation of knowledge around network programmability and automation.
How This Book Is Organized
This book isnt necessarily intended to be read from start to end; instead, weve broken the topics up so that you can easily find the topics in which youre most interested. You may find it useful to start out sequentially reading the first three chapters, as they provide background information and set the stage for the rest of the book. From there, youre welcome to jump to whatever topic or topics are most useful or interesting to you. Weve tried to keep the chapters relatively standalone, butas with any technologythats not always possible. Wherever we can, we provide cross-references to help you find the information you need.
Heres a quick look at how weve organized the topics:
Provides an overview of the major events and trends that launched Software Defined Networking (SDN). As youll see in , SDN was the genesis for an increased focus on network programmability and automation.
Takes the SDN discussion from and focuses specifically on network automationthe history of network automation, types of automation, tools and technologies involved in automation, and how automation affects operational models (and how operational models affect automation).
Provides an overview of the Linux operating system. By no means a comprehensive discussion of Linux, this chapter aims to get networking professionals up to speed on Linux, basic Linux commands, and Linux networking concepts.
Introduces networking professionals to the Python development language. Python is frequently used in network programmability and automation contexts, and this chapter covers many of the basics of programming with Python: data types, conditionals, loops, working with files, functions, classes, and modules.
Introduces common data formats that are often seen in network automation projects. JavaScript Object Notation (JSON), eXtensible Markup Language (XML), and YAML Aint Markup Language (YAML) are all discussed. The chapter then introduces the concepts of data modeling and provides a light introduction to YANG, a common data modeling language for networking.