Network provisioning often involves templates: a template for the base device configuration, a template for internal
connections, a template for transit or peer connections, and multiple templates for different types of customer
connections. These templates usually have very few variables that an operator needs to change in order to use them.
However, it is easy for someone to accidentally omit an important line, forget to change one of the variables, or
change one of the variables to an invalid value. And even if the user makes no mistakes while creating the
configuration from the template, sometimes an error is introduced during the process of copying and pasting a large
configuration block or a large set of commands.
Note
We’ll talk more about provisioning templates when we talk about commit scripts in Chapter 5. Commit scripts are
one way to easily apply a template. Commit scripts even provide an optional way to reduce the size of the Junos
configuration file by having Junos display the template parameters (rather than their full expansion) by default.
In this instance, automation can both save time and reduce the number of unintended errors. If the provisioning
process is reduced to a simple script that asks for values for the few variables that are in a template, the script can
make sure that the entire configuration is applied. The script can even ask the questions necessary to choose the
correct template. In addition, the script can perform checks to validate that the values provided by the user make
sense.
In fact, it is possible to even further reduce the information that a user needs to supply by having the script gather the
information in the first place. Let’s assume that the customer data is all maintained in a SQL database. When
prompted by the user, the script can query the database to gather the correct values for all the variables and present
them to the user for validation. This further reduces the possibility of inadvertent errors.
From there, it is only a small step to fully automating the process. When a new customer is added to the database, an
automated process can automatically activate the changes in the network.
It will probably not be possible to completely eliminate the possibility of someone entering incorrect information at
some point in the process. However, using automation can reduce the number of places where incorrect information
can be introduced. And it can promote consistency among the different systems that maintain information about the
network by ensuring that the same information is used everywhere (whether that information is correct or incorrect).
Automation Enables New Services
Automation can enable new services that could not be conducted by humans in an efficient manner. In this context, a
“service” can either be external or internal.
SDN can be a good example of an external service enabled by automation. Imagine that a network operator wants to
optimize their traffic flow every five minutes based on a complex set of algorithms, but they want to conduct the
recalculation faster than that if certain events occur. This is the kind of complex network service that requires
automation to effectively implement it.
An example of an internal service enabled by automation is an automated troubleshooting service. Imagine that a
network operator implements an automated troubleshooting service that monitors for network events that may
indicate a network error. The automation tool then responds to those events according to a set troubleshooting
template. If it finds a problem that it can automatically correct, it does so. Otherwise, it sends the output of its
findings to the network operator’s trouble ticket system. That output should have all the information necessary to
continue troubleshooting the problem. This has the potential to reduce the amount of time that network engineers
spend gathering basic information and trying “simple” fixes. It also has the potential to suppress false errors,
reducing the amount of time that network engineers spend responding to false alerts and allowing them to start
working on the real problems more quickly. Finally, it has the potential to reduce the time to resolution for network
problems.
Management System Internals
It is helpful to have a good understanding of the way “management data” usually flows through the Junos system.