napalm-automation / napalm-ios

Apache License 2.0
31 stars 40 forks source link

Failure processing show lldp neighbors detail #129

Closed kaage closed 7 years ago

kaage commented 7 years ago

Description of Issue/Question

napalm-ios cannot process lldp neighbors detail on one of my swithces (probably because of some end devices speaking LLDP and having neighborship). I have plenty of similar switches with equal hardware and software and they are working.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

Setup

napalm-ios version

(Paste verbatim output from pip freeze | grep napalm-ios between quotes below)

napalm-ios==0.6.1

IOS version

(Paste verbatim output from show version between quotes below)

ABCD-U1AC04-SW1#show lldp neighbors detail  
------------------------------------------------
Chassis id: 0102.e2ff.fdb0
Port id: Te2/1/14
Port Description: ABCD-U1AC04-SW1
System Name: ABCD-U-DSW1.wan.acme.com

System Description: 
Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch  Software (cat4500e-UNIVERSALK9-M), Version 03.06.05.E RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2016 by Cisco Systems, Inc.
Compiled Thu 02-J

Time remaining: 99 seconds
System Capabilities: B,R
Enabled Capabilities: B
Management Addresses:
    IP: 192.168.1.13
Auto Negotiation - not supported
Physical media capabilities:
    Other/unknown
Media Attachment Unit type - not advertised
Vlan ID: - not advertised

------------------------------------------------
Chassis id: 0102.e2ff.fdb0
Port id: Te1/1/14
Port Description: ABCD-U1AC04-SW1
System Name: ABCD-U-DSW1.wan.acme.com

System Description: 
Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch  Software (cat4500e-UNIVERSALK9-M), Version 03.06.05.E RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2016 by Cisco Systems, Inc.
Compiled Thu 02-J

Time remaining: 103 seconds
System Capabilities: B,R
Enabled Capabilities: B
Management Addresses:
    IP: 192.168.1.13
Auto Negotiation - not supported
Physical media capabilities:
    Other/unknown
Media Attachment Unit type - not advertised
Vlan ID: - not advertised

------------------------------------------------
Chassis id: hmbbkku-la
Port id: port-001
Port Description - not advertised
System Name: HMBBKKU-LA

System Description: 
Hewlett-Packard HP ProBook 650 G1,A3112DD10303,5CG4543H13 + engineering

Time remaining: 15 seconds
System Capabilities: S
Enabled Capabilities: S
Management Addresses:
    IP: 192.168.45..57
    OID:
        1.3.6.1.4.1.24686.
Auto Negotiation - supported, enabled
Physical media capabilities:
    1000baseT(FD)
    1000baseT(HD)
    100base-TX(FD)
    100base-TX(HD)
    10base-T(FD)
    10base-T(HD)
    Other/unknown
Media Attachment Unit type - not advertised
Vlan ID: - not advertised

------------------------------------------------
Chassis id: jniceel-la
Port id: port-001
Port Description - not advertised
System Name: JNICEEL-LA

System Description: 
HP HP ProBook 650 G2,,5CG64565JFL + engineering

Time remaining: 18 seconds
System Capabilities: S
Enabled Capabilities: S
Management Addresses:
    IP: 192.168.45..71
    OID:
        1.3.6.1.4.1.24686.
Auto Negotiation - supported, enabled
Physical media capabilities:
    1000baseT(FD)
    1000baseT(HD)
    100base-TX(FD)
    100base-TX(HD)
    10base-T(FD)
    10base-T(HD)
    Other/unknown
Media Attachment Unit type: 16
Vlan ID: - not advertised

------------------------------------------------
Chassis id: swaaaer-lta
Port id: port-001
Port Description - not advertised
System Name: SWAAAER-LTA

System Description: 
Hewlett-Packard HP ProBook 6570b,A10112D102,5CB40117ZP + engineering

Time remaining: 16 seconds
System Capabilities: S
Enabled Capabilities: S
Management Addresses:
    IP: 192.168.45..58
    OID:
        1.3.6.1.4.1.24686.
