netdisco / snmp-info

Other
40 stars 33 forks source link

Netdisco doesn't record vlans on MikroTik switches. #498

Open d1mk0u opened 2 years ago

d1mk0u commented 2 years ago

Expected Behavior

Under Netdisco GUI VLAN's tab, list of configured vlan's on device.

Current Behavior

No matching records.

Possible Solution

Steps to Reproduce (for bugs)

  1. open Netdisco GUI
  2. Choose MikroTik device
  3. open VLAN tab

Context

Sometimes it's very convenient to use search by vlan, Netdisco return all devices with specified vlan-id.

Your Environment

Built using Open Source

Software:               Version
App::Netdisco:      2.52.0
SNMP::Info:     3.81
DB Schema:      70
PostgreSQL:     11.00.14
Perl:                      5.28.1

Config info (deployment.yml)

database:
  name: 'netdisco'
  user: 'netdisco'
  pass: 'netdisco'
  #host: 'localhost'

device_auth:
  - tag: 'default_v2_readonly'
    community: 'public'
    read: true
    write: false
  - tag: 'default_v2_readonly_nr2'
    community: 'public'
    read: true
    write: false
    only:
      - 10.0.6.11
      - 10.0.6.12
      - 10.0.6.13
      - 10.0.6.19
      - 10.0.6.20
      - 10.0.6.21
      - 10.0.6.23
      - 10.0.6.25
      - 10.0.6.26
      - 10.0.0.34
      - 10.0.0.36
      - 10.0.0.67
      - 10.0.0.102
      - 10.0.0.110
      - 10.0.0.112
      - 10.0.0.113
      - 10.0.0.155
  - tag: 'default_v2_readonly_nr3'
    community: 'public'
    read: true
    write: false
    only:
      - 10.0.6.14
      - 10.0.6.15
      - 10.0.6.16
      - 10.0.6.17
      - 10.0.6.18

domain_suffix: ['.mydomain.com']

schedule:
  nodemonitor:
     when: '*/15 * * * *'

ignore_interfaces:
  - 'NULL\d'
  - 'Null\d'
  - 'dsc'
  - 'bme\d'
  - 'bme\d.\d*'
  - 'gre'
  - 'ipip'
#
dns:
  max_outstanding: 50
  hosts_file: '/etc/hosts'
  no: ['fe80::/64','169.254.0.0/16']

# TACACS AUTH
tacacs:
  server: '10.0.0.1'
  key: 'my_pass'

# Device groups.
host_groups:
  org_lan:
    - 10.0.0.0/24
  org_ext:
    - 10.0.6.0/24

# Device group displayed name.
host_group_displaynames:
  org_lan: 'Org LAN'
  org_ext: 'Org External'

Device information

netdisco-do show -d 1.1.1.1 -e specify -DI

