Skip to content

nvx/ospf-to-graphviz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

ospf-to-graphviz

This script passively listens to OSPFv2 multicast traffic, and generates a graphviz diagram representing the network. Because it only listens and does not participate in the OSPF protocol, it takes about half an hour to learn about the network.

Prerequisites

python-netaddr

The script has been tested under Python2.6

Usage

ospf-to-graphviz.py mynetwork.dot

After a while, convert the .dot file for viewing with something like this:

dot -Tpng mynetwork.dot >mynetwork.png

The output file will be rewritten when an OSPF update is received, so you can keep converting the file every time it changes to see the diagram converge on your network topology. This should be complete after LSRefreshTime (30mins).

Limitations

Only OSPFv2 is supported. Only LS Update messages are analysed. Only Router LSAs, Network LSAs and External LSAs are handled at present. For Router LSAs, only transit networks, stub networks and point to point networks are handled.

Acknowledgements

This code is based on a Python recipe by Ferdy Riphagen: http://code.activestate.com/recipes/576664-ospf-multicast-sniffer/

About

OSPF network visualisation script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%