OSPF Visualizer

While reading the OSPF chapter in the Cisco CCNP ROUTE learning guide, I was interested in how to visualize an OSPF area. Since every router in the same area has a complete view of all routers and networks, it should be easy to draw a map. So, I searched through the web for this kind of OSPF plotter and found two different approaches. While none of them worked out of the box, I was able to run one of them with an additional software router (Quagga) inside my OSPF area which finally drew a map. Yeah. Here we go:

Searching on the web I found two OSPF plotters:

  • OSPF network visualizer (ospfviz): This project seems to be really old (prior 2008). It uses SNMP requests to a Cisco router in order to get the OSPF map. Great approach. However, there are too many prerequisite listed. ;) So I actually tried the second one:
  • ospf-visualiser: This project has its latest update from 2013. It is a single Java application that connects to a Linux router (GNU Zebra or Quagga) and gets the OSPF database via telnet. Unluckily the documentation is bad. It is a kind of try-and-error. However, I decided to test this software.

Prerequisite: Quagga

The ospf-visualiser communicates with a software router “Quagga”. Later on, this is really easy to connect to that router. Note that this router does not actually route traffic. It must only be part of the OSPF area in order to have a complete view of all involved routers.

The main step for this project is to install and run this linux router with an OSPF process. I used this Ubuntu guide (German) and that Quagga tutorial for installing quagga on a Ubuntu server machine. These are the installation steps:

The second step is to modify these two default configuration files. I only changed the name of the OSPF-router and added the correct OSPF network:

The quagga process can be started with the following command. Immediately after that, the OSPF neighbor adjacencies are established to FULL.

 

OSPF-Visualiser

I downloaded ospf-visualiser version 3.0.5 from this google page. It must only be started (Java application). Works out of the box. Under Data -> Load data I connected via telnet to my just installed quagga router:

OSPF Visualizer 01 Load via telnet

Just a few seconds after that, my OSPF area map is drawn. Yeah! My OSPF lab (see here) consists of many different devices: Cisco Router, Cisco ASA, Fortinet FortiGate, Juniper ScreenOS SSG, Palo Alto Networks firewall. This is my graph:

OSPF-Visualiser

The router on the left-hand side (192.168.120.5) is my quagga router. This screenshot shows, that no other networks are connected to that router:

OSPF Visualizer 03 Quagge Router no networks

But not complete :(

Unluckily, the map is not complete. In fact, my area 0.0.0.0 has one more router (192.168.86.1) connected to the 172.16.1.1 router (point-to-point via a site-to-site VPN), which is completely hidden in the drawing. This must be a failure in the ospf-visualiser app, because on the quagga router, this router is listed in the ospf commands (line 15):

But this router (192.168.86.1) is not listed in the map:

OSPF Visualizer 04 Missing Router 192.168.86.1

Directly to Cisco Router?

I also tried to connect directly to a Cisco router. But I was not able to get the information out of it. First, I configured the Cisco router to allow telnet login with a password and a direct privilege level of 15:

After that, I captured a telnet session with Wireshark from ospf-visualiser to the quagga router to see how it behaves correctly:

OSPF Visualizer 05 TCP Stream Quagga

That is: It logs in, sets the terminal length and begins with the show commands.

But my test to the Cisco router just looked like that, without a show after the login. Hm:

OSPF Visualizer 06 Cisco Router Failure

Ok, however, for a quick-and-dirty approach, this visualizer greatly shows my OSPF map when connected to a quagga router. ;) I like it.

Featured image “Tiger & Turtle – Magic Mountain” by Uwe licensed under CC BY-NC-ND 2.0.

5 thoughts on “OSPF Visualizer

  1. great article!
    Maybe it doesnt work with the cisco because it is in privileged mode after login. The quagga is in unprivileged mode.

    Maybe the visualizer parses the prompt and stops if the # sign is found.

    Just a idea… :)

    Cheers
    Alex

  2. The problem of invisibility of the router on the map is probably caused by a software bug that appears if metric is quite large. On my Quagga routers i saw that links with a metric of 1000 disappeared (10 and 100 displayed fine).

  3. Hi,

    Nice work…any updates ? :)

    I’m looking for OSPF monitoring/visualization
    tool but nothing good&ready found so far…

    BR
    Bart

  4. Think theirs a way to display the devices identity or name?, not just the IP address.

Leave a Reply

Your email address will not be published. Required fields are marked *