netdisco@netdisco:~$ netdisco-do show -d 10.0.0.10 -e specify -DI
[22344] 2022-02-01 11:05:04  info App::Netdisco version 2.052000 loaded.
[22344] 2022-02-01 11:05:05  info show: [10.0.0.10]/specify started at Tue Feb  1 13:05:05 2022
[22344] 2022-02-01 11:05:05 debug show: running with timeout 600s
[22344] 2022-02-01 11:05:05 debug => running workers for phase: check
[22344] 2022-02-01 11:05:05 debug -> run worker check/_base_/0
[22344] 2022-02-01 11:05:05 debug Show is able to run
[22344] 2022-02-01 11:05:05 debug => running workers for phase: main
[22344] 2022-02-01 11:05:05 debug -> run worker main/_base_/100
[22344] 2022-02-01 11:05:05 debug snmp reader cache warm: [10.0.0.10]
[22344] 2022-02-01 11:05:05 debug [10.0.0.10:161] try_connect with ver: 2, class: SNMP::Info::Layer3::Mikrotik, comm: <hidden>
SNMP::Info::_global uptime : DISMAN-EVENT-MIB::sysUpTimeInstance : .1.3.6.1.2.1.1.3.0
SNMP::Info::_global layers : SNMPv2-MIB::sysServices.0 : .1.3.6.1.2.1.1.7.0
SNMP::Info::_global description : SNMPv2-MIB::sysDescr.0 : .1.3.6.1.2.1.1.1.0
SNMP::Info::_global id : SNMPv2-MIB::sysObjectID.0 : .1.3.6.1.2.1.1.2.0
SNMP::Info 3.81
SNMP::Info::device_type() layers:01001110 id:14988 sysDescr:"RouterOS CRS326-24G-2S+"
SNMP::Info 3.81
SNMP::Info::device_type() layers:01001110 id:14988 sysDescr:"RouterOS CRS326-24G-2S+"
SNMP::Info::specify() - Changed Class to SNMP::Info::Layer3::Mikrotik.
SNMP::Info::_validate_autoload_method(_data_printer) Unable to resolve method.
SNMP::Info::Layer3::Mikrotik  {
    Parents       SNMP::Info::Layer3, Exporter
    Linear @ISA   SNMP::Info::Layer3::Mikrotik, SNMP::Info::Layer3, SNMP::Info::PowerEthernet, SNMP::Info, Exporter, SNMP::Info::IPv6, SNMP::Info::Entity, SNMP::Info::EtherLike, SNMP::Info::Bridge, SNMP::Info::AdslLine, SNMP::Info::LLDP, SNMP::Info::DocsisHE
    public methods (6) : board_temp, cpu_temp, model, os, serial, vendor
    private methods (0)
    internals: {
        args                {
            AutoSpecify         0,
            BulkRepeaters       20,
            BulkWalk            1,
            Community           "public",
            Debug               1,
            DebugSNMP           0,
            DestHost            "10.0.0.10",
            IgnoreNetSNMPConf   1,
            MibDirs             [
                [0]   "/home/netdisco/netdisco-mibs/3com",
                [1]   "/home/netdisco/netdisco-mibs/adtran",
                [2]   "/home/netdisco/netdisco-mibs/aerohive",
                [3]   "/home/netdisco/netdisco-mibs/alcatel",
                [4]   "/home/netdisco/netdisco-mibs/allied",
                [5]   "/home/netdisco/netdisco-mibs/apc",
                [6]   "/home/netdisco/netdisco-mibs/arista",
                [7]   "/home/netdisco/netdisco-mibs/aruba",
                [8]   "/home/netdisco/netdisco-mibs/asante",
                [9]   "/home/netdisco/netdisco-mibs/avaya",
                [10]  "/home/netdisco/netdisco-mibs/bluecoat",
                [11]  "/home/netdisco/netdisco-mibs/bluesocket",
                [12]  "/home/netdisco/netdisco-mibs/brother",
                [13]  "/home/netdisco/netdisco-mibs/cabletron",
                [14]  "/home/netdisco/netdisco-mibs/ceragon",
                [15]  "/home/netdisco/netdisco-mibs/cern",
                [16]  "/home/netdisco/netdisco-mibs/checkpoint",
                [17]  "/home/netdisco/netdisco-mibs/ciena",
                [18]  "/home/netdisco/netdisco-mibs/cisco",
                [19]  "/home/netdisco/netdisco-mibs/ciscosb",
                [20]  "/home/netdisco/netdisco-mibs/citrix",
                [21]  "/home/netdisco/netdisco-mibs/clavister",
                [22]  "/home/netdisco/netdisco-mibs/cloudgenix",
                [23]  "/home/netdisco/netdisco-mibs/colubris",
                [24]  "/home/netdisco/netdisco-mibs/cumulus",
                [25]  "/home/netdisco/netdisco-mibs/cyclades",
                [26]  "/home/netdisco/netdisco-mibs/d-link",
                [27]  "/home/netdisco/netdisco-mibs/dell",
                [28]  "/home/netdisco/netdisco-mibs/eaton",
                [29]  "/home/netdisco/netdisco-mibs/efficientip",
                [30]  "/home/netdisco/netdisco-mibs/enterasys",
                [31]  "/home/netdisco/netdisco-mibs/etherwan",
                [32]  "/home/netdisco/netdisco-mibs/exinda",
                [33]  "/home/netdisco/netdisco-mibs/EXTRAS",
                [34]  "/home/netdisco/netdisco-mibs/extreme",
                [35]  "/home/netdisco/netdisco-mibs/extricom",
                [36]  "/home/netdisco/netdisco-mibs/f5",
                [37]  "/home/netdisco/netdisco-mibs/force10",
                [38]  "/home/netdisco/netdisco-mibs/fortinet",
                [39]  "/home/netdisco/netdisco-mibs/foundry",
                [40]  "/home/netdisco/netdisco-mibs/gigamon",
                [41]  "/home/netdisco/netdisco-mibs/h3c",
                [42]  "/home/netdisco/netdisco-mibs/hirschmann",
                [43]  "/home/netdisco/netdisco-mibs/hp",
                [44]  "/home/netdisco/netdisco-mibs/hpe",
                [45]  "/home/netdisco/netdisco-mibs/huawei",
                [46]  "/home/netdisco/netdisco-mibs/ibm",
                [47]  "/home/netdisco/netdisco-mibs/intel",
                [48]  "/home/netdisco/netdisco-mibs/juniper",
                [49]  "/home/netdisco/netdisco-mibs/korenix",
                [50]  "/home/netdisco/netdisco-mibs/lancom",
                [51]  "/home/netdisco/netdisco-mibs/lantronix",
                [52]  "/home/netdisco/netdisco-mibs/lenovo",
                [53]  "/home/netdisco/netdisco-mibs/liebert",
                [54]  "/home/netdisco/netdisco-mibs/mediant",
                [55]  "/home/netdisco/netdisco-mibs/mellanox",
                [56]  "/home/netdisco/netdisco-mibs/meraki",
                [57]  "/home/netdisco/netdisco-mibs/meru",
                [58]  "/home/netdisco/netdisco-mibs/microsens",
                [59]  "/home/netdisco/netdisco-mibs/mikrotik",
                [60]  "/home/netdisco/netdisco-mibs/moser-baer",
                [61]  "/home/netdisco/netdisco-mibs/motorola",
                [62]  "/home/netdisco/netdisco-mibs/moxa",
                [63]  "/home/netdisco/netdisco-mibs/nateks",
                [64]  "/home/netdisco/netdisco-mibs/net-snmp",
                [65]  "/home/netdisco/netdisco-mibs/netapp",
                [66]  "/home/netdisco/netdisco-mibs/netgear",
                [67]  "/home/netdisco/netdisco-mibs/netonix",
                [68]  "/home/netdisco/netdisco-mibs/netscreen",
                [69]  "/home/netdisco/netdisco-mibs/nexans",
                [70]  "/home/netdisco/netdisco-mibs/nortel",
                [71]  "/home/netdisco/netdisco-mibs/northerndesign",
                [72]  "/home/netdisco/netdisco-mibs/oneaccess",
                [73]  "/home/netdisco/netdisco-mibs/openbsd",
                [74]  "/home/netdisco/netdisco-mibs/opengear",
                [75]  "/home/netdisco/netdisco-mibs/packetfront",
                [76]  "/home/netdisco/netdisco-mibs/paloalto",
                [77]  "/home/netdisco/netdisco-mibs/pica8",
                [78]  "/home/netdisco/netdisco-mibs/pulsesecure-gateway",
                [79]  "/home/netdisco/netdisco-mibs/rad",
                [80]  "/home/netdisco/netdisco-mibs/redlionram",
                [81]  "/home/netdisco/netdisco-mibs/rfc",
                [82]  "/home/netdisco/netdisco-mibs/rittal",
                [83]  "/home/netdisco/netdisco-mibs/riverbed",
                [84]  "/home/netdisco/netdisco-mibs/ruckus",
                [85]  "/home/netdisco/netdisco-mibs/schleifenbauer",
                [86]  "/home/netdisco/netdisco-mibs/sentry",
                [87]  "/home/netdisco/netdisco-mibs/siemens",
                [88]  "/home/netdisco/netdisco-mibs/sixnet",
                [89]  "/home/netdisco/netdisco-mibs/sonicwall",
                [90]  "/home/netdisco/netdisco-mibs/sophos",
                [91]  "/home/netdisco/netdisco-mibs/teleste",
                [92]  "/home/netdisco/netdisco-mibs/teltonika",
                [93]  "/home/netdisco/netdisco-mibs/tplink",
                [94]  "/home/netdisco/netdisco-mibs/trapeze",
                [95]  "/home/netdisco/netdisco-mibs/ubnt",
                [96]  "/home/netdisco/netdisco-mibs/vmware",
                [97]  "/home/netdisco/netdisco-mibs/watchguard",
                [98]  "/home/netdisco/netdisco-mibs/wipipe",
                [99]  "/home/netdisco/netdisco-mibs/xedia",
                [100] "/home/netdisco/netdisco-mibs/xirrus"
            ],
            NonIncreasing       0,
            RemotePort          161,
            Retries             2,
            Session             SNMP::Session,
            Timeout             3000000,
            Version             2
        },
        BulkRepeaters       20,
        BulkWalk            1,
        class               "SNMP::Info::Layer3::Mikrotik",
        debug               1,
        funcs               {
            adsl_atuc_crc_block_len                    "adslAtucChanCrcBlockLength",
            adsl_atuc_curr_tx_rate                     "adslAtucChanCurrTxRate",
            adsl_atuc_interleave_delay                 "adslAtucChanInterleaveDelay",
            adsl_atuc_prev_tx_rate                     "adslAtucChanPrevTxRate",
            adsl_atur_crc_block_len                    "adslAturChanCrcBlockLength",
            adsl_atur_curr_tx_rate                     "adslAturChanCurrTxRate",
            adsl_atur_interleave_delay                 "adslAturChanInterleaveDelay",
            adsl_atur_prev_tx_rate                     "adslAturChanPrevTxRate",
            at_index                                   "ipNetToMediaIfIndex",
            at_netaddr                                 "ipNetToMediaNetAddress",
            at_paddr                                   "ipNetToMediaPhysAddress",
            bgp_peer_addr                              "bgpPeerRemoteAddr",
            bgp_peer_as                                "bgpPeerRemoteAs",
            bgp_peer_fsm_est_trans                     "bgpPeerFsmEstablishedTransitions",
            bgp_peer_id                                "bgpPeerIdentifier",
            bgp_peer_in_tot_msgs                       "bgpPeerInTotalMessages",
            bgp_peer_in_upd                            "bgpPeerInUpdates",
            bgp_peer_in_upd_el_time                    "bgpPeerInUpdateElapsedTime",
            bgp_peer_out_tot_msgs                      "bgpPeerOutTotalMessages",
            bgp_peer_out_upd                           "bgpPeerOutUpdates",
            bgp_peer_state                             "bgpPeerState",
            bgp_peers                                  "bgpPeerLocalAddr",
            bp_index                                   "dot1dBasePortIfIndex",
            bp_port                                    "dot1dBasePortCircuit",
            bs_mac                                     "dot1dStaticAddress",
            bs_port                                    "dot1dStaticReceivePort",
            bs_status                                  "dot1dStaticStatus",
            bs_to                                      "dot1dStaticAllowedToGoTo",
            c_addr6_index                              "cIpAddressIfIndex",
            c_addr6_pfx                                "cIpAddressPrefix",
            c_addr6_type                               "cIpAddressType",
            c_inet_phys_addr                           "cInetNetToMediaPhysAddress",
            c_inet_phys_state                          "cInetNetToMediaState",
            c_inet_phys_type                           "cInetNetToMediaType",
            c_pfx_origin                               "cIpAddressPfxOrigin",
            docs_cmts_cm_down_channel_if_index         "docsIfCmtsCmStatusDownChannelIfIndex",
            docs_cmts_cm_up_channel_if_index           "docsIfCmtsCmStatusUpChannelIfIndex",
            docs_if_cmts_cm_status_inet_address        "docsIfCmtsCmStatusInetAddress",
            docs_if_cmts_cm_status_inet_address_type   "docsIfCmtsCmStatusInetAddressType",
            docs_if3_cmts_cm_status_md_if_index        "docsIf3CmtsCmRegStatusMdIfIndex",
            e_alias                                    "entPhysicalAlias",
            e_class                                    "entPhysicalClass",
            e_descr                                    "entPhysicalDescr",
            e_fru                                      "entPhysicalIsFRU",
            e_fwver                                    "entPhysicalFirmwareRev",
            e_hwver                                    "entPhysicalHardwareRev",
            e_id                                       "entPhysicalAssetID",
            el_chipset                                 "dot3StatsEtherChipSet",
            el_coll_excess                             "dot3StatsExcessiveCollisions",
            el_coll_freq                               "dot3CollFrequencies",
            el_coll_late                               "dot3StatsLateCollisions",
            el_coll_mult                               "dot3StatsMultipleCollisionFrames",
            el_coll_single                             "dot3StatsSingleCollisionFrames",
            el_duplex                                  "dot3StatsDuplexStatus",
            el_error_alignment                         "dot3StatsAlignmentErrors",
            el_error_cs                                "dot3StatsCarrierSenseErrors",
            el_error_fcs                               "dot3StatsFCSErrors",
            el_error_frame                             "dot3StatsFrameTooLongs",
            el_error_mac_rec                           "dot3StatsInternalMacReceiveErrors",
            el_error_mac_xmit                          "dot3StatsInternalMacTransmitErrors",
            el_error_sqe                               "dot3StatsSQETestErrors",
            el_error_symbol                            "dot3StatsSymbolErrors",
            el_index                                   "dot3StatsIndex",
            el_xmit_defer                              "dot3StatsDeferredTransmissions",
            e_map                                      "entAliasMappingIdentifier",
            e_model                                    "entPhysicalModelName",
            e_name                                     "entPhysicalName",
            e_parent                                   "entPhysicalContainedIn",
            e_pos                                      "entPhysicalParentRelPos",
            e_serial                                   "entPhysicalSerialNum",
            e_swver                                    "entPhysicalSoftwareRev",
            e_type                                     "entPhysicalVendorType",
            e_vendor                                   "entPhysicalMfgName",
            fw_mac                                     "dot1dTpFdbAddress",
            fw_port                                    "dot1dTpFdbPort",
            fw_status                                  "dot1dTpFdbStatus",
            i_alias                                    "ifAlias",
            i_bad_proto_in                             "ifInUnknownProtos",
            i_description                              "ifDescr",
            i_discards_in                              "ifInDiscards",
            i_discards_out                             "ifOutDiscards",
            i_errors_in                                "ifInErrors",
            i_errors_out                               "ifOutErrors",
            i_index                                    "ifIndex",
            i_lastchange                               "ifLastChange",
            i_mac                                      "ifPhysAddress",
            i_mtu                                      "ifMtu",
            i_name                                     "ifName",
            interfaces                                 "ifIndex",
            i_octet_in                                 "ifInOctets",
            i_octet_in64                               "ifHCInOctets",
            i_octet_out                                "ifOutOctets",
            i_octet_out64                              "ifHCOutOctets",
            ip_addr6_index                             "ipAddressIfIndex",
            ip_addr6_pfx                               "ipAddressPrefix",
            ip_addr6_type                              "ipAddressType",
            ip_broadcast                               "ipAdEntBcastAddr",
            i_pkts_bcast_in                            "ifInBroadcastPkts",
            i_pkts_bcast_in64                          "ifHCInBroadcastPkts",
            i_pkts_bcast_out                           "ifOutBroadcastPkts",
            i_pkts_bcast_out64                         "ifHCOutBroadcastPkts",
            i_pkts_multi_in                            "ifInMulticastPkts",
            i_pkts_multi_in64                          "ifHCInMulticastPkts",
            i_pkts_multi_out                           "ifOutMulticastPkts",
            i_pkts_multi_out64                         "ifHCOutMulticastPkts",
            i_pkts_nucast_in                           "ifInNUcastPkts",
            i_pkts_nucast_out                          "ifOutNUcastPkts",
            i_pkts_ucast_in                            "ifInUcastPkts",
            i_pkts_ucast_in64                          "ifHCInUcastPkts",
            i_pkts_ucast_out                           "ifOutUcastPkts",
            i_pkts_ucast_out64                         "ifHCOutUcastPkts",
            ip_n2p_phys_addr                           "ipNetToPhysicalPhysAddress",
            ip_n2p_phys_state                          "ipNetToPhysicalState",
            ip_n2p_phys_type                           "ipNetToPhysicalType",
            ip_pfx_origin                              "ipAddressPrefixOrigin",
            ipr_age                                    "ipRouteAge",
            ipr_dest                                   "ipRouteNextHop",
            ipr_if                                     "ipRouteIfIndex",
            ipr_info                                   "ipRouteInfo",
            ipr_mask                                   "ipRouteMask",
            ipr_proto                                  "ipRouteProto",
            ipr_route                                  "ipRouteDest",
            ipr_type                                   "ipRouteType",
            ipr_1                                      "ipRouteMetric1",
            ipr_2                                      "ipRouteMetric2",
            ipr_3                                      "ipRouteMetric3",
            ipr_4                                      "ipRouteMetric4",
            ipr_5                                      "ipRouteMetric5",
            i_qlen_out                                 "ifOutQLen",
            is_edgeport_admin                          "dot1dStpPortAdminEdgePort",
            is_edgeport_oper                           "dot1dStpPortOperEdgePort",
            isis_adj                                   "isisISAdjIPAddrAddress",
            isis_adj_id                                "isisISAdjNeighSysID",
            isis_adj_ip_type                           "isisISAdjIPAddrType",
            isis_adj_state                             "isisISAdjState",
            isis_adj_type                              "isisISAdjNeighSysType",
            isis_adj_usage                             "isisISAdjUsage",
            isis_circ_admin                            "isisCircAdminState",
            isis_circ_if_idx                           "isisCircIfIndex",
            isis_circ_level_type                       "isisCircLevelType",
            isis_circ_type                             "isisCircType",
            i_specific                                 "ifSpecific",
            i_speed                                    "ifSpeed",
            i_speed_high                               "ifHighSpeed",
            i_stack_status                             "ifStackStatus",
            i_type                                     "ifType",
            i_up                                       "ifOperStatus",
            i_up_admin                                 "ifAdminStatus",
            i6_addr_pfxlen                             "ipv6AddrPfxLength",
            i6_n2p_phys_addr                           "ipv6NetToMediaPhysAddress",
            i6_n2p_phys_state                          "ipv6IfNetToMediaState",
            i6_n2p_phys_type                           "ipv6NetToMediaType",
            lldp_lman_addr                             "lldpLocManAddrIfId",
            lldp_lport_desc                            "lldpLocPortDesc",
            lldp_lport_id                              "lldpLocPortId",
            lldp_rem_asset                             "lldpXMedRemAssetID",
            lldp_rem_cap_spt                           "lldpRemSysCapSupported",
            lldp_rem_desc                              "lldpRemPortDesc",
            lldp_rem_fw_rev                            "lldpXMedRemFirmwareRev",
            lldp_rem_hw_rev                            "lldpXMedRemHardwareRev",
            lldp_rem_id                                "lldpRemChassisId",
            lldp_rem_id_type                           "lldpRemChassisIdSubtype",
            lldp_rem_media_cap                         "lldpXMedRemCapCurrent",
            lldp_rem_media_cap_spt                     "lldpXMedRemCapSupported",
            lldp_rem_model                             "lldpXMedRemModelName",
            lldp_rem_pid                               "lldpRemPortId",
            lldp_rem_pid_type                          "lldpRemPortIdSubtype",
            lldp_rem_serial                            "lldpXMedRemSerialNum",
            lldp_rem_sw_rev                            "lldpXMedRemSoftwareRev",
            lldp_rem_sys_cap                           "lldpRemSysCapEnabled",
            lldp_rem_sysdesc                           "lldpRemSysDesc",
            lldp_rem_sysname                           "lldpRemSysName",
            lldp_rem_vendor                            "lldpXMedRemMfgName",
            lldp_rman_addr                             "lldpRemManAddrIfSubtype",
            new_ip_index                               "ipAddressIfIndex",
            new_ip_prefix                              "ipAddressPrefix",
            new_ip_type                                "ipAddressType",
            n2p_lastupdate                             "ipNetToPhysicalLastUpdated",
            n2p_paddr                                  "ipNetToPhysicalPhysAddress",
            n2p_pstate                                 "ipNetToPhysicalState",
            n2p_pstatus                                "ipNetToPhysicalRowStatus",
            n2p_ptype                                  "ipNetToPhysicalType",
            old_at_index                               "atIfIndex",
            old_at_netaddr                             "atNetAddress",
            old_at_paddr                               "atPhysAddress",
            old_ip_index                               "ipAdEntIfIndex",
            old_ip_netmask                             "ipAdEntNetMask",
            old_ip_table                               "ipAdEntAddr",
            ospf_if_admin                              "ospfIfAdminStat",
            ospf_if_area                               "ospfIfAreaId",
            ospf_if_dead                               "ospfIfRtrDeadInterval",
            ospf_if_hello                              "ospfIfHelloInterval",
            ospf_if_ip                                 "ospfIfIpAddress",
            ospf_if_state                              "ospfIfState",
            ospf_if_type                               "ospfIfType",
            ospf_ip                                    "ospfHostIpAddress",
            ospf_peer_id                               "ospfNbrRtrId",
            ospf_peer_state                            "ospfNbrState",
            ospf_peers                                 "ospfNbrIpAddr",
            peth_port_admin                            "pethPsePortAdminEnable",
            peth_port_class                            "pethPsePortPowerClassifications",
            peth_port_status                           "pethPsePortDetectionStatus",
            peth_power_consumption                     "pethMainPseConsumptionPower",
            peth_power_status                          "pethMainPseOperStatus",
            peth_power_threshold                       "pethMainPseUsageThreshold",
            peth_power_watts                           "pethMainPsePower",
            qb_cv_egress                               "dot1qVlanCurrentEgressPorts",
            qb_cv_stat                                 "dot1qVlanStatus",
            qb_cv_untagged                             "dot1qVlanCurrentUntaggedPorts",
            qb_fw_port                                 "dot1qTpFdbPort",
            qb_fw_status                               "dot1qTpFdbStatus",
            qb_i_vlan                                  "dot1qPvid",
            qb_i_vlan_in_flt                           "dot1qPortIngressFiltering",
            qb_i_vlan_type                             "dot1qPortAcceptableFrameTypes",
            qb_v_egress                                "dot1qVlanStaticEgressPorts",
            qb_v_fbdn_egress                           "dot1qVlanForbiddenEgressPorts",
            qb_v_name                                  "dot1qVlanStaticName",
            qb_v_stat                                  "dot1qVlanStaticRowStatus",
            qb_v_untagged                              "dot1qVlanStaticUntaggedPorts",
            stp_i_mac                                  "dot1dBaseBridgeAddress",
            stp_i_ntop                                 "dot1dStpTopChanges",
            stp_i_priority                             "dot1dStpPriority",
            stp_i_root                                 "dot1dStpDesignatedRoot",
            stp_i_root_port                            "dot1dStpRootPort",
            stp_i_time                                 "dot1dStpTimeSinceTopologyChange",
            stp_p_bridge                               "dot1dStpPortDesignatedBridge",
            stp_p_cost                                 "dot1dStpPortPathCost",
            stp_p_id                                   "dot1dStpPort",
            stp_p_port                                 "dot1dStpPortDesignatedPort",
            stp_p_priority                             "dot1dStpPortPriority",
            stp_p_root                                 "dot1dStpPortDesignatedRoot",
            stp_p_state                                "dot1dStpPortState",
            v_name                                     "dot1qVlanStaticName"
        },
        globals             {
            bgp_id               "bgpIdentifier.0",
            bgp_local_as         "bgpLocalAs.0",
            b_mac                "dot1dBaseBridgeAddress",
            b_ports              "dot1dBaseNumPorts",
            b_type               "dot1dBaseType",
            contact              "sysContact",
            description          "sysDescr",
            fan_type             "mtxrHlActiveFan",
            firmware             "mtxrSystem.4.0",
            hrSystemUptime       "hrSystemUptime",
            id                   "sysObjectID",
            ipforwarding         "ipForwarding",
            layers               "sysServices",
            lldp_sys_cap         "lldpLocSysCapEnabled",
            lldp_sysdesc         "lldpLocSysDesc",
            lldp_sysname         "lldpLocSysName",
            location             "sysLocation",
            mac                  "ifPhysAddress.1",
            name                 "sysName",
            os_level             "mtxrLicLevel",
            os_ver               "mtxrLicVersion",
            ports                "ifNumber",
            qb_next_vlan_index   "dot1qNextFreeLocalVlanIndex",
            qb_vlans             "dot1qNumVlans",
            qb_vlans_max         "dot1qMaxSupportedVlans",
            router_ip            "ospfRouterId.0",
            serial1              "mtxrSystem.3.0",
            stp_priority         "dot1dStpPriority",
            stp_root             "dot1dStpDesignatedRoot",
            stp_root_port        "dot1dStpRootPort",
            stp_time             "dot1dStpTimeSinceTopologyChange",
            stp_ver              "dot1dStpProtocolSpecification",
            uptime               "sysUpTime"
        },
        IgnoreNetSNMPConf   1,
        init                \ 1,
        mibdirs             var{args}{MibDirs},
        mibs                {
            ADSL-LINE-MIB        "adslLineType",
            BGP4-MIB             "bgpIdentifier",
            BRIDGE-MIB           "dot1dBaseBridgeAddress",
            CISCO-IETF-IP-MIB    "cInetNetToMediaNetAddress",
            DOCS-IF-MIB          "docsIfMib",
            DOCS-IF3-MIB         "docsIf3Mib",
            ENTITY-MIB           "entPhysicalSerialNum",
            EtherLike-MIB        "etherMIB",
            HOST-RESOURCES-MIB   "hrSystem",
            IF-MIB               "ifIndex",
            IP-MIB               "ipNetToMediaIfIndex",
            IPV6-MIB             "ipv6IfTableLastChange",
            ISIS-MIB             "isisSysID",
            LLDP-EXT-DOT1-MIB    "lldpXdot1MIB",
            LLDP-EXT-DOT3-MIB    "lldpXdot3MIB",
            LLDP-EXT-MED-MIB     "lldpXMedMIB",
            LLDP-MIB             "lldpLocSysCapEnabled",
            MIKROTIK-MIB         "mtxrLicVersion",
            OSPF-MIB             "ospfRouterId",
            POWER-ETHERNET-MIB   "pethPsePortDetectionStatus",
            Q-BRIDGE-MIB         "dot1qPvid",
            RSTP-MIB             "dot1dStpPortOperEdgePort",
            SNMPv2-MIB           "sysObjectID"
        },
        munge               {
            at_paddr                 sub { ... },
            b_mac                    var{munge}{at_paddr},
            bs_mac                   var{munge}{at_paddr},
            c_inet_phys_addr         sub { ... },
            el_duplex                sub { ... },
            e_type                   sub { ... },
            fw_mac                   var{munge}{at_paddr},
            i_mac                    var{munge}{at_paddr},
            i_octet_in64             sub { ... },
            i_octet_out64            var{munge}{i_octet_in64},
            i_pkts_bcast_in64        var{munge}{i_octet_in64},
            i_pkts_bcast_out64       var{munge}{i_octet_in64},
            i_pkts_multi_out64       var{munge}{i_octet_in64},
            i_pkts_mutli_in64        var{munge}{i_octet_in64},
            i_pkts_ucast_in64        var{munge}{i_octet_in64},
            i_pkts_ucast_out64       var{munge}{i_octet_in64},
            ip_n2p_phys_addr         var{munge}{at_paddr},
            i_speed                  sub { ... },
            i_speed_high             sub { ... },
            i_up                     sub { ... },
            ip                       sub { ... },
            i6_n2p_phys_addr         var{munge}{at_paddr},
            layers                   sub { ... },
            lldp_lport_desc          sub { ... },
            lldp_lport_id            var{munge}{lldp_lport_desc},
            lldp_rem_asset           var{munge}{lldp_lport_desc},
            lldp_rem_cap_spt         sub { ... },
            lldp_rem_fw_rev          var{munge}{lldp_lport_desc},
            lldp_rem_hw_rev          var{munge}{lldp_lport_desc},
            lldp_rem_media_cap       var{munge}{lldp_rem_cap_spt},
            lldp_rem_media_cap_spt   var{munge}{lldp_rem_cap_spt},
            lldp_rem_model           var{munge}{lldp_lport_desc},
            lldp_rem_port_desc       var{munge}{lldp_lport_desc},
            lldp_rem_serial          var{munge}{lldp_lport_desc},
            lldp_rem_sw_rev          var{munge}{lldp_lport_desc},
            lldp_rem_sys_cap         var{munge}{lldp_rem_cap_spt},
            lldp_rem_sysdesc         var{munge}{lldp_lport_desc},
            lldp_rem_sysname         var{munge}{lldp_lport_desc},
            lldp_rem_vendor          var{munge}{lldp_lport_desc},
            lldp_sys_cap             var{munge}{lldp_rem_cap_spt},
            lldp_sysdesc             var{munge}{lldp_lport_desc},
            lldp_sysname             var{munge}{lldp_lport_desc},
            mac                      var{munge}{at_paddr},
            n2p_paddr                var{munge}{at_paddr},
            old_at_paddr             var{munge}{at_paddr},
            qb_cv_egress             sub { ... },
            qb_cv_untagged           var{munge}{qb_cv_egress},
            qb_v_egress              var{munge}{qb_cv_egress},
            qb_v_fbdn_egress         var{munge}{qb_cv_egress},
            qb_v_untagged            var{munge}{qb_cv_egress},
            stp_i_mac                var{munge}{at_paddr},
            stp_i_root               sub { ... },
            stp_p_bridge             var{munge}{stp_i_root},
            stp_p_port               sub { ... },
            stp_p_root               var{munge}{stp_i_root},
            stp_root                 var{munge}{stp_i_root}
        },
        nosuch              1,
        sess                var{args}{Session},
        snmp_comm           "public",
        snmp_user           "initial",
        snmp_ver            2,
        store               {}
    }
}
[22344] 2022-02-01 11:05:05  info show: finished at Tue Feb  1 13:05:05 2022
[22344] 2022-02-01 11:05:05  info show: status done: Showed specify response from 10.0.0.10
ollyg commented 2 years ago

