Welcome, Guest. Please login or register.

Author Topic: Cisco/HP mixed environment  (Read 8627 times)

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Cisco/HP mixed environment
« on: July 01, 2013, 01:24:48 PM »
Hi to all (Remo included, of course :) )

I one of our sites we have a mixed switches environment, our typical is Cisco, but there are some HP (in one case, J9021A).

NeDi doesn't discover them, even if we've set SNMP domains equal to the other (Cisco) switches.

Indeed, on the uplink port (the one from Cisco to HP) the HP switch is not shown.
Checked by hand, "show cdp neighbors" on the last Cisco switch doesn't show the HP switch, instead "show lldp neighbors" shows it and also Cisco ones.

Any idea?

TIA!

Paolo

lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Cisco/HP mixed environment
« Reply #1 on: July 01, 2013, 06:27:08 PM »
you need to change the definition file for the cisco and modify CDP protocol with CDP|LLDP (i do this solution), or, if the link for HP switches is unique (or very few), you can add the HP in the seedlist: the HP will be added, then, LLDP will discovery the Cisco and the link will be added.

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Cisco/HP mixed environment
« Reply #2 on: July 02, 2013, 01:14:08 PM »
Modded, but no luck, still not discovered.

The IP of switches is detected, but not as switches.
I've also prevously added relevant subnet to "netfilter"...
in verbose discovery these switches appears as nodes.

lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Cisco/HP mixed environment
« Reply #3 on: July 02, 2013, 02:26:07 PM »
you can manual add the IP of the  switches... (one cisco and one HP), add "verbose" but without protocol (faster). and see if you can see something into "DisProtocol  ----------------------" part.
NeDi should tell you LLDP or CDP result with the IP that should discovery if "protocol" were selected.

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Cisco/HP mixed environment
« Reply #4 on: July 02, 2013, 03:33:40 PM »
If I rediscover (-v -a address) the last Cisco switch before the HP, under DisProtoco neither CDP or LLDP detect the HP switch, but shows the others Cisco neighbors.
If I discover with same command line and the IP of the HP switch, it's discovered.

In my mind, NeDi should discover it directly, it doesn't need another seed.

I can confirm, if I use "show lldp neightbor" its shows the HP switch. And if I add "detail" it shows also real IP address.

lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Cisco/HP mixed environment
« Reply #5 on: July 02, 2013, 03:42:20 PM »
Because you see HP switches in "sho LLDP nei" in HP switches, i'm pretty sure "CDP|LLDP" wasn't saved correclty into definition file.
If you re-edit it, did you see the strings? if not, you have just write it into editor, but not saved into .def file.
you could also check changing the definition file with only LLDP, and redo the test above

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Cisco/HP mixed environment
« Reply #6 on: July 02, 2013, 03:52:38 PM »
Sorry, checked by hand, in modified DEF's there is always
Code: [Select]
Dispro CDP|LLDP

I don't like to choose only LLDP, in our networks there are some old device that doesn't support LLDP (i.e. 3500XL).
But, keep in mind that those old devices are on completely different switch tree branch, so they don't interfere with HP discovery...

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Cisco/HP mixed environment
« Reply #7 on: July 03, 2013, 10:05:38 AM »
Thanks anyway, lorenzo!

Remo,

have you any idea on how to solve this "issue"?
May be related to the fact that some Cisco switch handle both CDP and LLDP, and NeDi may "prefer" the first and ignore the latter?

Thanks

Paolo

lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Cisco/HP mixed environment
« Reply #8 on: July 03, 2013, 11:49:02 AM »
We also have mixed Cisco/Hp/Allied Telesin in a site, and setting "CDP|LLDP" as discovery protovol into cisco definition file solve for us this discovery issue we have had.
so... using LLDP only in the definition file isn't the solution, but a good test to see what's NeDi do with your're cisco switches. 2 minutes work: change .def file, launch an ADD IP "verbose" from the web interface, see what's written in the logfile then revert back the definition file.


pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Cisco/HP mixed environment
« Reply #9 on: July 03, 2013, 12:39:30 PM »
Done, no success.

Could you explain which line should I expect to see in verbose report?
Something abnormal appears:
Code: [Select]
a.b.c.d = last cisco switch before HP switches address
domain  = SNMP domain (readonly)

f.g.h.i = address of another cisco switch (not the other identical in stack)

DisProtocol  ------------------------------------------------------------------
SNMP:Connect 10.66.1.122 ZORRO v2 Tout:13s MaxMS:4095
LLDP:IF index 6 delivering 0mW
LLDP:IF index 29 delivering 0mW
DIPR:No IF with index 27 (try LLDPX or LLDPXN in .def)!
DIPR:No IF with index 52 (try LLDPX or LLDPXN in .def)!
LLDP:RONSN141   Gi0/2    on Vl1      10.66.1.141     Cisco IOS  Cisco IOS Softw
LLDP:Queueing of RONSN141 is not desired
DIPR:No IF with index 28 (try LLDPX or LLDPXN in .def)!
DIPR:No IF with index 2 (try LLDPX or LLDPXN in .def)!

