1SNMP::Info::FDP(3pm)  User Contributed Perl Documentation SNMP::Info::FDP(3pm)
2
3
4

NAME

6       SNMP::Info::FDP - SNMP Interface to Foundry Discovery Protocol (FDP)
7       using SNMP
8

AUTHOR

10       Bruce Rodger, Max Baker
11

SYNOPSIS

13        my $fdp = new SNMP::Info (
14                                    AutoSpecify => 1,
15                                    Debug       => 1,
16                                    DestHost    => 'router',
17                                    Community   => 'public',
18                                    Version     => 2
19                                  );
20
21        my $class = $fdp->class();
22        print " Using device sub class : $class\n";
23
24        $hasfdp   = $fdp->hasFDP() ? 'yes' : 'no';
25
26        # Print out a map of device ports with FDP neighbors:
27        my $interfaces   = $fdp->interfaces();
28        my $fdp_if       = $fdp->fdp_if();
29        my $fdp_ip       = $fdp->fdp_ip();
30        my $fdp_port     = $fdp->fdp_port();
31
32        foreach my $fdp_key (keys %$fdp_ip){
33           my $iid           = $fdp_if->{$fdp_key};
34           my $port          = $interfaces->{$iid};
35           my $neighbor      = $fdp_ip->{$fdp_key};
36           my $neighbor_port = $fdp_port->{$fdp_key};
37           print "Port : $port connected to $neighbor / $neighbor_port\n";
38        }
39

DESCRIPTION

41       SNMP::Info::FDP is a subclass of SNMP::Info that provides an object
42       oriented interface to FDP information through SNMP.
43
44       FDP is a Layer 2 protocol that supplies topology information of devices
45       that also speak FDP, mostly switches and routers.  It has similar
46       functionality to Cisco's CDP, and the SNMP interface is virtually
47       identical.  FDP is implemented in Brocade (Foundry) devices.
48
49       Create or use a device subclass that inherits this class.  Do not use
50       directly.
51
52       Each device implements a subset of the global and cache entries.  Check
53       the return value to see if that data is held by the device.
54
55   Inherited Classes
56       None.
57
58   Required MIBs
59       FOUNDRY-SN-SWITCH-GROUP-MIB
60           Needs a reasonably recent MIB. Works OK with B2R07604A.mib, but
61           doesn't work with B2R07600C.
62

GLOBALS

64       These are methods that return scalar values from SNMP
65
66       $fdp->hasFDP()
67           Is FDP is active in this device?
68
69           Accounts for SNMP version 1 devices which may have FDP but not
70           fdp_run()
71
72       $fdp->fdp_run()
73           Is FDP enabled on this device?
74
75           ("fdpGlobalRun")
76
77       $fdp->fdp_interval()
78           Interval in seconds at which FDP messages are generated.
79
80           ("fdpGlobalMessageInterval")
81
82       $fdp->fdp_holdtime()
83           Time in seconds that FDP messages are kept.
84
85           ("fdpGlobalHoldTime")
86
87   Overrides
88       CDP compatibility
89
90       $fdp->fdp_interval()
91           Interval in seconds at which FDP messages are generated.
92
93           ("fdpGlobalMessageInterval")
94
95       $fdp->fdp_holdtime()
96           Time in seconds that FDP messages are kept.
97
98           ("fdpGlobalHoldTime")
99
100       $fdp->fdp_id()
101           Returns FDP device ID.
102
103           This is the device id broadcast via FDP to other devices, and is
104           what is retrieved from remote devices with $fdp->id().
105
106           ("fdpGlobalDeviceId")
107
108       $fdp->fdp_run()
109           Is FDP enabled on this device?
110

TABLE METHODS

112       These are methods that return tables of information in the form of a
113       reference to a hash.
114
115   Overrides
116       CDP compatibility
117
118       $fdp->fdp_capabilities()
119           Returns Device Functional Capabilities.  Results are munged into an
120           ascii binary string, MSB.  Each digit represents a bit from the
121           table below.
122
123           From
124           <http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm#18843>:
125
126           (Bit) - Description
127
128           (0x40) - Provides level 1 functionality.
129           (0x20) - The bridge or switch does not forward IGMP Report packets
130           on non router ports.
131           (0x10) - Sends and receives packets for at least one network layer
132           protocol. If the device is routing the protocol, this bit should
133           not be set.
134           (0x08) - Performs level 2 switching. The difference between this
135           bit and bit 0x02 is that a switch does not run the Spanning-Tree
136           Protocol. This device is assumed to be deployed in a physical loop-
137           free topology.
138           (0x04) - Performs level 2 source-route bridging. A source-route
139           bridge would set both this bit and bit 0x02.
140           (0x02) - Performs level 2 transparent bridging.
141           (0x01) - Performs level 3 routing for at least one network layer
142           protocol.
143
144           Thanks to Martin Lorensen for a pointer to this information.
145
146           ("fdpCacheCapabilities")
147
148       $fdp->fdp_id()
149           Returns remote device id string
150
151           ("fdpCacheDeviceId")
152
153       $fdp->fdp_if()
154           Returns the mapping to the SNMP Interface Table.
155
156           In order to map the fdp table entry back to the interfaces() entry,
157           we truncate the last number off of it :
158
159             my $fdp_ip       = $device->fdp_ip();
160
161             my %fdp_if
162             foreach my $key (keys %$fdp_ip){
163                 $iid = $key;
164                 ## Truncate off .1 from fdp response
165                 $iid =~ s/\.\d+$//;
166                 $fdp_if{$key} = $iid;
167             }
168
169             return \%fdp_if;
170
171       $fdp->fdp_ip()
172           Returns remote IP address
173
174           ("fdpCacheAddress")
175
176       $fdp->fdp_platform()
177           Returns remote platform id
178
179           ("fdpCachePlatform")
180
181       $fdp->fdp_port()
182           Returns remote port ID
183
184           ("fdpDevicePort")
185
186       $fdp->fdp_proto()
187           Returns remote address type received.  Usually IP.
188
189           ("fdpCacheAddressType")
190
191       $fdp->fdp_ver()
192           Returns remote hardware version
193
194           ("fdpCacheVersion")
195
196       $fdp->fdp_cache_type()
197           Returns type of entry received, either FDP or CDP.
198
199           ("snFdpCacheVendorId")
200
201
202
203perl v5.38.0                      2023-09-04              SNMP::Info::FDP(3pm)
Impressum