cmv has asked for the wisdom of the Perl Monks concerning the following question:
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:
The data structures for host could contain "ifconfig" and "route" information like hostType, networkInterface, ipAddress, netMask, macAddr, interfaceSpeed, ..., defaultRoute, staticRoutes, ...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 network could contain things like hostList, routerList, ...
Any thoughts or suggestions are appreciated!
Thanks
-Craig
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Network Mapping Among Racked Suns
by samtregar (Abbot) on Apr 14, 2009 at 18:37 UTC | |
by cmv (Chaplain) on Apr 16, 2009 at 14:23 UTC |