Auto Negotiation - supported, enabled
Physical media capabilities:
    1000baseT(FD)
    1000baseT(HD)
    100base-TX(FD)
    100base-TX(HD)
    10base-T(FD)
    10base-T(HD)
    Other/unknown
Media Attachment Unit type - not advertised
Vlan ID: - not advertised

------------------------------------------------
Chassis id: rberrrann-lta
Port id: port-001
Port Description - not advertised
System Name: RBERRRANN-LTA

System Description: 
Hewlett-Packard HP ProBook 650 G1,A3112DD11203,CNU444BMZ0 + engineering

Time remaining: 19 seconds
System Capabilities: S
Enabled Capabilities: S
Management Addresses:
    IP: 192.168.45..104
    OID:
        1.3.6.1.4.1.24686.
Auto Negotiation - supported, enabled
Physical media capabilities:
    1000baseT(FD)
    1000baseT(HD)
    100base-TX(FD)
    100base-TX(HD)
    10base-T(FD)
    10base-T(HD)
    Other/unknown
Media Attachment Unit type - not advertised
Vlan ID: - not advertised

------------------------------------------------
Chassis id: cr-443-2
Port id: port-001
Port Description: Siemens, SIMATIC NET, CP 343-1, 6GK7 443-1EX50-0XE0 , HW: 7, FW: V3.0.23, Ethernet Port, X1 P1
System Name - not advertised

System Description: 
Siemens, SIMATIC NET, CP 443-1, 6GK7 443-1EX50-0XE0, HW: Version 7, FW: Version V3.0.23, VPH6201262

Time remaining: 16 seconds
System Capabilities: S
Enabled Capabilities: S
Management Addresses:
    IP: 192.168.24.197
    OID:
        1.3.6.1.4.1.24686.
Auto Negotiation - supported, enabled
Physical media capabilities:
    100base-T2(FD)
    100base-T2(HD)
    100base-TX(FD)
    100base-TX(HD)
    100base-T4
    10base-T(FD)
    10base-T(HD)
    Other/unknown
Media Attachment Unit type: 16
Vlan ID: - not advertised

Total entries displayed: 7

Error Traceback

(Paste the complete traceback of the exception between quotes below) This can be seen via Ansible:

[lldp_neighbors_detail] cannot retrieve device data: Failure processing show lldp neighbors detail
dbarrosop commented 7 years ago

Can you obscure the output somehow? We will need it to build a test case.

kaage commented 7 years ago

I did and also added it to issue description. I tried to be carefull and not change any structure of data. All names and serial numbers etc. are equal length with original ones (and identical type of characters).

ktbyers commented 7 years ago

@kaage Can you also get me the show lldp neighbors for this (obscure anything you need to obscure, but try to keep fields the same length).

I can work out making them consistent between the lldp details and the show lldp neighbors.

ktbyers commented 7 years ago

Okay, I think the one calling itself as 'not advertised' for system name is breaking it:

Chassis id: cr-443-2
Port id: port-001
Port Description: Siemens, SIMATIC NET, CP 343-1, 6GK7 443-1EX50-0XE0 , HW: 7, FW: V3.0.23, Ethernet Port, X1 P1
System Name - not advertised
ktbyers commented 7 years ago

@kaage Never mind on the show lldp neighbors...I think I worked it out.

kaage commented 7 years ago

Here comes show lldp neighbors output: (unfortunately neighbors has changes meanwhile)

Capability codes:
    (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
    (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

Device ID           Local Intf     Hold-time  Capability      Port ID
ABCD-U-DSW1.wan.acmeTe2/0/1        120        B               Te2/1/14
ABCD-U-DSW1.wan.acmeTe1/0/1        120        B               Te1/1/14
SKICK-LA            Gi1/0/23       20         S               port-001
MTRAUTNER-LA        Gi1/0/43       20         S               port-001
SWAAAER-LTA         Gi2/0/33       20         S               port-001
RBERRRANN-LTA       Gi2/0/33       20         S               port-001
cr-443-2            Gi2/0/9        20         S               port-001

Total entries displayed: 9
kaage commented 7 years ago

I can confirm this fix works as well.