Network Programmability and Automation: Skills for the Next-Generation Network Engineer [2 ed.] 1098110838, 9781098110833

Network engineers are finding it harder than ever to rely solely on manual processes to get their jobs done. New protoco

139 33 10MB

English Pages 825 [828] Year 2023

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover
Copyright
Table of Contents
Preface
What This Book Covers
What’s New in This Edition
How This Book Is Organized
Who Should Read This Book
Network Engineers
Systems Administrators
Software Developers
Tools Used in This Book
Online Resources
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Chapter 1. Network Industry Trends
The Rise of Software-Defined Networking
The Advent of OpenFlow
Why OpenFlow?
What Is Software-Defined Networking?
Opening Up the Data Plane
Network Functions Virtualization
Virtual Switching
Network Virtualization
Device APIs
Network Automation
Bare-Metal Switching
Data Center Network Fabrics
SD-WAN
Controller Networking
Cloud Native Networking
Summary
Chapter 2. Network Automation
Why Network Automation?
Simplified Architectures
Deterministic Outcomes
Business Agility
Enhanced Security and Risk Reduction
Types of Network Automation
Device Provisioning
Data Collection and Enrichment
Migrations
Configuration Management
Configuration Compliance
State Validation
Reporting
Troubleshooting
Evolving the Management Plane from SNMP to APIs
Application Programming Interfaces
Impact of Open Networking
Network Automation in the SDN Era
Summary
Chapter 3. Linux
Examining Linux in a Network Automation Context
Exploring a Brief History of Linux
Understanding Linux Distributions
Red Hat Enterprise Linux, Fedora, CentOS, and Amazon Linux
Debian, Ubuntu, and Other Derivatives
Other Linux Distributions
Interacting with Linux
Navigating the Filesystem
Manipulating Files and Directories
Running Programs
Working with Daemons
Networking in Linux
Working with Interfaces
Routing as an End Host
Routing as a Router
Bridging (Switching)
Automating Linux with bash Scripting
Evolving the Linux Kernel with eBPF and XDP
Summary
Chapter 4. Cloud
Brief Definition of Cloud Computing
Networking Fundamentals in the Cloud
Cloud Networking Building Blocks
Cloud Network Topologies
Network Automation in the Cloud
Containers
What Do Containers Have to Do with the Cloud?
What Do Containers Have to Do with Networking?
Extending Linux Networking for Containers
Kubernetes
Key Kubernetes Concepts
Building Blocks of Networking in Kubernetes
Service Mesh
Summary
Chapter 5. Network Developer Environments
Text Editors
Syntax Highlighting
Customization
Intelligent Code Analysis
Text Editors Versus Integrated Development Environments
Development Tools
Virtualenv
Make
Docker
dyff
Emulation/Simulation Tools
VirtualBox
Vagrant
Containerlab
Other Tools
Summary
Chapter 6. Python
Should Network Engineers Learn to Code?
Using the Python Interactive Interpreter
Understanding Python Data Types
Strings
Numbers
Booleans
Lists
Python Dictionaries
Sets and Tuples
Adding Conditional Logic to Your Code
Understanding Containment
Using Loops in Python
The while Loop
The for Loop
Using Python Functions
Working with Files
Reading from a File
Writing to a File
Creating Python Programs
Creating a Basic Python Script
Using Comments in Python
Migrating Code from the Python Interpreter to a Python Script
Working with Python Modules
Documenting Functions
Passing Arguments into a Python Script
Using pip and Installing Python Packages
Isolating Your Dependencies with Virtualenv
Understanding Python Classes
Using Classes
Building Your Own Classes
Embracing Failure with try/except
Parallelizing Your Python Programs
Summary
Chapter 7. Go
Why Go?
Is Go Faster Than Python?
Is Go Harder than Python?
Fundamental Go Concepts
Types and Variables
Flow Control
Collection Types
Functions
Structs
Methods
Interfaces
Advanced Concepts
Concurrency
Generics
Packages and Modules
Standard Library Packages
Third-Party Modules and Packages
Summary
Chapter 8. Data Formats and Models
Benefits and Fundamentals of Structured Data Formats
When Structured Data Isn’t Available: Screen Scraping
Types of Data
Documents Versus Data
Categories of Data Formats
Text-Based Data Formats
YAML
XML
JSON
Binary Data Formats
Protocol Buffers
Other Binary Data Formats
Data Modeling
YANG
JSON Schema
XML Schema Definition
Modeling and Validating Protocol Buffers
Summary
Chapter 9. Templates
The Rise of Modern Template Languages
Using Templates for Web Development
Expanding On the Use of Templates
The Value of Templates in Network Automation
Jinja
Rendering a Jinja Template File in Python
Using Conditionals and Loops
Using Jinja Filters
Template Inheritance in Jinja
Variable Creation in Jinja
Extensible Stylesheet Language Transformations
Go Templates
Summary
Chapter 10. Working with Network APIs
Understanding Network APIs
Getting Familiar with HTTP-Based APIs
Using NETCONF
Using RESTCONF
Using gRPC and gNMI
Comparing NETCONF, RESTCONF, and gNMI
Using Network APIs for Automation
The Python Requests Library
The Go net/http Package
The Python ncclient Library
The OpenConfig gNMIc Go Package
The Netmiko Python Library
Summary
Chapter 11. Source Control with Git
Use Cases for Source Control
Benefits of Source Control
Change Tracking
Accountability
Process and Workflow
Benefits of Source Control for Networking
Enter Git
Brief History of Git
Git Terminology
Overview of Git’s Architecture
Working with Git
Installing Git
Creating a Repository
Adding Files to a Repository
Committing Changes to a Repository
Changing and Committing Tracked Files
Unstaging Files
Excluding Files from a Repository
Viewing More Information About a Repository
Distilling Differences Between Versions of Files
Tagging Commits in Git
Branching in Git
Renaming the Default Branch
Creating a Branch
Checking Out a Branch
Stashing Uncommitted Changes
Merging and Deleting Branches
Collaborating with Git
Collaborating Between Multiple Systems Running Git
Collaborating via Git-Based Online Services
Summary
Chapter 12. Automation Tools
Reviewing Automation Tools
Using Ansible
Discovering the Ansible Framework
Understanding How Ansible Works
Constructing an Inventory File
Executing an Ansible Playbook
Using Secrets
Using Variable Files
Writing Ansible Playbooks for Network Automation
Using Third-Party Collections and Modules
Ansible Summary
Automating with Nornir
Getting Started with Nornir
Using NAPALM with Nornir
Nornir Summary
Managing Dynamic Infrastructure with Terraform
Understanding Terraform Architecture
Provisioning Your First Resource with Terraform
Extending Terraform Execution
Managing Terraform at Scale
Terraform Out of Its Comfort Zone
Terraform Summary
Summary
Chapter 13. Continuous Integration
Important Prerequisites
Simple Is Better
People, Process, and Technology
Learn to Code
Introduction to Continuous Integration
Basics of Continuous Integration
Continuous Delivery
Test-Driven Development
Why Continuous Integration for Networking?
A Continuous Integration Pipeline for Networking
Peer Review
Build Automation
Deployment Validation and Testing
Test/Dev/Staging Environment
Deployment Tools and Strategies
Summary
Chapter 14. Network Automation Architecture
Introducing the Network Automation Architecture
Overview of the Architecture Components
User Interactions
Source of Truth
Automation Engine
Telemetry and Observability
Orchestration
Understanding the Architecture with an Example
Determine the Operation’s Workflow
Translate the Workflow Steps to Automated Tasks
Map the Automated Tasks to Architecture Components
Choose the Tools to Implement Each Component’s Tasks
Summary
Index
About the Authors
Colophon

Network Programmability and Automation: Skills for the Next-Generation Network Engineer [2 ed.]
 1098110838, 9781098110833

  • Commentary
  • Publisher's PDF; 2023-08-16: First Release
  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Recommend Papers