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)
--- Begin Message ---Nick,Thanks for the quick reply. I was looking at exactly that code section as I wrote up my email, but I am so totally unfamiliar with the Netdisco2 architecture I was quite certain I would screw it up. :-)Here's a sample from the device_port table: netdisco=> select * from device_port where ip='10.61.1.23' and up = 'notPresent' limit 20; ip | port | creation | descr | up | up_admin | type | duplex | duplex_admin | speed | name | mac | mtu | stp | remote_ip | remote_port | remote_type | remote_id | vlan | pvid | lastchange | manual_topo | is_uplink | slave_of | is_master ------------+----------+----------------------------+-------+------------+----------+----------------+--------+--------------+----------+----------+-------------------+------+----------+-----------+-------------+-------------+-----------+------+------+------------+-------------+-----------+----------+----------- 10.61.1.23 | tunnel4 | 2018-12-04 07:05:52.840137 | | notPresent | up | tunnel | | | 0 | tunnel4 | 00:e1:6d:90:2c:b7 | 9000 | | | | | | | | 0 | f | | | f 10.61.1.23 | gi2/1/52 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | gi2/1/52 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | gi6/1/27 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | gi6/1/27 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | gi7/1/52 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | gi7/1/52 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa5/2/21 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa5/2/21 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa6/2/15 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa6/2/15 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa1/2/26 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa1/2/26 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa2/2/7 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa2/2/7 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | te2/1/3 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | te2/1/3 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa4/2/24 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa4/2/24 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa7/2/23 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa7/2/23 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa1/2/18 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa1/2/18 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa6/2/18 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa6/2/18 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa5/2/3 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa5/2/3 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa6/2/33 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa6/2/33 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa6/2/23 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa6/2/23 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | gi8/1/10 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | gi8/1/10 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa5/2/38 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa5/2/38 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | fa2/2/3 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | fa2/2/3 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f 10.61.1.23 | gi5/2/3 | 2018-12-04 07:05:52.840137 | | notPresent | up | ethernetCsmacd | | | 100 Mbps | gi5/2/3 | 00:e1:6d:90:2c:b7 | 9000 | disabled | | | | | 1 | 1 | 0 | f | | | f (20 rows)I'll bring to your attention that there some FastEthernet ports in there, but there are not actually any in the stack. But, there /could/ be, and that seems to be enough for these folk. :-/ The full answer to that query reports384 of these phantom FastEthernet ports:netdisco=> select count(*) from device_port where ip='10.61.1.23' and port ilike 'fa%' and up = 'notPresent'; count ------- 384 (1 row)As for your patch, it applies, but doesn't work as expected. I still get all the ports which are marked as "Up / NotPresent" in the Status column. I did try this change, too, but that doesn't seem to make a difference, either:push @combi, {'me.up' => 'up'} if exists $port_state{up}; push @combi, {'me.up' => 'notPresent'} if exists $port_state{notPresent}; push @combi, {'me.up_admin' => 'up',*'me.up' => 'down'*} if exists $port_state{down}; push @combi, {'me.up_admin' => { '!=' => 'up'}} if exists $port_state{shut}; Any further thoughts?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.Cheers, -nic On 12/6/18 2:13 PM, Nick Nauwelaerts wrote:any example of what those ports might be?my ciscosb's do that for portchannels but nothing else, these are non stacking models however. just to defend the fact that they show up in snmp: they are also defined in the config and as far as i know they can't even be removed using the cli.plus sides of the cisco sb range: * managed * kinda cheap downsides: many, but biggest gripes: * cli is non default, slow * ssh is something non standard (ssh user@switch doesn't pass username) * snmp is broken beyond all telling* default config does interesting things, smartport, trying to bundle links when possible, ....and my favorite:sometimes devices power when they are a poe client. plug in cables with a poe provider at the other end before you plug in powercord & the smaller switches will boot but not be able to provide poe themselves.at least rancid works ok with it, but sometimes gets confused by prompts the switch displays now & then.</rant> anyway, now that you mention it i'm actually annoyed by that too :) to not show them i changed:--- ./tmp/nd/netdisco-2.039033/lib/App/Netdisco/Web/Plugin/Device/Ports.pm 2018-10-19 22:35:50.000000000 +0200+++ ./perl5/lib/perl5/App/Netdisco/Web/Plugin/Device/Ports.pm 2018-12-06 20:39:24.155271895 +0100@@ -108,6 +108,8 @@ push @combi, {'me.up' => 'up'} if exists $port_state{up}; + push @combi, {'me.up' => 'notPresent'} + if exists $port_state{notPresent}; push @combi, {'me.up_admin' => 'up', 'me.up' => { '!=' => 'up'}} if exists $port_state{down}; push @combi, {'me.up_admin' => { '!=' => 'up'}} and--- ./tmp/nd/netdisco-2.039033/share/views/sidebar/device/ports.tt 2018-10-19 22:35:50.000000000 +0200+++ ./perl5/lib/perl5/auto/share/dist/App-Netdisco/views/sidebar/device/ports.tt 2018-12-06 20:40:29.233830819 +0100@@ -125,11 +125,12 @@ <li> <em class="muted">Show Ports with Status:</em><br/> <div class="clearfix">- <select id="nd_port-state-select" size="4" multiple="on" name="port_state"/>+ <select id="nd_port-state-select" size="5" multiple="on" name="port_state"/><option selected="selected" value="up">Link Up</option><option selected="selected" value="free">Port Free</option><option selected="selected" value="down">Link Down</option><option selected="selected" value="shut">Admin Disabled</option>+ <option selected="selected" value="notPresent">Not Present</option></select> </div> </li>this is a diff against nd 2.039033, not your 2.039031 but it might apply. restart netdisco-web & clear your browser cache. in the ports tab of your device overview, you should now have a "not present" option in the port properties filter.i'll make a patch & pull request either today or tomorrow.a way to not add/discover nonpresent ports would also be cool, since imo these are just taking up space.// nick *From:*Nic Bernstein [mailto:[email protected]] *Sent:* Thursday, December 6, 2018 18:45 *To:* [email protected]*Subject:* [Netdisco] Prevent display of up='notPresent' ports in CiscoSB device port listingsFriends,A client has a network with numerous Cisco Small Business (CiscoSB) devices, mostly SG300 & SG500s, in various sized stacks. With our current Netdisco setup:*Software* *Version* *App::Netdisco <http://netdisco.org>* *2.39.31* *SNMP::Info <https://github.com/netdisco/snmp-info>* *3.61* *DB Schema <https://metacpan.org/module/netdisco-db-deploy>* *53* *PostgreSQL <http://www.postgresql.org>* *9.5.14* *Perl <http://www.perl.org>* *5.26.2*a typical stack will include all possible interfaces the stack could contain, not just those which are actually present. So, for example, a stack with four chassis -- 1 SG500X-48MP-K9 and 3 SG500-52MP-K9 -- shows 925 ports, of which only 213 are actually present (including VLANs, etc.).Those ports which are not actually present conveniently have the value 'notPresent' in the 'device_port.up' column (visible as Status "Up/NotPresent" in the Ports screens). What's the easiest way to filter port listings to exclude any ports which are 'notPresent'?I understand that the real problem here is the decision by Cisco (nee Linksys) to structure their MIB such that an OID is enumerated for each possible port, based upon the membership compliment of a stack, but it ends up rendering unmanageable screens within Netdisco.Thanks in advance for any guidance, -nic -- Nic [email protected] <mailto:[email protected]> Onlight, Inc.www.onlight.com <http://www.onlight.com> 6525 W Bluemound Road, Suite 24 v. 414.272.4477 Milwaukee, Wisconsin 53213-4073 ------------------------------------------------------------------------/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.-- 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 ---
_______________________________________________ Netdisco mailing list - Digest Mode [email protected] https://lists.sourceforge.net/lists/listinfo/netdisco-users
