1Info::SONMP(3) User Contributed Perl Documentation Info::SONMP(3)
2
3
4
6 SNMP::Info::SONMP - SNMP Interface to SynOptics Network Management
7 Protocol (SONMP)
8
10 Eric Miller
11
13 my $sonmp = new SNMP::Info (
14 AutoSpecify => 1,
15 Debug => 1,
16 DestHost => 'router',
17 Community => 'public',
18 Version => 2
19 );
20
21 my $class = $sonmp->class();
22 print " Using device sub class : $class\n";
23
24 $hascdp = $sonmp->hasCDP() ? 'yes' : 'no';
25
26 # Print out a map of device ports with CDP neighbors:
27 my $interfaces = $sonmp->interfaces();
28 my $c_if = $sonmp->c_if();
29 my $c_ip = $sonmp->c_ip();
30 my $c_port = $sonmp->c_port();
31
32 foreach my $cdp_key (keys %$c_ip){
33 my $iid = $c_if->{$cdp_key};
34 my $port = $interfaces->{$iid};
35 my $neighbor = $c_ip->{$cdp_key};
36 my $neighbor_port = $c_port->{$cdp_key};
37 print "Port : $port connected to $neighbor / $neighbor_port\n";
38 }
39
41 SNMP::Info::SONMP is a subclass of SNMP::Info that provides an object
42 oriented interface to the SynOptics Network Management Protocol (SONMP)
43 information through SNMP.
44
45 SONMP is a Layer 2 protocol that supplies topology information of
46 devices that also speak SONMP, mostly switches and hubs. SONMP is
47 implemented in SynOptics, Bay, and Nortel devices. SONMP has been
48 rebranded by Bay then Nortel and is know by several different names,
49 most recently Nortel Discovery Protocol (NDP).
50
51 Create or use a device subclass that inherits this class. Do not use
52 directly.
53
54 Each device implements a subset of the global and cache entries. Check
55 the return value to see if that data is held by the device.
56
57 Inherited Classes
58 None.
59
60 Required MIBs
61 SYNOPTICS-ROOT-MIB
62 S5-ETH-MULTISEG-TOPOLOGY-MIB
63
65 These are methods that return scalar values from SNMP
66
67 $sonmp->index_factor()
68 Returns a number representing the number of ports reserved per slot
69 or switch within the device MIB. Defaults to 32.
70
71 $sonmp->slot_offset()
72 Returns the offset if slot numbering does not start at 0. Defaults
73 to 1.
74
75 $sonmp->port_offset()
76 Returns the offset if port numbering does not start at 0. Defaults
77 to 0.
78
79 $cdp->hasCDP()
80 Is SONMP is active in this device?
81
82 $sonmp->cdp_id()
83 Returns the IP that the device is sending out for its Nmm topology
84 info.
85
86 ("s5EnMsTopIpAddr")
87
88 $sonmp->cdp_run()
89 Returns true if SONMP is on for this device.
90
91 ("s5EnMsTopStatus")
92
93 $sonmp->mac()
94 Returns MAC of the advertised IP address of the device.
95
97 These are methods that return tables of information in the form of a
98 reference to a hash.
99
100 Layer2 Topology info ("s5EnMsTopNmmTable")
101 $sonmp->sonmp_topo_slot()
102 Returns reference to hash. Key: Table entry, Value:slot number
103
104 ("s5EnMsTopNmmSlot")
105
106 $sonmp->sonmp_topo_port()
107 Returns reference to hash. Key: Table entry, Value:Port Number
108 (interface iid)
109
110 ("s5EnMsTopNmmPort")
111
112 $sonmp->sonmp_topo_ip()
113 Returns reference to hash. Key: Table entry, Value:Remote IP
114 address of entry
115
116 ("s5EnMsTopNmmIpAddr")
117
118 $sonmp->sonmp_topo_seg()
119 Returns reference to hash. Key: Table entry, Value:Remote Segment
120 ID
121
122 ("s5EnMsTopNmmSegId")
123
124 $sonmp->sonmp_topo_mac()
125 ("s5EnMsTopNmmMacAddr")
126
127 Returns reference to hash. Key: Table entry, Value:Remote MAC
128 address
129
130 $sonmp->sonmp_topo_platform
131 Returns reference to hash. Key: Table entry, Value:Remote Device
132 Type
133
134 ("s5EnMsTopNmmChassisType")
135
136 $sonmp->sonmp_topo_localseg
137 Returns reference to hash. Key: Table entry, Value: Boolean, if
138 bay_topo_seg() is local.
139
140 ("s5EnMsTopNmmLocalSeg")
141
142 Pseudo CDP information
143 All entries with port=0 are local and ignored.
144
145 $sonmp->c_if()
146 Returns reference to hash. Key: IID, Value: Local port
147 (interfaces)
148
149 $sonmp->c_ip()
150 Returns reference to hash. Key: IID, Value: Remote IP address
151
152 If multiple entries exist with the same local port, c_if(), with
153 different IPv4 addresses, c_ip(), there is either a non SONMP
154 device in between two or more devices or multiple devices which are
155 not directly connected.
156
157 Use the data from the Layer2 Topology Table below to dig deeper.
158
159 $sonmp->c_port()
160 Returns reference to hash. Key: IID, Value: Remote port
161 (interfaces)
162
163 $sonmp->c_platform()
164 Returns reference to hash. Key: IID, Value: Remote device type
165
166
167
168perl v5.12.0 2009-06-12 Info::SONMP(3)