Send netdisco-users mailing list submissions to
netdisco-users@lists.sourceforge.net
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
netdisco-users-requ...@lists.sourceforge.net
You can reach the person managing the list at
netdisco-users-ow...@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:
1. Re: Netdisco and Aruba Controllers (Muris)
--- Begin Message ---
Thanks Christian, im not really a coder, would it be possible if you composed
the different versions of the file then I can try see what works ?
It would be a win if we can get controllers reporting arpdata into netdisco if
this works.
On 11/8/2022, 20:10, "Christian Ramseyer" <ramse...@netnea.com> wrote:
Ok it looks like we're not getting much yet here.
Generally, there are two variant of SSH collector modules: one is using
ssh->capture, and the other one is using expect.
Currently we're on the capture method. This means that one simple
command is sent to the device. You can manually test this by doing:
ssh -l <username> <device> "show arp"
After the password prompt, this should output the full arp table.
If you need to pass in additional paging commands, you might be able to
shoehorn them in like so:
ssh -l <username> <device> "no paging ; show arp"
or maybe you can get lucky with one or more linebreaks, e.g. "no
paging\nshow arp\n\n".
This method mostly works on devices that run regular Linux, or something
very close to it.
If it doesn't work, you can try the expect method. Here, we don't send a
command in the SSH connection, but log in like a regular user and then
try to simulate all required keypresses. An example to look at is IOSXR:
<https://github.com/netdisco/netdisco/blob/master/lib/App/Netdisco/SSHCollector/Platform/IOSXR.pm>
You can rename this to Aruba.pm and see if you get there. It's important
to match the prompt correctly so we know when a command finished and we
can input stuff again. For your case it's probably
my $prompt = qr/#$/;
or even just $prompt = qr/#/;
Then replace the send() bits with your commands.
Finally you should get lines with arp entries with either method, then
the correct extraction loop for your example should be this:
foreach (@data) {
my ($proto, $ip, $mac, $if) = split(/\s+/);
if ($ip =~ m/(\d{1,3}\.){3}\d{1,3}/
&& $mac =~ m/([0-9a-f]{2}\:){5}[0-9a-f]{2}/i {
push(@arpentries, { ip => $ip, mac => $mac });
}
}
Good luck :)
Christian
On 11.08.22 08:37, Muris wrote:
> I tested the new Aruba.pm file and here is the output
>
> ./netdisco-do arpnip -d 10.x.x.x -D
> [850] 2022-08-11 06:15:14 info App::Netdisco version 2.052006 loaded.
> [850] 2022-08-11 06:15:14 info arpnip: [10.x.x.x] started at Thu Aug 11
15:45:14 2022
> [850] 2022-08-11 06:15:15 debug arpnip: running with timeout 600s
> [850] 2022-08-11 06:15:15 debug => running workers for phase: check
> [850] 2022-08-11 06:15:15 debug -> run worker check/_base_/0
> [850] 2022-08-11 06:15:15 debug arpnip is able to run
> [850] 2022-08-11 06:15:15 debug => running workers for phase: main
> [850] 2022-08-11 06:15:15 debug -> run worker main/nodes/200
> [850] 2022-08-11 06:15:15 debug cli session cache warm: [10.x.x.x]
> [850] 2022-08-11 06:15:15 debug 10.x.x.x 850 arpnip()
> [850] 2022-08-11 06:15:15 debug resolving 0 ARP entries with max 50
outstanding requests
> [850] 2022-08-11 06:15:15 debug -> run worker main/nodes/100
> [850] 2022-08-11 06:15:15 debug skip: namespace passed at higher priority
> [850] 2022-08-11 06:15:15 debug -> run worker main/subnets/100
> [850] 2022-08-11 06:15:15 debug snmp reader cache warm: [10.x.x.x]
> [850] 2022-08-11 06:15:15 debug [10.x.x.x:161] try_connect with ver: 2,
class: SNMP::Info::Layer3::Aruba, comm: <hidden>
> [850] 2022-08-11 06:15:16 debug [10.x.x.x] arpnip - found subnet
10.17.x.x/24
> [850] 2022-08-11 06:15:16 debug [10.x.x.x] arpnip - found subnet
172.x.x.x/30
> [850] 2022-08-11 06:15:16 debug [10.x.x.x] arpnip - processed 2 Subnet
entries
> [850] 2022-08-11 06:15:16 debug => running workers for phase: store
> [850] 2022-08-11 06:15:16 debug -> run worker store/nodes/0
> [850] 2022-08-11 06:15:16 debug [10.x.x.x] arpnip - processed 0 ARP
Cache entries
> [850] 2022-08-11 06:15:16 debug [10.x.x.x] arpnip - processed 0 IPv6
Neighbor Cache entries
> [850] 2022-08-11 06:15:16 debug => running workers for phase: late
> [850] 2022-08-11 06:15:16 debug -> run worker late/hooks/0
> [850] 2022-08-11 06:15:16 debug [10.x.x.x] hooks - 0 queued
> [850] 2022-08-11 06:15:16 info arpnip: finished at Thu Aug 11 15:45:16
2022
> [850] 2022-08-11 06:15:16 info arpnip: status done: Gathered arp caches
from 10.x.x.x
>
> When you logon to the controller the output is as following as per below,
the annoying part is, you don’t see the full list initially, as on the bottom
you see this "--More-- (q) quit (u) pageup (/) search (n) repeat" you then have
to press the space bar to show the full list. To avoid this from happening,
once you logon, you have to issue "no paging" - then "show arp" to show the
full list. I think this should be the better way, the script first issuing "no
paging" then "show arp".
>
> By Default:
>
> (Controller) #show arp
>
> ARP Table
> ---------
> Protocol Address Hardware Address Interface
> -------- ------- ---------------- ---------
> Internet 10.x.x.152 00:bf:77:3c:32:af vlan10
> Internet 10.x.x.203 6c:4b:90:a4:35:e0 vlan10
> Internet 10.x.x.38 1c:7d:22:11:2a:2c vlan10
> Internet 10.x.x.90 90:2e:16:dd:86:8c vlan10
> Internet 10.x.x.89 00:17:c8:7e:70:09 vlan10
> Internet 10.x.x.143 6c:4b:90:a4:3a:32 vlan10
> Internet 10.x.x.136 6c:4b:90:a4:38:7c vlan10
> Internet 10.x.x.5 00:26:0a:1a:3b:c1 vlan10
> Internet 10.x.x.232 fa:16:3e:d1:34:54 vlan10
> Internet 10.x.x.163 d0:15:a6:c9:5b:10 vlan10
> Internet 10.x.x.2 00:17:95:88:1c:c1 vlan10
> Internet 10.x.x.85 6c:4b:90:a4:2c:77 vlan10
> Internet 10.x.x.201 6c:4b:90:65:5b:51 vlan10
> Internet 10.x.x.51 00:17:c8:2b:25:34 vlan10
> Internet 10.x.x.139 6c:4b:90:a4:2f:ed vlan10
> Internet 10.x.x.96 6c:4b:90:a4:35:ed vlan10
> Internet 10.x.x.165 00:17:c8:76:b7:62 vlan10
> Internet 10.x.x.158 6c:4b:90:a4:2f:0a vlan10
> --More-- (q) quit (u) pageup (/) search (n) repeat
>
>
> No paging command first then show arp:
>
> (Controller) #no paging
> (Controller) #show arp
>
> ARP Table
> ---------
> Protocol Address Hardware Address Interface
> -------- ------- ---------------- ---------
> Internet 10.x.x.152 00:bf:77:3c:32:af vlan10
> Internet 10.x.x.203 6c:4b:90:a4:35:e0 vlan10
> Internet 10.x.x.38 1c:7d:22:11:2a:2c vlan10
> Internet 10.x.x.90 90:2e:16:dd:86:8c vlan10
> Internet 10.x.x.89 00:17:c8:7e:70:09 vlan10
> Internet 10.x.x.143 6c:4b:90:a4:3a:32 vlan10
> Internet 10.x.x.136 6c:4b:90:a4:38:7c vlan10
> Internet 10.x.x.5 00:26:0a:1a:3b:c1 vlan10
> Internet 10.x.x.232 fa:16:3e:d1:34:54 vlan10
> Internet 10.x.x.163 d0:15:a6:c9:5b:10 vlan10
> Internet 10.x.x.2 00:17:95:88:1c:c1 vlan10
> Internet 10.x.x.85 6c:4b:90:a4:2c:77 vlan10
> Internet 10.x.x.201 6c:4b:90:65:5b:51 vlan10
> Internet 10.x.x.51 00:17:c8:2b:25:34 vlan10
> Internet 10.x.x.139 6c:4b:90:a4:2f:ed vlan10
> Internet 10.x.x.96 6c:4b:90:a4:35:ed vlan10
> Internet 10.x.x.165 00:17:c8:76:b7:62 vlan10
> Internet 10.x.x.158 6c:4b:90:a4:2f:0a vlan10
> Internet 10.x.x.3 00:17:95:88:1f:41 vlan10
> Internet 10.x.x.153 d0:15:a6:c9:37:9a vlan10
> Internet 10.x.x.117 6c:4b:90:65:5e:32 vlan10
> Internet 10.x.x.120 6c:4b:90:65:5d:c2 vlan10
> Internet 10.x.x.99 90:2e:16:dd:aa:35 vlan10
> Internet 10.x.x.86 6c:4b:90:a4:2f:e0 vlan10
> Internet 10.x.x.156 d0:15:a6:c9:33:58 vlan10
> Internet 10.x.x.95 6c:4b:90:a4:34:57 vlan10
> Internet 10.x.x.162 d0:15:a6:c9:52:e8 vlan10
> Internet 10.x.x.118 6c:4b:90:a4:35:f4 vlan10
> Internet 10.x.x.88 20:c6:eb:6b:cc:06 vlan10
> Internet 10.x.x.187 00:07:4d:a1:41:2f vlan10
> Internet 10.x.x.135 6c:4b:90:a4:34:ba vlan10
> Internet 10.x.x.115 6c:4b:90:a6:05:1a vlan10
> Internet 10.x.x.220 34:e8:94:f4:e1:72 vlan10
> Internet 10.x.x.114 6c:4b:90:a4:36:f9 vlan10
> Internet 10.x.x.142 6c:4b:90:65:5c:2a vlan10
> Internet 10.x.x.176 00:26:73:e9:b1:bf vlan10
> Internet 10.x.x.127 00:17:c8:c8:2b:b4 vlan10
> Internet 10.x.x.132 6c:4b:90:a3:00:c4 vlan10
> Internet 10.x.x.112 6c:4b:90:a4:2e:81 vlan10
> Internet 10.x.x.160 d0:15:a6:c9:3a:dc vlan10
>
> ARP Table
> ---------
> Protocol Address Hardware Address Interface
> -------- ------- ---------------- ---------
> Internet 10.x.x.54 00:17:c8:2b:2a:87 vlan10
> Internet 10.x.x.104 6c:4b:90:59:14:c6 vlan10
> Internet 10.x.x.151 00:26:73:e9:de:b3 vlan10
> Internet 10.x.x.121 6c:4b:90:a4:2f:83 vlan10
> Internet 10.x.x.84 6c:4b:90:a4:2f:ae vlan10
> Internet 10.x.x.129 6c:4b:90:b0:cc:04 vlan10
> Internet 10.x.x.107 6c:4b:90:a4:cb:ad vlan10
> Internet 10.x.x.103 6c:4b:90:65:5c:39 vlan10
> Internet 10.x.x.149 6c:4b:90:a4:36:49 vlan10
> Internet 10.x.x.101 00:50:b6:10:77:c9 vlan10
> Internet 10.x.x.194 00:26:73:e9:b0:5a vlan10
> Internet 10.x.x.148 6c:4b:90:a4:36:58 vlan10
> Internet 10.x.x.175 00:07:4d:a2:a8:c3 vlan10
> Internet 10.x.x.169 6c:4b:90:a4:2f:43 vlan10
> Internet 10.x.x.56 00:17:c8:2c:d8:2a vlan10
> Internet 10.x.x.138 6c:4b:90:a4:37:67 vlan10
> Internet 10.x.x.83 6c:4b:90:a4:36:c2 vlan10
> Internet 10.x.x.193 00:26:73:e9:a1:d5 vlan10
> Internet 10.x.x.186 00:07:4d:a2:dc:ff vlan10
> Internet 10.x.x.123 6c:4b:90:a4:2f:f2 vlan10
> Internet 10.x.x.94 6c:4b:90:b0:cb:af vlan10
> Internet 10.x.x.125 6c:4b:90:a4:36:cb vlan10
> Internet 10.x.x.131 6c:4b:90:64:48:1d vlan10
> Internet 10.x.x.122 6c:4b:90:b0:cb:bc vlan10
> Internet 10.x.x.4 f8:60:f0:79:b7:c0 vlan10
> Internet 10.x.x.188 00:07:4d:a2:a8:a6 vlan10
> Internet 10.x.x.58 1c:7d:22:0d:ea:ad vlan10
> Internet 10.x.x.119 00:26:73:e7:9a:fe vlan10
> Internet 10.x.x.110 6c:4b:90:a4:2f:bf vlan10
> Internet 10.x.x.116 6c:4b:90:a2:fc:9b vlan10
> Internet 10.x.x.57 00:07:4d:65:58:b6 vlan10
> Internet 10.x.x.157 d0:15:a6:c9:2b:c4 vlan10
> Internet 10.x.x.231 fa:16:3e:d1:34:54 vlan10
> Internet 10.x.x.150 6c:4b:90:a4:35:b5 vlan10
> Internet 10.x.x.91 78:bc:1a:9c:a9:22 vlan10
> Internet 10.x.x.191 00:26:73:e8:44:4a vlan10
> Internet 10.x.x.145 6c:4b:90:a4:2f:06 vlan10
> Internet 10.x.x.170 6c:4b:90:a4:33:db vlan10
> Internet 10.x.x.166 6c:4b:90:a5:f2:83 vlan10
> Internet 10.x.x.180 00:07:4d:a2:a8:af vlan10
>
> ARP Table
> ---------
> Protocol Address Hardware Address Interface
> -------- ------- ---------------- ---------
> Internet 10.x.x.106 c4:f3:12:73:20:98 vlan10
> Internet 10.x.x.235 52:54:00:6d:f8:66 vlan10
> Internet 10.x.x.105 6c:4b:90:a4:36:0b vlan10
> Internet 10.x.x.82 6c:4b:90:a4:2f:c1 vlan10
> Internet 10.x.x.92 6c:4b:90:a4:2f:d1 vlan10
> Internet 172.x.x.x 84:78:ac:7a:a1:37 vlan100
> Internet 10.x.x.159 d0:15:a6:c9:36:dc vlan10
> Internet 10.x.x.144 6c:4b:90:a4:3a:36 vlan10
> Internet 10.x.x.53 00:17:c8:2d:a2:8b vlan10
> Internet 10.x.x.108 6c:4b:90:a6:05:2d vlan10
> Internet 10.x.x.195 00:17:c8:95:c9:9e vlan10
> Internet 10.x.x.185 00:07:4d:a1:36:18 vlan10
> Internet 10.x.x.97 6c:4b:90:60:1b:95 vlan10
> Internet 10.x.x.183 00:07:4d:a2:ab:59 vlan10
> Internet 10.x.x.81 6c:4b:90:a4:35:af vlan10
> Internet 10.x.x.133 6c:4b:90:65:5b:38 vlan10
> Internet 10.x.x.140 6c:4b:90:a5:f2:fa vlan10
> Internet 10.x.x.154 d0:15:a6:c9:2a:e0 vlan10
> Internet 10.x.x.161 d0:15:a6:c9:2d:26 vlan10
> Internet 10.x.x.164 d0:15:a6:c9:5d:fe vlan10
> Internet 10.x.x.87 6c:4b:90:65:5b:5f vlan10
> Internet 10.x.x.197 90:2e:16:d1:d0:17 vlan10
>
>
>
> On 10/8/2022, 05:34, "Muris" <alcat...@gmail.com> wrote:
>
> Thanks, i will try this really appreciate
>
> A question - whats the real reason some of this data cant be gotten
out of snmp and it needs ssh just to get arps?
>
> Is it some limitations of the aruba product on snmp?
>
> I dont get how like cisco just works and anything hp/aruba requires
so much tweaking
>
>
> > On 10 Aug 2022, at 04:03, Christian Ramseyer <ramse...@netnea.com>
wrote:
> >
> >
> >
> >> On 09.08.22 20:29, Christian Ramseyer wrote:
> >>
> >> Post the output and an example of "show arp" or whatever the
command is for the controller here. With this, we can maybe piece together a
version that works for you.
> >>
> >
> > Oh and if "show arp" is not the right command, add the correct one
first in the
> >
> > my @data = $ssh->capture("show arp");
> >
> > line.
> >
>
--
Christian Ramseyer, netnea ag
Network Management. Security. OpenSource.
https://www.netnea.com
Phone: +41 79 644 77 64
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users