The Network as Code: Network Programmability

ASSOCIATED BLOGS:
Legacy vs Modern Management
For many years, managing network infrastructure was done via the command line, either through a console cable or over SSH.
Whilst this had a quite steep learning curve, it made reusable templates easy to create and backups simple to maintain by copying config files to a backup location..png?width=250&height=250&name=Boost%20Your%20Business%20Efficiency%20Meraki%20Managed%20Services%20Unleashed%20(Instagram%20Post).png)
With the move to cloud services, infrastructure is now managed through web interfaces. This has lowered the learning curve and offers a single management location for all network infrastructure.
However, the downside this brings is that larger changes often require navigating multiple pages, slowing down bulk updates. Backing up configuration is also often very difficult, since the cloud services are redundant and no provision is made to simply copy settings.
Although templates are sometimes provided to allow for configuration re-use, they’re often limited in how they can be applied, restricting per‑site customisation.
ASSOCIATED BLOGS:
- Network Security Basics
- Managed Services - D5 Meraki Security
- Managed Services - D15 Security Service Edge
Infrastructure as code
Most cloud services provide Application Programming Interfaces (APIs) to remotely query and change settings, but these are complex to use and are different to each vendor. Solutions such as Ansible and Terraform have been created to hide the complexity of the API enable consistent configuration files across different platforms. These tools can be leveraged to manage network infrastructure, with tools like Terraform having plugins allowing them to manage solutions such as Cisco Meraki, and Cisco ISE.
ASSOCIATED BLOGS:
Declarative changes
One of the major advantages of tools such as Terraform, is the ability for the user to define the end state of the network.
The tool then interrogates the current configurations and works out the changes required to achieve the end state.
Historically, the network engineer would have to work out each command that they were going to apply so this reduces the workload to maintain the network.
Since changes are only applied if there is a difference between the desired configuration and what’s actually applied, the tool can be used to check that no unauthorised changes have been made, and to quickly revert to the approved design if there is a difference.
Since the network is defined in a set of text files, software version control applications can be used to manage the files.
This allows attribution of changes, as well as easy roll-back should a change cause unexpected problem. Should the service ever suffer a catastrophic failure, all of the configuration can quickly be restored to a new instance.
ASSOCIATED BLOGS:
Templating
Since configuration is held in text documents, it’s easy to re-use an existing configuration to set up a new instance.
Most of the tools allow templates to be built with default settings that can be changed on a per-site or per-device basis, allowing for consistent configuration settings to be applied across the network.
Example Terraform configuration block for a Meraki MX
ASSOCIATED BLOGS:
The Network as Code: Summary
Whilst the move to graphical user interfaces, such as web UIs has been a major advance in the day-to-day management of networks, some of the features of command-line management have been lost.
Network as Code brings those strengths back, combining the usability of cloud platforms with the repeatability, automation and control that engineers have relied on for decades.
ASSOCIATED BLOGS:
.png?width=400&height=118&name=IPTellogo-byline-2020-dark-v2-pnd-optimised-500%20(1).png)