My boss asked me to implement some sort of network topology map on one of our web servers that would basically display a global corporate network topology with hot links that would show more detailed network info. He would be content with a huge imagemap with links to other info but that will be outdated 10 minutes after it's posted. So I'm trying to brainstorm the best solution to dynamically create the main map and be able to update it rather painlessly. If anyone's got any ideas or knows of a current implementation of something similar that is available to look at on some other site I'd be greatful.

Posted on 2003-04-24 17:32:26 by Will

I wonder if there is a way within the architecture of the network to do something like an enumeration of it at any given time ? If you can get this information, building a visual tree system to display it should not be that big a deal.

Posted on 2003-04-24 22:38:30 by hutch--
I know this but never used it.
Posted on 2003-04-25 06:22:30 by Hiroshimator
The IT dept at my company is a bit strange. I'm actually a telecom tech but fall under IT. So I work in the pbx arena, but am also the middle man between our various carriers and the network guys. So I'm responsible for all of our data pipes basically up to the routers, but not for the routers themselves. I don't have access to any of the network equipment per se.

What I have is all of the circuit info and visio drawings of our topologies. Everytime we turn around some bigwig is asking for a graphical map of our networks, and for some reason that's becoming an extra job for me. My manager asked me to come up with a web based interface for it so that we can throw it onto one of the web servers and just give out the link whenever asked for that info.

Php can dynamically generate images, and I suppose I could use dhtml shapes for all of the lines and clouds if I really had to. Vrml is out of the question as the danger of my having an aneurysm from that is too high. I guess what I'm looking at is this:
1) a way to input all of the data (circuit data, equipment data, routing info, etc)
2) a way to take all of that data and output a map
3) links on that map that lead to more detailed info

I've got some experience with php and mysql, which would easily let me update the data. But how should I go about dynamically displaying that data in the form of a map?


edit: Would java be a viable solution?
Posted on 2003-04-25 09:04:08 by Will
no you can use PHP for that. It has the gd library that does exactly what you want. It can even use a premade image as basis so you could design a nice grid and just plot lines on it or you could copy several node pictures on a big image.

as for the links on that picture you will need to use a dynamically generated image map on the client side :)
Posted on 2003-04-25 09:18:29 by Hiroshimator
Thanks again for the good info. Have you used the gd library Hiro? I'm curious how fast it is. Also, after I made the last post I thought that maybe flash would be another possible solution, but I really don't like that idea.

I guess I'll be playing with php this weekend. :)
Posted on 2003-04-25 09:32:23 by Will
yes I've used it before. very fast. But I think the hardest part for you will be gathering the data you need automagically :/
Posted on 2003-04-25 09:52:17 by Hiroshimator
here's a tiny example of making a text image

$referer = "referer: " . $_SERVER['HTTP_REFERER'];

// send header
Header("Content-Type: image/png");

// create image and colours
$url = "";
$width = ImageFontWidth(4) * strlen($referer) + 20;
$height = ImageFontHeight(4);

$im = ImageCreate($width, (($height * 2) + 5));
$white = ImageColorAllocate($im, 255, 255, 255);
$black = ImageColorAllocate($im, 0, 0, 0);

// fill image
ImageFill($im, 0, 0, $white);

// write string at (10,0) in black
ImageString($im, 4, 10, 0, $referer, $black);
ImageString($im, 4, 10, ($height + 5), $url, $black);

// release image

Posted on 2003-04-25 11:12:07 by Hiroshimator
Thanks Hiro. It looks easy enough anyways, and loaded pretty quick. Good deal.
Posted on 2003-04-25 17:01:13 by Will