Net-Surveyor is an LLDP based tool which purpose is to collect, agggregate and visualise network topology data from cloud environment, thus simplifying network configuration and troubleshooting.
Net-Surveyor bases on Link Layer Doscovery Protocol - LLDP - data about VLANs, switch port connectivity and link aggregation.
Net-Surveyor works with multiple sources of LLDP data. Currently the preferred way is using juju and magpie.
The tool generates 3 types of reports:
- HTML web page with a table of all machines and interfaces with LLDP data in appropriate cells
- SVG network topology map with the same information as above
- Python NetworkX graph
Net-Surveyor can collect LLDP data from an existing juju environment. Please note that it will install LLDP on all the machines.
- Clone the Net-Surveyor repository
- Collect LLDP data:
./collect-lldp-juju.py -i
This collects the data by default into /tmp/lldp/
. -i
installs LLDP on the machines. Note that if this is fresh LLDP install, this step may need to be repeated as LLDP data is collected over time, based on incoming LLDP PDUs.
- Build topology from the collected data:
./build_netmap.py -o netmap.json
This step merges the collected data into single JSON file.
- Create report:
./report_html.py -i netmap.json -o netmap.html
- Create a juju magpie bundle for your environment. Magpie charm can be deployed on both bare metal machines and containers. Make sure to enable LLDP collection on bare metal machines:
series: "bionic"
machines:
'1':
constraints: tags=foundation-nodes
'2':
constraints: tags=foundation-nodes
services:
magpie-bare:
charm: "cs:~openstack-charmers-next/magpie"
series: "bionic"
num_units: 2
constraints: spaces=oam-space
bindings:
"": oam-space
options:
check_dns: true
check_iperf: false
check_bonds: "bond0,bond1,bond2"
use_lldp: true # required to be true
check_port_description: false
to:
- 1
- 2
- Deploy the bundle:
juju deploy ./magpie-bundle.yaml
- Wait for the bundle to deploy
- Clone the Net-Surveyor repository
- Collect LLDP data:
./collect-lldp-juju.py
This collects the data by default into /tmp/lldp/
- Build topology from the collected data:
./build_netmap.py -o netmap.json
This step merges the collected data into single JSON file.
- Create report:
./report_html.py -i netmap.json -o netmap.html
- Create txt fle conatining hostnames of all machines to connect to, eg:
machines.txt
- Collect LLDP data:
./collect-lldp-ssh.sh machines.txt
This collects the data by default into /tmp/lldp/
- Build topology from the collected data:
./build_netmap.py -o netmap.json
This step merges the collected data into single JSON file.
- Create report:
./report_html.py -i netmap.json -o netmap.html
- Update and publish plugin to collect MAAS comissioning data.
- Improve SVG graph to group host interfaces into VLANs
- Add VLAN and host filtering for report generation
- Create Net-Surveyor SNAP
- Create Net-Surveyor server and integrate with Magpie for single bundle deployment
Use issues reporting feature in this repository to report bugs and feature requests.
All contributions are heartily welcome.