* CH: patch H3C broken node-vlan mapping
see https://github.com/netdisco/snmp-info/issues/218
--+ qb_fw_vlan
qb_fw_vlan is called to figure out in which vlan a mac is located.
fetch qb_fw_port. This is a hash
fdb_id.mac => fdb_port
for each key split of fdb_id
try to look it up in qb_fdb_ids to translate it to vlan
otherwise use it directly as vlan.
--+ qb_fw_port
qb_fw_port fetchs snmp dot1qTpFdbPort, oid 1.3.6.1.2.1.17.7.1.2.2.1.2
This snmp table returns
fdb_id.mac => fdb_port
as an example data fetched from a HP switch (Layer2::HP)
SNMPv2-SMI::mib-2.17.7.1.2.2.1.2.3.52.20.95.80.231.59 = INTEGER: 9
fdb_id: 3
mac: 34:14:5f:50:e7:3b
fdb_port: 9
and an expample for a H3C (Layer3::H3C)
SNMPv2-SMI::mib-2.17.7.1.2.2.1.2.1.0.17.17.117.83.217 = INTEGER: 891
fdb_id: 1
mac: 0:11:11:75:53:d9
fdb_port: 891
snmp looks got. Verified with netdisco
/opt/netdisco/bin/netdisco-do show -d <SWITCH> -e Layer3::H3C::qb_fw_port
/opt/netdisco/bin/netdisco-do show -d <SWITCH> -e Layer2::HP::qb_fw_port
result looks good.
--+ qb_fdb_index
qb_fdb_index fetches snmp dot1qVlanFdbId which is oid 1.3.6.1.2.1.17.7.1.4.2.1.3
This snmp table returns
timestamp.vlan => fdb_id
netdisco will strip the timestamp and build a hash
fdb_id => vlan
for a HP switch i get snmp data
SNMPv2-SMI::mib-2.17.7.1.4.2.1.3.0.64 = Gauge32: 6
vlan: 64
fdb_id: 6
for a H3C i get
SNMPv2-SMI::mib-2.17.7.1.4.2.1.3.3330.64 = Gauge32: 1
vlan: 64
fdb_id: 1
and there are the issues.
not all vlans are listed
every line has fdb_id 1
as in all H3C switches i checked, the fdb_id is equal to the vlan i patched out
qb_fdb_index to return an empty hash.
* CH: H3C fix pod caverage test
Co-authored-by: Christoph Handel <c.handel@gsi.de>
* CH: add white rabbit
* CH: .
* CH: better version field
* CH: whiterabbit fix version and pod documentation
* fix mib links
and a few wihtespace cleanups
* map enterprises.96
map enterprises.96 to whiterabbit.
this is the id of cern, only layer3::whiterabbit uses it
* removed inherited modules
remove modules that get pulled in via snmp::info::layer3
use SNMP::Info::LLDP;
use SNMP::Info::Bridge;
remove module that doesn't seems to be used
use Socket;
Co-authored-by: Christoph Handel <c.handel@gsi.de>
Co-authored-by: nick n <39005454+inphobia@users.noreply.github.com>
a few typos
info::bridge & info::lldp get pulled in via info::layer3
use Socket could be dropped in favor of resolve_desthost(), but needs testing.
(not tested waiting for what travis says)
* first part of fix for #372
makes lldp stop using lldpLocPortDesc directly but maps it to a function
start framework to allow nexus.pm to overwrite that function for nx-os6
* second part of fix for #372
make nx-os 6 return lldpLocPortId for lldp_lport_desc
* munge_null and whitespace nits
Note that Teltonika routers run the net-snmp agent and can present the net-snmp enterprise ID; if so, configure the following through the router CLI to be identified as Teltonika and to be picked up by this device class:
uci set snmpd.@system[0].sysObjectID=.1.3.6.1.4.1.48690
uci commit
ubus call uci commit '{"config":"snmpd"}'
after reading netdisco/netdisco#693 and checking the code it seems layers() does not return l2 support.
while here add required mibs and move layers() manpage to globals, not table entries
* Retrieve Serial Number and device type for CheckPoint devices at right place in MIB
* Retrieve Serial Number and device type for CheckPoint
* Retrieve Serial Number and device type for CheckPoint
* Test not correct with cache data
* ident
* remove $Id$ tags from rcs software which has been retired
* make an effort to sync required mib docs with actual code
* sync even more docs with what code actually does
* some whitespace nits
* fixup example to use snmpv2 for all but the most ancient devices
* remove blurb to find more specific snmp::info classes for classes
which alrdy are as specific as they can get (eg snmp::info::layer3::vmware
doesn't need info on to find a specific module since there ain't none)
* rename all sub {vendor} strings to lowercase vendor, if cisco, juniper
and arista can be lowercase, so can be all the rest.
* fix tests
* spread some use warnings around
* use $ instead of @
* remove defines that are included via parent classes
* use strict + warnings
* remove alrdy included modules
* add comma after last list item
* typos
* mibs are found in our mib repo, not on the cisco site
* documentation fixes
having a go at intellij + perl support & cygwin. working surprisingly well.
exclude it's project configuration files. also fix 3 typos found when getting this to work.
while it's not yet complete is already is quite functional.
things like vlan, lldp, connected nodes, etc all work
test coverage also included.
features to be added:
link aggregation master/slave (some strange difference with standard 802.3ad i think)
spanning tree will most likely work too
fan/psu status
modules / entity-mib seems to be strangly formatted
* make fortinet return a useful interface name.
also fixes missing interface issue due to being unable to map the port
'interfaces - ignoring 54 (no port mapping)'
* update oneaccess, regretfully it seems oneos version6 is a step back when it comes to snmp support.
changes:
* start using oneaccess mibs, not much useable data there yet however
* return the device model
* show os version for version 6 too. not many elegeant ways to handle all the version syntaxes used,
so just dump what resembles a version string & be done with it
* updated documentation
tested on:
one420 - os V5.2R1C12
one521 - os 6.1.rc1patch06
one521 - os 6.1.3
some comments in the code as what works & what doesn't.
* typo
* bump required netdisco-mibs version to 4.014 (not released yet) but needed for oneaccess mibs. might as well fail at the start of the build instead of the end
* 2 tests fixed for oneaccess, 1 more to go
* last test fixed
* a few more changes
but mostly need to have a file change so i can trigger a travis build :)