Much of a network engineer’s job involves the CLI, and much of this work involves syntax-specific keywords and phrases that are often repeated several times, depending on the change. This not only becomes inefficient over time, but is also very error-prone. It may be obvious how to configure a BGP neighbor relationship on Cisco IOS, for instance, but what’s not obvious at times are the smaller, “gotcha” configurations, like remembering to append the right BGP community configuration. Often in networking, there are many different ways to do the same thing—and this may be totally dependent on your organization.
One of the key benefits of network automation is consistency—being able to predictably and repeatably make changes to production network infrastructure and achieve a desired result. One of the best ways to accomplish this is by creating templates for all automated interaction with the network.
Creating templates for your network configurations means that you can standardize those configurations per the standard for your organization, while also allowing network administrators and the consumers (Help Desk, NOC, IT Engineers) of the network to dynamically fill in some values when needed. You get the benefits of speed, requiring much less information to make a change, but also consistency, because the template contains all of the necessary configuration commands that your policies dictate.
We’ll start this chapter with an introduction ...