M4 – TS example 2. Week 19

Greetings!

This post for Milestone 4 will be the last and will finish the practical part of the project.
Unfortunately, the project time is limited and I do not have time to do TS-3.
Also, besides the project I have other classes where I need to do assignments.

The next Milestone 5 will be focused on the writing of the final report.

In this post, I will tell some ideas about TS-2 example.
I will not show a practical implementation because of the complexity and lack of time.


If you have not read the ‘Introduction’ post, it is a good starting point to understand what I will talk about.


TS-2. Task:

(to write a test case that will check ‘interfaces information’ such as status, IP address, interfaces name and after that will compare and if something is wrong the test will be failed)

Network OS: Cisco IOS, Cisco ASA, JunOS and VyOS


Imagine a situation where a Network Engineer wants to check that the interfaces that should be configured according to the network diagrams actually have the specified settings. How Network Engineer can do this?

The most obvious answer is to open diagrams and start to compare information that means connect to each device and run specific commands to get the necessary information. What if a network has more than 100 devices and devices from different vendors?
Obviously, that process will take more than one day. How to automate it?

Difficulties,

The Network Engineer should look at the automatic network verification tests where one of the options to make a test case that will connect to each device and collect the necessary information for further analysis.

The first challenge,

What if the network is multi-vendor? In order to collect information about the interfaces (in my case — the company ‘X’ network) on (Cisco IOS, Cisco ASA, JunOS, VyOS), I need to use different commands for each OS.

The second challenge,

Imagine that the information about the interfaces is collected, therefore, one part of the manual work is automated, but what about the second part? The second part is the analysis of that information. Now a Network Engineer should inspect the output from 100 devices and verify that is everything configured correctly.
Of course, that will take less time, but will not make a Network Engineer happier.

What if the problem happens in the network and needs to figure out what is wrong and time is limited?

Maybe the problem will be easily solved, for example, someone pulled the cable or misconfigured the IP address and forgot about it. The search of the problem may take more than one hour, but when the business is very critical, it does not forgive the downtime.

Therefore, it is necessary to upgrade the test case which is collected the information about the interfaces, but now should check outputs from devices and compare with valid information and detects the mistakes.

The third challenge,

How to determine valid information? Where to store it? How to update it? For example, suppose it may be some kind of database where information about the network interfaces of all devices of all different vendors in the network is stored.
How to guarantee the interaction between the network verification test and the database if that test takes the latest valid information and verifies what is on the devices?
Consequently, the output from devices must have a certain type (structure) is to be checked. One of the options to use python module ‘TextFSM’ and templates are well suited for a multi-vendor network, the second option is to use ‘Genie’, but now for Cisco only.

To sum up,

When needs to use automatic network verification tests for troubleshooting that is not an easy job but that is worth it and it saves a lot of time if everything is done thoughtfully. Maybe in small networks, we can live without automatic tests but when the network grows the tests are necessary.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: