Network Topology

Features Highlights

OpenWISP Network Topology is a network topology collector and visualizer web application and API, it allows to collect network topology data from different networking software (dynamic mesh routing protocols, OpenVPN), store it, visualize it, edit its details, it also provides hooks (a.k.a Django signals) to execute code when the status of a link changes.

When used in conjunction with OpenWISP Controller and OpenWISP Monitoring, it makes the monitoring system faster in detecting change to the network.

Deploy instructions

See Enabling the network topology module on the OpenWISP 22.05 ansible role documentation.

This module is also available in docker-openwisp although its usage is not recommended for production usage yet, unless the reader is willing to invest effort in adapting the docker images and configurations to overcome any roadblocks encountered.

Quickstart Guide

This module works by periodically collecting the network topology graph data of the supported networking software or formats. The data has to be either fetched by the application or received in POST API requests, therefore after deploying the application, additional steps are required to make the data collection and visualization work, read on to find out how.

Creating a topology
  1. Create a topology object by going to Network Topology > Topologies > Add topology.

  2. Give an appropriate label to the topology.

  3. Select the topology format from the dropdown menu. The topology format determines which parser should be used to process topology data.

  4. Select the Strategy for updating this topology.

    • If you are using FETCH strategy, then enter the URL for fetching topology data in the Url field.

    • If you are using RECEIVE strategy, you will get the URL for sending topology data. The RECEIVE strategy provides an additional field expiration time. This can be used to add delay in marking missing links as down.

Sending data for topology with RECEIVE strategy
  1. Copy the URL generated by OpenWISP for sending the topology data.

    E.g., in our case the URL is

  2. Create a script (eg: /opt/ which sends the topology data using POST, in the example script below we are sending the status log data of OpenVPN but the same code can be applied to other formats by replacing cat /var/log/openvpn/tun0.stats with the actual command which returns the network topology output:


# Get OpenVPN topology data from OpenVPN management interface
cat /var/log/openvpn/tun0.stats |
    # Upload the topology data to OpenWISP
    curl -s -X POST \
        --data-binary @- \
        --header "Content-Type: text/plain" \
  1. Add the /opt/ script created in the previous step to the crontab, here’s an example which sends the topology data every 5 minutes:

# flag script as executable
chmod +x /opt/
# open crontab
crontab -e

## Add the following line and save

echo */5 * * * * /opt/
  1. Once the steps above are completed, you should see nodes and links being created automatically, you can see the network topology graph from the admin page of the topology change page (you have to click on the View topology graph button in the upper right part of the page) or, alternatively, a non-admin visualizer page is also available at the URL /topology/topology/<TOPOLOGY-UUID>/.

Find out more about OpenWISP Network Topology

For more information about the features offered by OpenWISP Network Topology we refer to the following sections of its documentation: