Book description
Take your network automation skills to the next level with practical recipes on managing network devices from a variety of vendors like Cisco, Juniper, and Arista
Key Features
- Use Ansible to automate network infrastructure with the help of step-by-step instructions
- Implement network automation best practices to save cost, avoid critical errors, and reduce downtime
- Deliver a robust automation framework by integrating Ansible with NAPALM, NetBox, and Batfish
Book Description
Network Automation Cookbook is designed to help system administrators, network engineers, and infrastructure automation engineers to centrally manage switches, routers, and other devices in their organization's network. This book will help you gain hands-on experience in automating enterprise networks and take you through core network automation techniques using the latest version of Ansible and Python.
With the help of practical recipes, you'll learn how to build a network infrastructure that can be easily managed and updated as it scales through a large number of devices. You'll also cover topics related to security automation and get to grips with essential techniques to maintain network robustness. As you make progress, the book will show you how to automate networks on public cloud providers such as AWS, Google Cloud Platform, and Azure. Finally, you will get up and running with Ansible 2.9 and discover troubleshooting techniques and network automation best practices.
By the end of this book, you'll be able to use Ansible to automate modern network devices and integrate third-party tools such as NAPALM, NetBox, and Batfish easily to build robust network automation solutions.
What you will learn
- Understand the various components of Ansible
- Automate network resources in AWS, GCP, and Azure cloud solutions
- Use IaC concepts to design and build network solutions
- Automate network devices such as Cisco, Juniper, Arista, and F5
- Use NetBox to build network inventory and integrate it with Ansible
- Validate networks using Ansible and Batfish
Who this book is for
This Ansible network automation book is for network and DevOps engineers interested in automating complex network tasks. Prior understanding of networking and basic Linux knowledge is required.
Publisher resources
Table of contents
- Title Page
- Copyright and Credits
- About Packt
- Contributors
- Preface
-
Building Blocks of Ansible
- Technical requirements
- Installing Ansible
- Building Ansible's inventory
- Using Ansible's variables
- Building Ansible's playbook
- Using Ansible's conditionals
- Using Ansible's loops
- Securing secrets with Ansible Vault
- Using Jinja2 with Ansible
- Using Ansible's filters
- Using Ansible Tags
- Customizing Ansible's settings
- Using Ansible Roles
-
Managing Cisco IOS Devices Using Ansible
- Technical requirements
- Building an Ansible network inventory
- Connecting to Cisco IOS devices
- Configuring basic system information
- Configuring interfaces on IOS devices
- Configuring L2 VLANs on IOS devices
- Configuring trunk and access interfaces
- Configuring interface IP addresses
- Configuring OSPF on IOS devices
- Collecting IOS device facts
- Validating network reachability on IOS devices
- Retrieving operational data from IOS devices
- Validating network states with pyATS and Ansible
-
Automating Juniper Devices in the Service Providers Using Ansible
- Technical requirements
- Building the network inventory
- Connecting and authenticating to Juniper devices
- Enabling NETCONF on Junos OS devices
- Configuring generic system options on Juniper devices
- Configuring interfaces on Juniper devices
- Configuring OSPF on Juniper devices
- Configuring MPLS on Juniper devices
- Configuring BGP on Juniper devices
- Deploying configuration on Juniper devices
- Configuring the L3VPN service on Juniper devices
- Gathering Juniper device facts using Ansible
- Validating network reachability on Juniper devices
- Retrieving operational data from Juniper devices
- Validating the network state using PyEZ operational tables
-
Building Data Center Networks with Arista and Ansible
- Technical requirements
- Building the Ansible network inventory
- Connecting to and authenticating Arista devices from Ansible
- Enabling eAPI on Arista devices
- Configuring generic system options on Arista devices
- Configuring interfaces on Arista devices
- Configuring the underlay BGP on Arista devices
- Configuring the overlay BGP EVPN on Arista devices
- Deploying the configuration on Arista devices
- Configuring VLANs on Arista devices
- Configuring VXLANs tunnels on Arista devices
- Gathering Arista device facts
- Retrieving operational data from Arista devices
-
Automating Application Delivery with F5 LTM and Ansible
- Technical requirements
- Building an Ansible network inventory
- Connecting and authenticating to BIG-IP devices
- Configuring generic system options on BIG-IP devices
- Configuring interfaces and trunks on BIG-IP devices
- Configuring VLANs and self-IPs on BIG-IP devices
- Configuring static routes on BIG-IP devices
- Deploying nodes on BIG-IP devices
- Configuring a load balancing pool on BIG-IP devices
- Configuring virtual servers on BIG-IP devices
- Retrieving operational data from BIG-IP nodes
-
Administering a Multi-Vendor Network with NAPALM and Ansible
- Technical requirements
- Installing NAPALM and integrating with Ansible
- Building an Ansible network inventory
- Connecting and authenticating to network devices using Ansible
- Building the device configuration
- Deploying configuration on network devices using NAPALM
- Collecting device facts with NAPALM
- Validating network reachability using NAPALM
- Validating and auditing networks with NAPALM
-
Deploying and Operating AWS Networking Resources with Ansible
- Technical requirements
- Installing the AWS SDK
- Building an Ansible inventory
- Authenticating to your AWS account
- Deploying VPCs using Ansible
- Deploying subnets using Ansible
- Deploying IGWs using Ansible
- Controlling routing within a VPC using Ansible
- Deploying network ACLs using Ansible
- Deployment validation using Ansible
- Decommissioning resources on AWS using Ansible
-
Deploying and Operating Azure Networking Resources with Ansible
- Technical requirements
- Installing the Azure SDK
- Building an Ansible inventory
- Authenticating to your Azure account
- Creating a resource group
- Creating virtual networks
- Creating subnets
- Building user-defined routes
- Deploying network security groups
- Deployment validation using Ansible
- Decommissioning Azure resources using Ansible
-
Deploying and Operating GCP Networking Resources with Ansible
- Technical requirements
- Installing the GCP SDK
- Building an Ansible inventory
- Authenticating to your GCP account
- Creating GCP VPC networks
- Creating subnets
- Deploying firewall rules in GCP
- Deploying VMs in GCP
- Adjusting routing within a VPC
- Validating GCP deployment using Ansible
- Decommissioning GCP resources using Ansible
-
Network Validation with Batfish and Ansible
- Technical requirements
- Installing Batfish
- Integrating Batfish with Ansible
- Generating the network configuration
- Creating a network snapshot for Batfish
- Initializing the network snapshot with Ansible
- Collecting network facts from Batfish
- Validating traffic forwarding with Batfish
- Validating ACLs with Batfish
-
Building a Network Inventory with Ansible and NetBox
- Technical requirements
- Installing NetBox
- Integrating NetBox with Ansible
- Populating sites in NetBox
- Populating devices in NetBox
- Populating interfaces in NetBox
- Populating IP addresses in NetBox
- Populating IP prefixes in NetBox
- Using NetBox as a dynamic inventory source for Ansible
- Generating a configuration using NetBox
- Simplifying Automation with AWX and Ansible
-
Advanced Techniques and Best Practices for Ansible
- Technical requirements
- Installing Ansible in a virtual environment
- Validating YAML and Ansible playbooks
- Calculating the execution time for Ansible playbooks
- Validating user input using Ansible
- Running Ansible in check mode
- Controlling parallelism and rolling updates in Ansible
- Configuring fact caching in Ansible
- Creating custom Python filters for Ansible
- Other Books You May Enjoy
Product information
- Title: Network Automation Cookbook
- Author(s):
- Release date: April 2020
- Publisher(s): Packt Publishing
- ISBN: 9781789956481
You might also like
book
Building Microservices, 2nd Edition
As organizations shift from monolithic applications to smaller, self-contained microservices, distributed systems have become more fine-grained. …
book
Microsoft Azure Networking: The Definitive Guide
For cloud environments to operate and scale as they should, their networking components must be designed …
book
Infrastructure as Code, 2nd Edition
Six years ago, Infrastructure as Code was a new concept. Today, as even banks and other …
book
CCNP Security Cisco Secure Firewall and Intrusion Prevention System Official Cert Guide
The official Cisco Press Certification Guide designed to help candidates prepare for the new SNCF 300-710 …