Hey everyone! This post was born from a question asked by an IT forum member. The summary of the question looked as follows:
There is a set of text files containing routing tables collected from various network devices.
Each file represents one device.
Device platforms and routing table formats may vary.
It is required to analyze a routing path from any device to an arbitrary subnet or host on-demand.
Resulting output should contain a list of routing table entries that are used for the routing to the given destination on each hop.
The one who asked a question worked as a TAC engineer. It is often that they collect or receive from the customers some text 'snapshots' of the network state for further offline analysis while troubleshooting the issues. Some automation could really save a lot of time.
I found this task interesting and also applicable to my own needs, so I decided to write a Proof-of-Concept implementation in Python 3 for Cisco IOS, IOS-XE, and ASA routing table format.
In this article, I’ll try to reconstruct the resulting script development process and my considerations behind each step.
Hey everyone! This is a follow-up article on a local Cisco Russia DevNet Marathon online event I attended in May 2020. It was a series of educational webinars on network automation followed by daily challenges based on the discussed topics.
On a final day, the participants were challenged to automate a topology analysis and visualization of an arbitrary network segment and, optionally, track and visualize the changes.
The task was definitely not trivial and not widely covered in public blog posts. In this article, I would like to break down my own solution that finally took first place and describe the selected toolset and considerations.
Привет, Хабр! Эта статья написана по мотивам решения задания на недавно прошедшем онлайн-марафоне DevNet от Cisco. Участникам предлагалось автоматизировать анализ и визуализацию произвольной сетевой топологии и, опционально, происходящих в ней изменений.
Задача является не самой тривиальной, и в блогосфере встречается довольно мало статей на эту тему. Ниже представляю разбор собственной реализации, а также описание используемых инструментов и подходов.
Hello Habr! Эта моя первая статья на Хабре, и родилась она из вопроса на одном из профессиональных форумов. Выглядел вопрос, несколько перефразируя, следующим образом:
Имеется набор текстовых файлов, содержащих вывод таблиц маршрутизации с различных сетевых устройств;
Каждый файл содержит информацию с одного устройства;
Устройства могут иметь различный формат вывода таблицы маршрутизации;
Необходимо на основании имеющихся данных по запросу выводить путь до произвольной подсети или IP-адреса с каждого из устройств;
Вывод должен включать на каждом участке пути информацию о записи из таблицы маршрутизации, по которой будет смаршрутизирован пакет.
Задача мне показалась мне интересной и перекликалась с одной из собственных сетевых утилит, планируемых в перспективе.Поэтому в свободный вечер, поразмыслив над ее решением, написал Proof-of-Concept реализацию на Python 2.7 под формат Cisco IOS, IOS-XE и ASA, отвечающую основным требованиям.
В статье попытаюсь воспроизвести ход мысли и прокомментировать основные моменты.
Материал рассчитан на людей, уже базово знакомых с основами сетей и Python.
Всем заинтересовавшимся добро пожаловать под кат!