Welcome, Guest. Please login or register.

Author Topic: LLDP with strange IP result  (Read 2543 times)

lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
LLDP with strange IP result
« on: June 19, 2013, 05:44:55 PM »
Hi.
I got some (new) industrial switches to monitor coming from Phoenix Contact.
LLDP was enable and I create the .def file.
Anyway, discovery wasn't work:
LLDP seem to work, it discover the 2 similar neighbor but it takes a strange IP as result: so link was addedd, but further switches wasn't discovered:
If i add by hand all switches, I can also see every right connection.
I will cut/paste (little modified) the log of discovery:


DisProtocol  ------------------------------------------------------------------
SNMP:Connect xx.xx.6.240 public v2 Tout:7s MaxMS:4095
LLXN:6 index 6 is IF index 6
LLXN:3 index 3 is IF index 3
LLXN:8 index 8 is IF index 8
LLXN:7 index 7 is IF index 7
LLXN:4 index 4 is IF index 4
LLXN:2 index 2 is IF index 2
LLXN:5 index 5 is IF index 5
LLXN:1 index 1 is IF index 1
ERR :LLDP PoE Requested table is empty or does not exist
LLDP:ASCII address ��
LLDP:ASCII address ��
LLDP:xxxx_SW24 _1       on 1        ��             Switch_2 ( Switch_2 (L) Se
LLDP:Queueing of xxxx_SW241 is ok
LLDP:xxxx_SW24 _1       on 2        ��             Smart Mana Smart Managed C
LLDP:Queueing of xxxx_SW244 is ok



Discover     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Identify xxxx_SW241 -------------------------------------------------------
SNMP:Connect �� othercomm v2 Tout:2s MaxMS:1472
SNMP:Connect �� public v2 Tout:2s MaxMS:1472
EVNT:CL=nedn EL=1 TGT=xxxx_SW241 MSG=No response from IP �� using -a xx.xx.6.240
DISC:ToDo/Done-Time                        1/1-0s

Discover     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Identify xxxx_SW244 -------------------------------------------------------
SNMP:Connect �� othercomm v2 Tout:2s MaxMS:1472
SNMP:Connect �� public v2 Tout:2s MaxMS:1472
EVNT:CL=nedn EL=1 TGT=xxxx_SW244 MSG=No response from IP �� using -a xx.xx.6.240
DISC:ToDo/Done-Time                        0/1-0s
===============================================================================

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2693
    • View Profile
    • NeDi
Re: LLDP with strange IP result
« Reply #1 on: June 19, 2013, 09:10:28 PM »
Can you snmpwalk 1.0.8802.1.1.2.1.4.2.1.3 and take a wireshark trace?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: LLDP with strange IP result
« Reply #2 on: July 01, 2013, 06:29:23 PM »
I send you a private message with the info some days ago.... then, I went to  holiday :)

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2693
    • View Profile
    • NeDi
Re: LLDP with strange IP result
« Reply #3 on: July 06, 2013, 01:42:16 AM »
Can you add those lines after 1584 in libsnmp.pm?

               }elsif(@k == 19){                  # Phoenix Contact do it this way...
                  $neb{$x}{$k[13]}{'ip'} = &misc::MapIp("$k[15].$k[16].$k[17].$k[18]");
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: LLDP with strange IP result
« Reply #4 on: July 08, 2013, 10:07:57 AM »
Tnx
But I've got this code in that line..... cannot ficure how to insert those line in this code......
maybe I've don't have the last libsnmp.pm. But I have Neteye from whuert Phoenix, and i use their repository to upgrade Nedi..
Could you give me the part of code i need to insert? and not only the line number?


   1583                         while( my($key, $val) = each(%{$r}) ) {
   1584                                 my @k = split (/\./,$key);
   1585                                 my $x = ($dp =~ /LLDPX/)?$lix{$k[12]}:$k[12];
   1586                                 if($x){

edit: sorry the "irruence": i try to insert some line after, where "seem" to be the right place: (it's after 1594 row :)

   1592                                         }elsif($k[15] == 6){                                            # MAC (you never know!)
   1593                                                 my $mc   = sprintf "%02x%02x%02x%02x%02x%02x",$k[16],$k[17],$k[18],$k[19],$k[20],$k[21];
   1594                                                 &misc::Prt("LLDP:Ignoring MAC address $mc\n");
   1595                                         # --- Mod Inserted here ---
   1596                                         }elsif(@k == 19){                  # Phoenix Contact do it this way...
   1597                                                 $neb{$x}{$k[13]}{'ip'} = &misc::MapIp("$k[15].$k[16].$k[17].$k[18]");
   1598                                         # --- end mod ---

Seem Working.....
« Last Edit: July 08, 2013, 10:20:53 AM by lorenzo »

lorenzo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: LLDP with strange IP result
« Reply #5 on: July 09, 2013, 08:40:38 AM »
Definitively: it's works !!!!
tnx a lot

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2693
    • View Profile
    • NeDi
Re: LLDP with strange IP result
« Reply #6 on: July 09, 2013, 09:34:27 PM »
Cool, tx for the feedback!
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo