Welcome, Guest. Please login or register.

Author Topic: Backup Aruba Config  (Read 7231 times)

raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Backup Aruba Config
« on: February 29, 2012, 12:32:01 PM »
If anyone is interested.

Add to inc/libcli-iopty.pm:
Code: [Select]
#Aruba
$cmd{'ArubaOS'}{'ropr'} = '(.+?)>\s?$';
$cmd{'ArubaOS'}{'enpr'} = '(.+?)#\s?$';
$cmd{'ArubaOS'}{'conf'} = 'show running-config';
$cmd{'ArubaOS'}{'strt'} = '^version';
$cmd{'ArubaOS'}{'page'} = 'no paging';
$cmd{'ArubaOS'}{'dfwd'} = 'show mac-address-table';
$cmd{'ArubaOS'}{'enab'} = 'enable';

Add to html/ Other-Defgen.php:
Code: [Select]
<option value="">--------
<option value="ArubaOS"<?=($os == "ArubaOS")?" selected":""?>>Aruba OS

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2711
    • View Profile
    • NeDi
Re: Backup Aruba Config
« Reply #1 on: February 29, 2012, 06:20:49 PM »
Nice, added...

Will also try to support APs and associated clients. Hopefully you and Harry can help...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

harry

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Backup Aruba Config
« Reply #2 on: February 29, 2012, 08:52:39 PM »
Thanks raider82,

Can you please tell me where to add..? i.e line no. will be helpful.

Remo- yes I will defiantly help to see full support of Aruba products in NeDI.

Regards,
Harry

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2711
    • View Profile
    • NeDi
Re: Backup Aruba Config
« Reply #3 on: March 01, 2012, 10:26:34 PM »
Cool, of course you did already, by letting me look at the controller (kinda cool to develop across half the globe). We'll need associated clients in the next step and hopefully I'll find a way to map them to APs and map those again to nosnmp-devices. BTW, do you know, whether LLDP can be turned on to link controlled APs to switchports?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

harry

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Backup Aruba Config
« Reply #4 on: March 02, 2012, 03:29:10 AM »
Unfortunately no, because Aruba works or Aruba tunnelling protocol (ATP).  NO LLDP support.
Someone Plase correct me if I am wrong.

raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Backup Aruba Config
« Reply #5 on: March 12, 2012, 08:47:05 AM »
Can you please tell me where to add..? i.e line no. will be helpful.
In libcli-iopty.pm, you find the correct place around line 133 under the Alcatel block.

In Other-Defgen.php, you find the correct place around line 459. I have put Aruba under the ProCurve Section.

Note: I wrote "around", because I might have made other changes.

harry

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Backup Aruba Config
« Reply #6 on: March 12, 2012, 11:16:14 PM »
I applied all the changes in respective files.
The result is as under

SSH :admin:22 Tout:3s OS:ArubaOS EN:(.+?)#\s?$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l admin 172.26.140.4
CLI2:Matched password:, sending password CLI3:Password sent
CLI3:Matched denied, login failed

I tried with the same password from command promt using ssh username@hot and used the same password as I had in ndedi.conf.

Any suggestion..?

raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Backup Aruba Config
« Reply #7 on: March 15, 2012, 01:37:27 PM »
CLI3:Matched denied, login failed
...
Any suggestion..?
It seems that your patterns do not match. How does your prompt on the Aruba Boxes look like?

harry

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Backup Aruba Config
« Reply #8 on: March 20, 2012, 02:41:02 AM »
Hi,

My Aruba prompt in SSH Putty is like "login as:"  when I enter user it will prompt for password as
"admin@172.18.140.x's password:" after successful login
Last login: Mon date and time from IP adrress and
a prompt like "(hostname)  >"  where I type en to get enable password prompt and I get "Password:"
I enter the enable password and I am through.

Is it different than yours..? I assume all the prompts should be similier accros all aroba products.


raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Backup Aruba Config
« Reply #9 on: March 20, 2012, 03:30:30 PM »
My prompt looks the same.

It seems like you fail in line 485 of libcli-iopty.pm:
        }elsif($match =~ /password\s?(:|for)|invalid|incorrect|denied|Authentication failed|$misc::uselogin/i){
                &misc::Prt("CLI3:Matched $match, login failed\n");
                $session->close;
                return (undef, "login failed");

Do you have any special characters in your password? E.g. dollar signs?
You may want to add some debug information like in line 477:
print "PRE :$pre\nMTCH:$match\n";
Here you can see what is happening on the console.

harry

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Backup Aruba Config
« Reply #10 on: March 21, 2012, 12:08:10 AM »
After adding up that Print PRE statemanet the result is
SSH :admin:22 Tout:3s OS:ArubaOS EN:(.+?)#\s?$ PTY :Forking ssh -o 'StrictHostKeyChecking no' -l admin 172.18.172.4 CLI2:Matched password:, sending password CLI3:Password sent PRE : Permission MTCH:denied CLI3:Matched denied, login failed SSH :admin:22 Tout:3s OS:ArubaOS EN:(.+?)#\s?$ PTY :Forking ssh -o 'StrictHostKeyChecking no' -l admin 172.18.172.4 CLI2:Matched password:, sending password CLI3:Password sent PRE : Permission MTCH:denied CLI3:Matched denied, login failed SSH :.:22 Tout:3s OS:ArubaOS EN:(.+?)#\s?$ PTY :Forking ssh -o 'StrictHostKeyChecking no' -l . 172.18.172.4 CLI2:Matched password:, sending password CLI3:Password sent PRE : Permission MTCH:denied CLI3:Matched denied, login failed SSH :.:22 Tout:3s OS:ArubaOS EN:(.+?)#\s?$ PTY :Forking ssh -o 'StrictHostKeyChecking no' -l . 172.18.172.4 CLI2:Matched password:, sending password CLI3:Password sent PRE : Permission MTCH:denied CLI3:Matched denied, login failed SSH :witafe:22 Tout:3s OS:ArubaOS EN:(.+?)#\s?$ PTY :Forking ssh -o 'StrictHostKeyChecking no' -l witafe 172.18.172.4 CLI2:Matched password:, sending password CLI3:Password sent PRE : Permission MTCH:denied CLI3:Matched denied, login failed DISC:Cli bridge fwd = login failed


it shows PRE blank and  match denied. thats tricky, what may be the reson for not forwaring the password?

raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Backup Aruba Config
« Reply #11 on: March 23, 2012, 02:44:05 PM »
it shows PRE blank and  match denied. thats tricky, what may be the reson for not forwaring the password?
Maybe Remo can help? If you have any special characters in your password, this may be the reason. However, it does not seem to be very likely, since it is working with cisco devices for me.
What you can do is to change the log files to something you can read. That could give you more information. E.g.
Output_log      => "my_inlog",
Input_log       => "my_outlog",
dump_log       => "my_dumplog",
That should be around line 388. You will then see all the communication within these files. You might want to try this with only one component.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2711
    • View Profile
    • NeDi
Re: Backup Aruba Config
« Reply #12 on: March 24, 2012, 09:45:12 PM »
Use nedi.pl -db to have input- and output.log created. It works best if you open 2 more terminals and tail -f on those files...

Do you use a banner/disclaimer containing the word denied?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

harry

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Backup Aruba Config
« Reply #13 on: March 25, 2012, 01:47:38 AM »
Do you use a banner/disclaimer containing the word denied?

No, We don't.

I will debug on Monday and will post the result.