Hello Monks-

I have a perl application that speaks to racks of Sun servers via ssh. Each server has multiple Ethernet interfaces on different logical networks. We recommend to our customers how to setup these networks, but in the end, the customers can (and do) configure the networks any way they want.

My poor little script needs to map out how the user has actually setup the network connections on these servers, so it can choose the best way to route some fire-hose data from an application it may be asked to start to a pre-defined data collection point.

Does anything exist to help me do this?

Googling on "network mapping" gets me to a quagmire of network monitoring tools that seem to be way overkill for what I want here. I'm looking for something that I could use like this:

use strict; use warnings; use netMapper; my $mapper=netMapper->new(qw(host1 host2 host3 ...)); if($mapper->badHosts) { warn "Can't contact hosts:" . $mapper->badHosts . "\n"; } foreach my $host ($mapper->Hosts) { print "$host INFO:\n", Dumper($mapper->HostInfo($host)), "\n"; } foreach my $network ($mapper->Networks) { print "$network INFO:\n", Dumper($mapper->NetInfo($network)), "\n" +; }
The data structures for host could contain "ifconfig" and "route" information like hostType, networkInterface, ipAddress, netMask, macAddr, interfaceSpeed, ..., defaultRoute, staticRoutes, ...

The data structures for network could contain things like hostList, routerList, ...

Any thoughts or suggestions are appreciated!

Thanks

-Craig


In reply to Network Mapping Among Racked Suns by cmv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.