NAME
OSPF::LSDB::View - display OSPF database as graphviz dot
SYNOPSIS
use OSPF::LSDB;
use OSPF::LSDB::View;
my $ospf = OSPF::LSDB->new();
my $view = OSPF::LSDB::View->new($ospf);
my $dot = view->graph();
DESCRIPTION
The OSPF::LSDB::View module converts the content of a OSPF::LSDB instance into a graphviz dot string. Routers and Networks become nodes, the links between them are directed edges. The different OSPF vertices are displayed with drawing styles that are documented in the legend.
During conversion the link state database is checked. Each inconsistency is reported as OSPF::LSDB error and the color of the object changes. The colors are prioritized by severity.
- gray
-
All areas and ASE have unique gray levels.
- black
-
Vertex is in multiple areas.
- purple
-
An area is not in the list of all areas.
- tan
-
Asymmetric designated router.
- brown
-
Asymmetric links.
- cyan
-
Conflicting AS external network.
- green
-
Conflicting stub network.
- blue
-
Conflicting network.
- orange
-
Conflicting area.
- yellow
-
Multiple links.
- magenta
-
Conflicting link.
- red
-
Missing node.
Normally the OSPF::LSDB copy constructor creates the object. The public methods are:
- $self->graph(%todo)
-
Convert the internal database into graphviz dot format. The output for the dot program is returned as string.
The %todo parameter allows to tune the displayed details. It consists of the subkeys:
- boundary
-
Display the summary AS boundary routers. If the additional subkey aggregate is given, multiple AS boundary routers are aggregated in one node.
- external
-
Display the AS external networks. If the additional subkey aggregate is given, multiple AS external networks are aggregated in one node.
- cluster
-
The same network is always displayed in the same rectangular cluster, even if is belongs to different LSA types.
- summary
-
Display the summary networks. If the additional subkey aggregate is given, multiple networks are aggregated in one node.
- warnings
-
Write the most severe warning about OSPF inconsistencies into the label of the dot graph. This warning determines also the color of the node or edge. If the additional subkey all is given, all warnings are added.
- OSPF::LSDB::View->legend()
-
Return a string of a dot graphic containing drawing and description of possible nodes and edges.
ERRORS
The methods die if any error occures.
Inconsistencies within the OSPF link state database are visualized with different colors. The error message may be printed into the graph as warnings. All warnings may be optained with the get_errors method.
SEE ALSO
RFC 2328 - OSPF Version 2 - April 1998
AUTHORS
Alexander Bluhm