Send netdisco-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:

   1. Re: Prevent display of up='notPresent' ports in CiscoSB
      device port listings (Nic Bernstein)
   2. Re: how does ignore_interfaces work (Nick Nauwelaerts)
--- Begin Message ---
Hi all,
Following Oliver's lead, I have just submitted PR #463 which ignores 'notPresent' interfaces of type ethernetCsmacd during discovery. This allows virtual interfaces, like Port-channel or Tunnel to persist.  It works on my many multi-chassis stacks just as expected.

Nick,
This change would obviate the need to use notPresent as a display filter.

Cheers,
    -nic


On 12/6/18 3:33 PM, Oliver Gorwits wrote:
Hi,

On Thu, 6 Dec 2018 at 20:35, Nic Bernstein <[email protected] <mailto:[email protected]>> wrote:

    BTW: I totally agree with your comment about not
    adding/discovering these phantom ports, but even though I wrote
    the darn SNMP/Info/Layer2/CiscoSB.pm module, I haven't the
    foggiest idea how to tell it not to collect such monsters.


I think a good place to skip these, if you really never want to hear about them,would be here:

https://github.com/netdisco/netdisco/blob/master/lib/App/Netdisco/Worker/Plugin/Discover/Properties.pm#L164

This code is part of Discover, and has access to the port "up" status and can check for notPresent in $i_up->{$entry}. I might have time for a patch, but not right now, so patches welcome :-). Take care to check that $i_up->{$entry}is defined before doing string equality, of course.
HTH,
regards,
oliver.

--
Nic Bernstein                             [email protected]
Onlight, Inc.                             www.onlight.com
6525 W Bluemound Road, Suite 24           v. 414.272.4477
Milwaukee, Wisconsin  53213-4073

<<attachment: nic.vcf>>


--- End Message ---
--- Begin Message ---
ok, so 2 minutes later i see i'm testing with the wrong config.

netdisco-do discover -D shows the interfaces being removed:
[10261] 2018-12-06 22:56:50 debug -> run worker early/properties/100
[10261] 2018-12-06 22:56:51 debug  [10.91.7.1] interfaces - ignoring 24 
(BRI0:1-Bearer Channel) (config:ignore_interfaces)
[10261] 2018-12-06 22:56:51 debug  [10.91.7.1] interfaces - ignoring 22 
(BRI0-Physical) (config:ignore_interfaces)
[10261] 2018-12-06 22:56:51 debug  [10.91.7.1] interfaces - ignoring 23 
(BRI0-Signaling) (config:ignore_interfaces)
[10261] 2018-12-06 22:56:51 debug  [10.91.7.1] interfaces - ignoring 25 
(BRI0:2-Bearer Channel) (config:ignore_interfaces)
[10261] 2018-12-06 22:56:52 debug  [10.91.7.1] interfaces - removed 21 
interfaces
[10261] 2018-12-06 22:56:52 debug  [10.91.7.1] interfaces - added 21 new 
interfaces

so that only leaves me with question 4: how do i get a list of removed 
interfaces?


thx

// nick

From: Nick Nauwelaerts [mailto:[email protected]]
Sent: Thursday, December 6, 2018 23:53
To: [email protected]
Subject: [Netdisco] how does ignore_interfaces work

heya,

a few questions about how the ignore_interfaces setting is supposed to work, 
since i'm getting back more interfaces as expected.



1) are interfaces listed here supposed to be not discovered and thus not added 
to the inventory, or are they discovered, added to the inventory but further 
ignored?

2) is it supposed to work on all devices or only on select snmp::info classes?

3) what's the difference between i_ignore & if_ignore? netdisco seems to use 
i_ignore only, but snmp::info only has i_ignore for a few modules, snmp::info 
seems to use if_ignore for that purpose:
https://metacpan.org/pod/SNMP::Info#$info-%3Eif_ignore()

4) how do i actually get a list of ignored interfaces? i checked on several 
devices but they all turn up empty lists. one of the devices i tested on is a 
oneaccess router, which has i_ignore overrides in it's snmp::info module, but 
even there i'm not getting anything back from i_ignore, if_ignore or the module 
specific version:

netdisco-do show -I -d 10.91.8.1 -e i_ignore
[9966] 2018-12-06 22:43:27  info App::Netdisco version 2.039033 loaded.
[9966] 2018-12-06 22:43:27  info show: [10.91.8.1]/i_ignore started at Thu Dec  
6 23:43:27 2018
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.63
SNMP::Info::device_type() layers:01001111 id:13191 
sysDescr:"ONEOS16-ADVIP_11N-V5.2R1C12"
SNMP::Info::_load_attr i_index : IF-MIB::ifIndex : .1.3.6.1.2.1.2.2.1.1
SNMP::Info::_load_attr i_description : IF-MIB::ifDescr : .1.3.6.1.2.1.2.2.1.2
\ {}
[9966] 2018-12-06 22:43:28  info show: finished at Thu Dec  6 23:43:28 2018
[9966] 2018-12-06 22:43:28  info show: status done: Showed i_ignore response 
from 10.91.8.1


netdisco-do show -I -d 10.91.8.1 -e if_ignore
[9976] 2018-12-06 22:43:45  info App::Netdisco version 2.039033 loaded.
[9976] 2018-12-06 22:43:45  info show: [10.91.8.1]/if_ignore started at Thu Dec 
 6 23:43:45 2018
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.63
SNMP::Info::device_type() layers:01001111 id:13191 
sysDescr:"ONEOS16-ADVIP_11N-V5.2R1C12"
\ {}
[9976] 2018-12-06 22:43:46  info show: finished at Thu Dec  6 23:43:46 2018
[9976] 2018-12-06 22:43:46  info show: status done: Showed if_ignore response 
from 10.91.8.1


