Network Mapping at a Glance, Part 2
Doing it visually with your own Perl script.
by Kent Cearley
Mapping the Nodes
You'll need to open the completed GIF file in a image editor that can use the Cartesian (or x,y) coordinate system to identify where you click your cursor. For Mac or DOS/Windows users, Adobe Photoshop and CorelPaint are commercial packages that can easily do this; DOS/Windows users can also use the Lview Pro shareware utility; and Unix users can use the xv package. You should identify an x,y coordinate that is somewhere in the middle of each node that you want to monitor. For the router in Figure 1, for example, an x,y coordinate of (332,117) falls right in the middle of the diamond. These coordinates are measured in pixels.
There's no need to be overly precise; your coordinates need only fall somewhere inside the node's bounding area. Next, you create a text file where you pair each x,y coordinate with a TCP/IP address and an optional node name and record. The format should be as follows:
x,y ip-address optional-node-name
Separate the fields with white space by using tabs or extra spacing; each line should contain one entry. Here's an example with fictional IP addresses for Figure 1, entered in a text file called NODES.DAT:
332,117 199.199.199.1 ums-gw
122,191 199.199.199.67 romeo
122,228 199.199.199.68 juliet
122,270 199.199.199.69 hamlet
190,355 199.199.199.2 wizard
240,355 199.199.199.7 dragon
292,355 199.199.199.9 damsel
334,355 199.199.199.20 delphi
378,232 199.199.199.111 odin
386,255 199.199.199.112 mimir
Once you've identified and entered coordinates for each node, you're ready for the next visual component.
The WebView Monitor
The status of the network is returned via a Web page, but since the map changes dynamically, the <IMG> tag on the page will point to a script rather than a static image. By using a script to create an image on-the-fly, the most recent status of the network can be obtained by simply clicking the Reload button on your browser--once you manage to bypass the caching of images.
[Move on to the next part of the article]
Web Developer® Site Feedback
Web Developer®
Copyright © 2000 internet.com Corporation. All rights reserved.