Do You Want Dynamic Network Topology Drawings for Free?

Running Cumulus Linux?Tired of manual updating your Visio files? Tired of using third party partial network management tools?Learn how companies build the network visualization tools

Reza Toghraee
Opendaylight nextui

Building visio or Edraw topology and detailed low level drawing is always part of network deployment project. After completion of the project, maintaining and keeping the drawings up to date is always a pain in the ass.  

I always encourage to make a good drawing. both high level and low level. building a good drawing will help you to trigger your brain understand the network better. (probably that's  the reason every engineer has his own set of drawings).

Anyhow in this post I'm going to show how to build a dynamic drawing. A drawing which updates on its own when you make any changes. it is always up to date. 

This post is high level, we don't deep dive into codes.


 


Opendaylight nextui

An Open Source UI which has been always there

If you have played with Open Day Light, the SDN Controller user interface, I'm sure that you loved it. It's a beautiful UI which shows the whole network, connections, IP addresses, Access Lists, 

This UI is called NeXt UI , and is authored by Cisco (As per code signatures) and is provided to Open Day Light project. 

You can download it from OpenDayLight here.

NeXt is a responsive HTML5, lightweight and robust UI. 

Have a look at YouTube Video of NeXt UI here.






Opendaylight nextui

NeXt UI supports json for its input data. you can specify the nodes, their properties such as IP address, model name, Serial number, etc to each node.

Separately by defining a link variable, you can tell how the ports are connected to each other. Link variable is kind of matrix where you define all the connections.

You can learn and play with NeXt UI here
 


NeXt UI feeding data diagram

How to generate and feed our topology data?

This is a very simple method for collecting and displaying your drawings to user. 

We need a simple PHP application to create the NeXt UI object and fill the node and links data from a database.

What information do we need to build the topology ?

Core information :

  1. Devices 

  2. Interface mapping

Good to have information:

  1. Interface IPv4 , IPv6 addresses

  2. BGP, OSPF, RIP peering

  3. ACL details per interface

  4. VLAN details

  5. MPLS label mapping




Cumulus Linux

How do we fill the database?

If you are familiar with Linux , you know how easy it is to get information, parse it in any form and store it in a database. If you have network switches running Cumulus Linux, you can build a simple bash script to generate the : 

1- lldp neighbors (comes in simple json format) 

2- run Quagga commands for BGP, OSPF, etc and output as json 

3- extract interfaces configuration and send it to the database


Non Cumulus Devices (its a little pain):

  1. You need to build a collector server. This node should connect to your network switches via telnet / ssh or even SNMP. 
    You need to prepare scripts to send to the switch for execution.

  2. You need to collect the string data back from the switch

  3. you need to parse the outputs as they are not in machine readable format such as json or xml