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: Special Report needed aka "IP-Inventory with extra
columns" (Jeroen van Ingen)
2. Re: Special Report needed aka "IP-Inventory with extra
columns" (Jeroen van Ingen)
3. Re: Netdisco Help (Jeroen van Ingen)
4. TPLink MIBs for Netdisco (Karel V?chodsk?)
5. Re: TPLink MIBs for Netdisco (Jeroen van Ingen)
6. Re: Change of snmp credentials (Jeroen van Ingen)
--- Begin Message ---
Hi Sebastian,
That's indeed a pretty difficult query to write...
The "IP Inventory" basically shows when each IP address within a given
range was last used, and by what MAC address. Due to the way the
Netdisco DB is designed, it's virtually impossible to reliably map that
to what port the given MAC address was on, at that time. Also, the
listed MAC may have used a different IP address after the time that it
was using the IP listed in the IP Inventory.
Given your earlier description what you'd like to use the query for,
maybe another approach for the SQL would be better:
1) For each unique MAC in netdisco.nodes, determine last switch port it
was seen on.
2) For each unique MAC in netdisco.node_ip, determine last IP address
associated with it that's also marked as "active" (indicating that the
IP wasn't used by another MAC at a later time).
3) Filter down result of step 2, based on subnet.
4) Join result of step 3 on result of step 1.
That should give a pretty good inventory of all active hosts in the
given subnet, including the port they are on. It doesn't account for
certain special cases, eg hosts that have multiple IP addresses.
Regards,
Jeroen van Ingen
ICT Service Centre
University of Twente, P.O.Box 217, 7500 AE Enschede, The Netherlands
On 08/09/2016 01:16 PM, Sebastian Rösch wrote:
Well, I tried to extend my query, but I was not able to filter for the
most recent entry…
With this query I get all the nodes from the network, that seems to work:
bin/netdisco-do psql -e "COPY (SELECT
node.mac,node.switch,node.port,node.time_first,node.time_last,node_ip.ip,node_ip.dns
FROM node INNER JOIN node_ip ON node.mac = node_ip.mac WHERE node_ip.ip
<<'10.0.0.0/24') TO STDOUT WITH CSV HEADER"
But if I look in the result, I see multiple entries per node for every
timestamp, that was recorded…. So I have up to 15 result, regarding on
the device, this node has appeared. I would like to get only the latest,
most current timestamp.
I additonally tried this, but there not all nodes are listed then…...
Don´t know why, maybe an error with my logic… Any ideas?
bin/netdisco-do psql -e "COPY (SELECT
node.mac,node.switch,node.port,node.time_first,node.time_last,node_ip.ip,node_ip.dns
FROM node INNER JOIN node_ip ON node.mac = node_ip.mac WHERE node_ip.ip
<<'10.0.0.0/24' and node_ip.time_last = (SELECT MAX(node_ip.time_last)
FROM node_ip)) TO STDOUT WITH CSV HEADER"
Best Regards
Sebastian
*Von:*Sebastian Rösch
*Gesendet:* Mittwoch, 13. Juli 2016 16:03
*An:* [email protected]
*Betreff:* Special Report needed aka "IP-Inventory with extra columns"
Hi all,
I´ve got a little problem….I need a report from netdisco, which is not
available so far. If the “Ip Inventory” Report would be extend for the
columns device and port, that would exactly meet my requirements very
well. But I don´t know how to do that….
As I was not able to get the query working in the webinterface I tried
to execute a query in the shell…. I was trying to combine the following
select statement with a join. So I started with executing them for their
own. But the select doesn´t work, the join statement works, but I would
like to limit the output of it to nodes from a specific subnet…. I
thought this could be done in a way like described here:
http://stackoverflow.com/questions/12970187/nested-select-statement-with-left-join
bin/netdisco-do psql -e "COPY (SELECT * FROM node_ip WHERE node_ip.ip
LIKE '%10.200.%') TO STDOUT WITH CSV HEADER"
bin/netdisco-do psql -e "COPY (SELECT * FROM node INNER JOIN node_ip ON
node.mac = node_ip.mac) TO STDOUT WITH CSV HEADER"
Any ideas how I can get this working? Of course I would prefer to get it
running as a report or the best way would be to modify the IP Inventory
tool….
Regards,
Sebastian
--- End Message ---
--- Begin Message ---
Hi Sebastian,
Based on the steps that I described, I built the following (awful,
unreadable, slow, etc) query:
===
select
mac,
ip,
switch,
port,
ip_time_last,
mac_time_last
from (
select distinct
mac,
ip,
time_last as ip_time_last
from (
select
mac,
max(time_last) as time_last
from
node_ip
where
active
and family(ip) = 4
group by
mac
) as timefiltered_node_ip
join
node_ip using ( mac, time_last )
where
active
and family(ip) = 4
) as macs_with_ips
join (
select distinct
mac,
switch,
port,
time_last as mac_time_last
from (
select
mac,
max(time_last) as time_last
from
node
where
active
group by
mac
) as timefiltered_node
join node using ( mac, time_last )
) as macs_with_ports
using (mac)
where
ip << '10.0.0.0/24'
order by 1,2
===
The result looks quite accurate on our network, but beware of any
results where the two timestamp values lie relatively far apart (in
relation to your macsuck & arpnip schedules).
Regards,
Jeroen van Ingen
ICT Service Centre
University of Twente, P.O.Box 217, 7500 AE Enschede, The Netherlands
On 08/24/2016 11:59 AM, Jeroen van Ingen wrote:
Hi Sebastian,
That's indeed a pretty difficult query to write...
The "IP Inventory" basically shows when each IP address within a given
range was last used, and by what MAC address. Due to the way the
Netdisco DB is designed, it's virtually impossible to reliably map that
to what port the given MAC address was on, at that time. Also, the
listed MAC may have used a different IP address after the time that it
was using the IP listed in the IP Inventory.
Given your earlier description what you'd like to use the query for,
maybe another approach for the SQL would be better:
1) For each unique MAC in netdisco.nodes, determine last switch port it
was seen on.
2) For each unique MAC in netdisco.node_ip, determine last IP address
associated with it that's also marked as "active" (indicating that the
IP wasn't used by another MAC at a later time).
3) Filter down result of step 2, based on subnet.
4) Join result of step 3 on result of step 1.
That should give a pretty good inventory of all active hosts in the
given subnet, including the port they are on. It doesn't account for
certain special cases, eg hosts that have multiple IP addresses.
Regards,
Jeroen van Ingen
ICT Service Centre
University of Twente, P.O.Box 217, 7500 AE Enschede, The Netherlands
On 08/09/2016 01:16 PM, Sebastian Rösch wrote:
Well, I tried to extend my query, but I was not able to filter for the
most recent entry…
With this query I get all the nodes from the network, that seems to work:
bin/netdisco-do psql -e "COPY (SELECT
node.mac,node.switch,node.port,node.time_first,node.time_last,node_ip.ip,node_ip.dns
FROM node INNER JOIN node_ip ON node.mac = node_ip.mac WHERE node_ip.ip
<<'10.0.0.0/24') TO STDOUT WITH CSV HEADER"
But if I look in the result, I see multiple entries per node for every
timestamp, that was recorded…. So I have up to 15 result, regarding on
the device, this node has appeared. I would like to get only the latest,
most current timestamp.
I additonally tried this, but there not all nodes are listed then…...
Don´t know why, maybe an error with my logic… Any ideas?
bin/netdisco-do psql -e "COPY (SELECT
node.mac,node.switch,node.port,node.time_first,node.time_last,node_ip.ip,node_ip.dns
FROM node INNER JOIN node_ip ON node.mac = node_ip.mac WHERE node_ip.ip
<<'10.0.0.0/24' and node_ip.time_last = (SELECT MAX(node_ip.time_last)
FROM node_ip)) TO STDOUT WITH CSV HEADER"
Best Regards
Sebastian
*Von:*Sebastian Rösch
*Gesendet:* Mittwoch, 13. Juli 2016 16:03
*An:* [email protected]
*Betreff:* Special Report needed aka "IP-Inventory with extra columns"
Hi all,
I´ve got a little problem….I need a report from netdisco, which is not
available so far. If the “Ip Inventory” Report would be extend for the
columns device and port, that would exactly meet my requirements very
well. But I don´t know how to do that….
As I was not able to get the query working in the webinterface I tried
to execute a query in the shell…. I was trying to combine the following
select statement with a join. So I started with executing them for their
own. But the select doesn´t work, the join statement works, but I would
like to limit the output of it to nodes from a specific subnet…. I
thought this could be done in a way like described here:
http://stackoverflow.com/questions/12970187/nested-select-statement-with-left-join
bin/netdisco-do psql -e "COPY (SELECT * FROM node_ip WHERE node_ip.ip
LIKE '%10.200.%') TO STDOUT WITH CSV HEADER"
bin/netdisco-do psql -e "COPY (SELECT * FROM node INNER JOIN node_ip ON
node.mac = node_ip.mac) TO STDOUT WITH CSV HEADER"
Any ideas how I can get this working? Of course I would prefer to get it
running as a report or the best way would be to modify the IP Inventory
tool….
Regards,
Sebastian
------------------------------------------------------------------------------
_______________________________________________
Netdisco mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users
--- End Message ---
--- Begin Message ---
Hi Tim,
I am looking for some help on NetDisco. A few things. Here I am
having issues with ipv6 subnets being pulled in by netdisco. I have a
vlan 900 with a ipv4/24 and ipv6 with a :64. The vlans are not showing
the IPV6 space.
IIRC that's not implemented yet. Netdisco currently fetches IPv6
neighbor caches from devices, but doesn't store what IPv6 prefixes are
configured on interfaces.
Also
I would like to know is there a way to stop netdisco from discovering
some subnets? For example I wont want netdisco to discover 10.8 or 10.17
space on my private network is there a way in the deployment config to
block this?
Do you mean that switches & routers with addresses in 10.8.0.0/16 and
10.17.0.0/16 should be ignored by Netdisco? If so, please look at the
"discover_no" or "discover_only" config directives.
Next I wanted to add the rancid plugin is it as simple as copying the
rancid script into the deployment config and renaming the groups on
which I want them to be?
In Rancid I have UEN UES MetroE for my different types.
Sorry, not a Rancid user myself, maybe someone else can give you a few
pointers on this subject.
Regards,
Jeroen van Ingen
ICT Service Centre
University of Twente, P.O.Box 217, 7500 AE Enschede, The Netherlands
--- End Message ---
--- Begin Message ---
Hi,
I wanted to use NetDisco on a low-cost TP-Link devices built network. As
NetDisco doesn't support tplink by default, I did some research, but all
available manuals and step-by-step guides seem outdated. I have
installed version 2.033006 with instrucions from
https://metacpan.org/pod/App::Netdisco#Dependencies . TPLink has MIBs
for its devices available from the web so I have downloaded all of them
and put them in one directory (on my system located in
/home/netdisco/netdisco-mibs/tplink). Then I follow instrucions from the
README file at the netdisco-mibs folder, which tells to run ./mkindex,
but it returns only empty mib_index.txt file and I'm unable to continue
the process.. Does anybody know the right steps to follow?? I will post
any debugging information if needed.
Thanks.
Karel Vychodsky
--- End Message ---
--- Begin Message ---
Hi Karel,
The instructions are a bit outdated. Part of them depend on what version
of net-snmp is installed on the system and where it stores its index
files. I'm one of the "more or less active" maintainers of the MIB
collection and for me the index bookkeeping is still somewhat trial&error...
If you can make the MIBs available somewhere, I'll process them next
week and add as many as possible to netdisco-mibs.
Regards,
Jeroen van Ingen
ICT Service Centre
University of Twente, P.O.Box 217, 7500 AE Enschede, The Netherlands
On 08/30/2016 03:33 PM, Karel Východský wrote:
Hi,
I wanted to use NetDisco on a low-cost TP-Link devices built network. As
NetDisco doesn't support tplink by default, I did some research, but all
available manuals and step-by-step guides seem outdated. I have
installed version 2.033006 with instrucions from
https://metacpan.org/pod/App::Netdisco#Dependencies . TPLink has MIBs
for its devices available from the web so I have downloaded all of them
and put them in one directory (on my system located in
/home/netdisco/netdisco-mibs/tplink). Then I follow instrucions from the
README file at the netdisco-mibs folder, which tells to run ./mkindex,
but it returns only empty mib_index.txt file and I'm unable to continue
the process.. Does anybody know the right steps to follow?? I will post
any debugging information if needed.
Thanks.
Karel Vychodsky
------------------------------------------------------------------------------
_______________________________________________
Netdisco mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users
--- End Message ---
--- Begin Message ---
Hi Linwood,
This looks like a minor bug. Not sure about the trigger or when it was
introduced though...
The last working read-only community is stored in devices.snmp_comm and
devices.snmp_ver hold the SNMP version used with that community.
Netdisco has done this for as long as I can remember (since 0.9x versions).
The community table was introduced a lot later; afaik mostly to cache
the SNMP read-write community so port control tasks (eg VLAN change,
port disable/enable, port description change) run faster.
I have a number of switches with an entry in the separate community
table; when the "snmp_auth_tag" column contains the value "v2default",
read-only access to the switch is always tried with "public" community
first, no matter the value for "snmp_comm" in the devices table.
At least the entries in the community table should be deleted when a
device is deleted, so they don't linger. Looks like a device delete will
clear the associated snmp_comm_rw, but not remove the entry.
Regards,
Jeroen van Ingen
ICT Service Centre
University of Twente, P.O.Box 217, 7500 AE Enschede, The Netherlands
On 07/26/2016 09:16 PM, [email protected] wrote:
I finally tracked down what was causing some strange results, and not
sure if there is a better way to solve this. And/or if it might merit
consideration in the product.
Some systems (net-snmp for example) come by default with a limited view
of snmp under "public".
Some systems are stuck on "public" because you may not be able to get a
client to change them, or their admins forgot how.
This led me to a problem. I had a couple of linux systems which had not
been changed to our normal snmp community string. When Netdisco saw
them it tried that and failed, then tried public and worked. A bit. No
ports for example.
So I noticed, and fixed the servers to the right snmp community string.
And waited… no change. So discovered them again - no change. Hmmm…
Maybe (thinks I) it remembers, so I deleted the host and rediscovered.
No change.
I finally found there is a "community" table that stashes an IP and the
community tags that last worked. It does not appear to go away even if
you delete that host (well, to be fair it's indexed by IP and only
indirectly then tied to the host). When I truncated that, it obviously
had to start over.
Is there a "proper" way to make it start over?
Yes, I know I can limit "public" to specific devices, but actually I
like that it tries that on any new items, as often it provides useful
information to identify and fix them.
Should deleting a host perhaps clear out any IP's in the community table
that have been associated with that device?
Was there a better approach?
Linwood
--- End Message ---
------------------------------------------------------------------------------
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users