using only lldp breaks neightbors link in NeDi.

In the meanwhile I'll restore CDP...


lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Cisco/HP mixed environment
« Reply #10 on: July 03, 2013, 01:01:51 PM »
So, try using CDP|LLDPXN or CDP|LLDPXA the only other 2 possibilities...
Of course, using only LLDP will brake every CDP link... no problem: it will be rebuild then




pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Cisco/HP mixed environment
« Reply #11 on: July 03, 2013, 04:04:07 PM »
Strangely, inverting them seems to work:

Code: [Select]
Dispro LLDPX|CDP
Now the two device against who I'm struggling are discovered.

Is it the wanted behaviour of Nedi? Or is an accident?

Anyway, command line authentication (and so configuration backup) fails.

In this particular case, these are two HP 2810, that present a boring banner which request a final "press any key to continue", so the code that handle this condition is the Nortel one.
But because the right username/password couple is not the first, it fails.

Any advice on how to solve this situation?
(is not very important, indeed. No critical devices, and I hope I'll be able to replace them with Cisco, that i highly prefer)

TIA!

Paolo

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2686
    • View Profile
    • NeDi
Re: Cisco/HP mixed environment
« Reply #12 on: July 03, 2013, 08:46:12 PM »
What do you mean by inverting?

If you follow my CLI tutorial you should be able to debug why it's failing. Trying a 2nd login should work. Sometimes the pause between tries is too short for some devices, which can cause a failure. You could create a new config with the correct login and use it to find the correct login...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Cisco/HP mixed environment
« Reply #13 on: July 04, 2013, 08:16:01 AM »
What do you mean by inverting?

If you follow my CLI tutorial you should be able to debug why it's failing. Trying a 2nd login should work. Sometimes the pause between tries is too short for some devices, which can cause a failure. You could create a new config with the correct login and use it to find the correct login...

Inverting: I mean using
Code: [Select]
Dispro LLDPX|CDP instead of
Code: [Select]
Dispro CDP|LLDPXIn a better english, exchanging the order of terms after Dispro.

Anyway, after resetting login through key icon, and doing a config backup (that retry a command line access login) I obtain this:
Code: [Select]
Prepare (CLI)  ----------------------------------------------------------------
SSH :admin:22 Tout:8s OS:ProCurve EN:(.+?)#\s?(\x1b\[[;\?0-9A-Za-z]+)+$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l admin aaa.bbb.ccc.ddd
CLI0:Connection refused
TEL :admin:23 Tout:8s OS:ProCurve EN:(.+?)#\s?(\x1b\[[;\?0-9A-Za-z]+)+$
CLI1:Matched 'any key' sending ctrl-Y
CLI1:Matched 'Username: [?25h[?25h[?25h' sending username
CLI3:Username admin sent
CLI3:Matched 'Password:' sending password
CLI3:Password sent
CLI3:Matched 'Invalid' login failed
TEL :adminro:23 Tout:8s OS:ProCurve EN:(.+?)#\s?(\x1b\[[;\?0-9A-Za-z]+)+$
CLI1:Matched 'any key' sending ctrl-Y
Use of uninitialized value $match in pattern match (m//) at /var/nedi/inc/libcli-iopty.pm line 540.
Use of uninitialized value $match in pattern match (m//) at /var/nedi/inc/libcli-iopty.pm line 543.
ERR3:pattern match timed-out
DISC:Cli config = login error
EVNT:CL=cfge EL=1 TGT=SWITCHNAME MSG=Config backup error: login error

manually accessing the same switch by telnet i obtain as first screen this one:
Code: [Select]
ProCurve J9021A Switch 2810-24G
Software revision N.11.15

Copyright (C) 1991-2008 Hewlett-Packard Co.  All Rights Reserved.

                           RESTRICTED RIGHTS LEGEND

 Use, duplication, or disclosure by the Government is subject to restrictions
 as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data and
 Computer Software clause at 52.227-7013.

         HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303











Press any key to continue
pressing any key I obtain this prompt:
Code: [Select]
Username:
simulating a wrong username/password couple, this is the result:
Code: [Select]
Username: admin
Password:
Invalid password
Username:
The second Usernae prompt appears immediately, with no noticeable delay.
All seems OK, but as you can see above in the verbose output captured, there are two errors.

In nedi.conf I've added the username/password couple for those switches (that must be different from the common ones used for Cisco switches)

TIA again!

Paolo




rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2686
    • View Profile
    • NeDi
Re: Cisco/HP mixed environment
« Reply #14 on: July 04, 2013, 09:30:14 PM »
The order shoudln't matter. The regexp either matches or it doesn't...

Can you retry with the correct pw in the 1st place of nedi.conf?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo