Chapter 2 Why Automate the Network?

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 34

Complexity

The complexity of networks has dramatically increased. Virtual Route Forwarders (VRFs), QoS, wireless connectivity, cloud connectivity, Virtual Private Network (VPN), First-Hop Redundancy Protocols (FHRP) such as Hot-Standby Router Protocol (HSRP), Virtual Switching Systems (VSS), and security and identity services such as 802.1x, have all stressed the capabilities of both engineers who design and operators who run the network.

Abstracting important data from the network configurations allows operators to see the network devices as a collection of human-readable variables and dynamic templates. This drastically simplifies network design. Human-readability of the intended configuration for a device also reduces the technical requirements needed to understand how a device is configured. The knowledge required to execute commands and understand how a device is configured is abstracted because the device information is presented as a human-readable data model.

Documentation Network documentation is extremely important, especially during times of crisis, however it is often overlooked during day-to-day operations. Changes may or may not be reflected in documentation. Files may be scattered across a variety of sources such as local drives, Microsoft SharePoint sites, or network shares. Stale or out of date documentation is of little value to an organization. Documentation that does exist is often represented as complex Visio diagrams, large Excel spreadsheets or text files that do not interact with the network dynamically. Documentation should be thought of as a key component, and advantage, of the network automation solution. The scope of automation is not limited to making changes. Part of the TFS repository master branch should be a folder structure containing both the dynamic documentation Ansible playbooks, as well as folders for the generated output artifacts.

Automated documentation can be built directly into the CI/CD pipeline creating comma separated value (.csv), Markdown (.md), or text files. These files are then incorporated into Git commits and pull requests, becoming part of the code base and repository. TFS and VS Code can view these files natively, presenting a customizable view of the network as code. These artifacts include the intended, automatically generated, configuration files as well as the data model variables manipulated to express the information in different formats.

For example, is it possible to automatically generate the following documentation for each device, based on data model variables:

 VLANs.  VRFs.  Routing protocol configuration information.  Static routes.  Interface information:

o Up / Down. o Mode – Access or Trunk. o VLAN(s).  Port-channels information:

o Member ports. o IP Addresses.  Access Control Lists (ACL).