SNMP::Info::SONMP - SNMP Interface to SynOptics Network Management Protocol (SONMP)
Eric Miller
my $sonmp = new SNMP::Info ( AutoSpecify => 1, Debug => 1, DestHost => 'router', Community => 'public', Version => 2 ); my $class = $sonmp->class(); print " Using device sub class : $class\n"; $hassonmp = $sonmp->hasSONMP() ? 'yes' : 'no'; # Print out a map of device ports with SONMP neighbors: my $interfaces = $sonmp->interfaces(); my $sonmp_if = $sonmp->sonmp_if(); my $sonmp_ip = $sonmp->sonmp_ip(); my $sonmp_port = $sonmp->sonmp_port(); foreach my $sonmp_key (keys %$sonmp_ip){ my $iid = $sonmp_if->{$sonmp_key}; my $port = $interfaces->{$iid}; my $neighbor = $sonmp_ip->{$sonmp_key}; my $neighbor_port = $sonmp_port->{$sonmp_key}; print "Port : $port connected to $neighbor / $neighbor_port\n"; }
SNMP::Info::SONMP is a subclass of SNMP::Info that provides an object oriented interface to the SynOptics Network Management Protocol (SONMP) information through SNMP.
SONMP is a Layer 2 protocol that supplies topology information of devices that also speak SONMP, mostly switches and hubs. SONMP is implemented in SynOptics, Bay, Nortel, and Avaya devices. SONMP has been rebranded by Bay then Nortel and may be referred to by several different names, including Nortel Discovery Protocol (NDP).
Create or use a device subclass that inherits this class. Do not use directly.
Each device implements a subset of the global and cache entries. Check the return value to see if that data is held by the device.
None.
These are methods that return scalar values from SNMP
Returns a number representing the number of ports reserved per slot or switch within the device MIB. Defaults to 32.
Returns the offset if slot numbering does not start at 0. Defaults to 1.
Returns the offset if port numbering does not start at 0. Defaults to 0.
Is SONMP is active in this device?
Returns the IP that the device is sending out for its Nmm topology info.
(s5EnMsTopIpAddr)
s5EnMsTopIpAddr
Returns true if SONMP is on for this device.
(s5EnMsTopStatus)
s5EnMsTopStatus
Returns MAC of the advertised IP address of this device.
These are methods that return tables of information in the form of a reference to a hash.
s5EnMsTopNmmTable
Returns reference to hash. Key: Table entry, Value:slot number
(s5EnMsTopNmmSlot)
s5EnMsTopNmmSlot
Returns reference to hash. Key: Table entry, Value:Port Number (interface iid)
(s5EnMsTopNmmPort)
s5EnMsTopNmmPort
Returns reference to hash. Key: Table entry, Value:Remote IP address of entry
(s5EnMsTopNmmIpAddr)
s5EnMsTopNmmIpAddr
Returns reference to hash. Key: Table entry, Value:Remote Segment ID
(s5EnMsTopNmmSegId)
s5EnMsTopNmmSegId
(s5EnMsTopNmmMacAddr)
s5EnMsTopNmmMacAddr
Returns reference to hash. Key: Table entry, Value:Remote MAC address
Returns reference to hash. Key: Table entry, Value:Remote Device Type
(s5EnMsTopNmmChassisType)
s5EnMsTopNmmChassisType
Returns reference to hash. Key: Table entry, Value: Boolean, if bay_topo_seg() is local.
(s5EnMsTopNmmLocalSeg)
s5EnMsTopNmmLocalSeg
s5EnMsTopNmmEnhancedTable
(s5EnMsTopNmmEnhancedMacAddr)
s5EnMsTopNmmEnhancedMacAddr
(s5EnMsTopNmmEnhancedChassisType)
s5EnMsTopNmmEnhancedChassisType
All entries with port=0 are local and ignored.
Returns reference to hash. Key: IID, Value: Local port (interfaces)
Returns reference to hash. Key: IID, Value: Remote IP address
If multiple entries exist with the same local port, sonmp_if(), with different IPv4 addresses, sonmp_ip(), there is either a non SONMP device in between two or more devices or multiple devices which are not directly connected.
Use the data from the Layer2 Topology Table below to dig deeper.
Returns reference to hash. Key: IID, Value: Remote port (interfaces)
Returns reference to hash. Key: IID, Value: Remote device type
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.