Hi @d1mk0u

Are you able and willing to share an SNMP dump of the device with me so I can work out what's happening? Using this doc: https://github.com/netdisco/netdisco/wiki/Snapshot#share-a-snapshot and this service: https://upload.disroot.org/

d1mk0u commented 2 years ago

Hi @ollyg

Here is snapshot from Mikrotik Switch with latest ROS - CRS326-24G-2S+ https://upload.disroot.org/r/L6BCMUGc#x2ukm/xSk+E0nrREv5/4x0zSOU6fRmP0xuCb1JhOVbo=

I configured 4 vlans on this device.

ports 1-8 access - vlan 10 ports 9-16 access - vlan 20 ports 17-23 access - vlan 30 port 24 trunk 5, 10, 20, 30

Device configured as proposed on help page: https://help.mikrotik.com/docs/display/ROS/Basic+VLAN+switching#BasicVLANswitching-CRS3xxseriesswitchesandRTL8367,88E6393X,88E6191XandMT7621switchchips

lameslime commented 1 year ago

First of, this is a super cool piece of software. Although similar is happening to CSS326-24G-2S+ - it gets identified as enterprises.14988.2 and seemingly no neighbors are found along with the problem that op has (No routerOS, but switchOS). 1,2 are trunks and 5,17,23,24 are vlan100

Here is a link for a snapshot: https://drive.google.com/file/d/1YKDVKtSaGTYqpHl12RNMlAqIQmQ__0pd/view?usp=sharing Running latest image from docker.

acrow-geo commented 1 year ago

Mikrotik does not present SNMP info in the standard LLDP MIBs. It has its own MIB for neighbours that is not supported by NetDisco. TheDude doesn't auto-assign links either, a huge pain when you're trying to plot out a network easily.