netdisco-do show -I -d 10.91.8.1 -e Layer3::OneAccess::i_ignore
[9981] 2018-12-06 22:44:02  info App::Netdisco version 2.039033 loaded.
[9981] 2018-12-06 22:44:02  info show: [10.91.8.1]/Layer3::OneAccess::i_ignore 
started at Thu Dec  6 23:44:02 2018
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::_load_attr i_index : IF-MIB::ifIndex : .1.3.6.1.2.1.2.2.1.1
SNMP::Info::_load_attr i_description : IF-MIB::ifDescr : .1.3.6.1.2.1.2.2.1.2
\ {}
[9981] 2018-12-06 22:44:02  info show: finished at Thu Dec  6 23:44:02 2018
[9981] 2018-12-06 22:44:02  info show: status done: Showed i_ignore response 
from 10.91.8.1


netdisco-do show -I -d 10.91.8.1 -e Layer3::OneAccess::if_ignore
[9985] 2018-12-06 22:44:16  info App::Netdisco version 2.039033 loaded.
[9985] 2018-12-06 22:44:16  info show: [10.91.8.1]/Layer3::OneAccess::if_ignore 
started at Thu Dec  6 23:44:16 2018
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
\ {}
[9985] 2018-12-06 22:44:16  info show: finished at Thu Dec  6 23:44:16 2018
[9985] 2018-12-06 22:44:16  info show: status done: Showed if_ignore response 
from 10.91.8.1




i did add a few extra ones in my configuration, but it seems they parsed 
correctly?

netdisco-do dumpconfig -e ignore_interfaces
[10185] 2018-12-06 22:49:39  info App::Netdisco version 2.039033 loaded.
[10185] 2018-12-06 22:49:39  info dumpconfig:  started at Thu Dec  6 23:49:39 
2018
\ [
    [0]  "EOBC",
    [1]  "unrouted VLAN(?: \d+)?",
    [2]  "StackPort",
    [3]  "Control Plane Interface",
    [4]  "SPAN (S|R)P Interface",
    [5]  "StackSub-.*",
    [6]  "StackPort\d+",
    [7]  "netflow",
    [8]  "Vlan\d+-mpls layer",
    [9]  "BRI\S+-Bearer Channel",
    [10] "BRI\S+-Physical",
    [11] "BRI\S+-Signalling",
    [12] "BRI\S+-Signaling",
    [13] "Embedded-Service-Engine\d+\/\d+",
    [14] "Virtual-Template\d+",
    [15] "Virtual-Access\d+",
    [16] "(E|T)\d \d\/\d\/\d",
    [17] "InLoopback0",
    [18] "NULL\d",
    [19] "Register-Tunnel\d",
    [20] "Blade-Aggregation\d",
    [21] "M-GigabitEthernet\d\/\d\/\d",
    [22] "ii\d\/\d\/\d+",
    [23] "tunnel1",
    [24] "VoIP-Null0"
]





another example is a cisco router with a bri interface. ignore interfaces has 
"BRI\S+-Signaling", but it still shows up (did a new discover just to be sure):

(output trimmed a bit)

netdisco-do show  -d 10.91.7.1 -e if_ignore
[10196] 2018-12-06 22:50:32  info App::Netdisco version 2.039033 loaded.
[10196] 2018-12-06 22:50:32  info show: [10.91.7.1]/if_ignore started at Thu 
Dec  6 23:50:32 2018
\ {}

netdisco-do show  -d 10.91.7.1 -e i_ignore
[10208] 2018-12-06 22:51:09  info App::Netdisco version 2.039033 loaded.
[10208] 2018-12-06 22:51:09  info show: [10.91.7.1]/i_ignore started at Thu Dec 
 6 23:51:09 2018
undef

netdisco-do show  -d 10.91.7.1 -e interfaces
[10221] 2018-12-06 22:51:26  info App::Netdisco version 2.039033 loaded.
[10221] 2018-12-06 22:51:27  info show: [10.91.7.1]/interfaces started at Thu 
Dec  6 23:51:27 2018
\ {
    1    "ATM0",
    2    "BRI0",
    3    "BRI0:1",
    4    "BRI0:2",
    5    "FastEthernet0",
    6    "FastEthernet1",
    7    "FastEthernet2",
    8    "FastEthernet3",
    9    "Null0",
    10   "ATM0-atm layer",
    11   "ATM0.0-atm subif",
    12   "ATM0-aal5 layer",
    13   "ATM0.0-aal5 layer",
    14   "ATM0-adsl",
    15   "Vlan1",
    16   "Loopback0",
    17   "Loopback99",
    18   "ATM0.32-atm subif",
    19   "ATM0.32-aal5 layer",
    20   "ATM0.61-atm subif",
    21   "ATM0.61-aal5 layer",
    22   "BRI0-Physical",
    23   "BRI0-Signaling",
    24   "BRI0:1-Bearer Channel",
    25   "BRI0:2-Bearer Channel"
}




thx for your time.

// nick

________________________________

Volg Aquafin op Facebook<https://www.facebook.com/AquafinNV> | 
Twitter<https://twitter.com/aquafinnv> | 
YouTube<http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> | 
LinkedIN<http://www.linkedin.com/company/aquafin/products>

In het kader van de uitoefening van onze taken verzamelen we bij Aquafin 
persoonsgegevens. Hoe we omgaan met deze gegevens en wat de rechten van de 
betrokkenen zijn, kan je nalezen in onze privacy 
policy<https://www.aquafin.be/nl-be/privacy-policy>.

  P Denk aan het milieu. Druk deze mail niet onnodig af.

--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to