Topology-UI shows CDP links not correct
Description
Acceptance / Success Criteria
Attachments
Lucidchart Diagrams
Activity

Ronny Trommer February 12, 2016 at 8:18 AM
Verified in Foundation-2016 and CDP topology was correct discovered.

Antonio Russo December 2, 2015 at 12:54 PM
Merged in Foundation

Antonio Russo December 2, 2015 at 4:53 AM
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git commit -a
[features/foundation-enlinkd f182020] Fix : Topology Cdp link not correct
17 files changed, 182710 insertions, 20 deletions
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms8000EnTest.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/nb/Nms8000NetworkBuilder.java
create mode 100644 opennms-services/src/test/resources/linkd/nms8000/NMM-R1.snmpwalk.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms8000/NMM-R2.snmpwalk.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms8000/NMM-R3.snmpwalk.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms8000/NMM-SW1.snmpwalk.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms8000/NMM-SW2.snmpwalk.txt
MacBook-Pro-di-Antonio-Russo:opennms antonio$
MacBook-Pro-di-Antonio-Russo:opennms antonio$
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 257, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (49/49), 451.15 KiB | 0 bytes/s, done.
Total 49 (delta 26), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
6da02cb..f182020 features/foundation-enlinkd -> features/foundation-enlinkd

Antonio Russo December 1, 2015 at 7:16 AM
I run the test....and I found the topology....
----------cdp element --------
Nodeid: 1
Cdp Global Device Id: NMM-R1.informatik.hs-fulda.de
Cdp Global Run: true
----------cdp element --------
Nodeid: 2
Cdp Global Device Id: NMM-R2.informatik.hs-fulda.de
Cdp Global Run: true
----------cdp element --------
Nodeid: 3
Cdp Global Device Id: NMM-R3.informatik.hs-fulda.de
Cdp Global Run: true
----------cdp element --------
Nodeid: 4
Cdp Global Device Id: NMM-SW1.informatik.hs-fulda.de
Cdp Global Run: true
----------cdp element --------
Nodeid: 5
Cdp Global Device Id: NMM-SW2.informatik.hs-fulda.de
Cdp Global Run: true
----------cdp link --------
Create time: 2015-12-01 13:10:18.142
Last Poll time: 2015-12-01 13:10:18.142
----------Source Node--------
Nodeid: 1
----------Source Port--------
cdpcacheifindex: 8
cdpcachedeviceindex: 4
cdpinterfacename: GigabitEthernet0/0
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.3.2
cdpcacheversion: "Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.3(3)M2, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-R3.informatik.hs-fulda.de
cdpcachedeviceplatform: Cisco CISCO2911/K9
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet0/1
----------cdp link --------
Create time: 2015-12-01 13:10:18.212
Last Poll time: 2015-12-01 13:10:18.212
----------Source Node--------
Nodeid: 1
----------Source Port--------
cdpcacheifindex: 9
cdpcachedeviceindex: 2
cdpinterfacename: GigabitEthernet0/1
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.23.10
cdpcacheversion: "Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE5, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-SW1.informatik.hs-fulda.de
cdpcachedeviceplatform: cisco WS-C2960-24TT-L
----------Remote Port--------
cdpcachedeviceport: FastEthernet0/1
----------cdp link --------
Create time: 2015-12-01 13:10:18.24
Last Poll time: 2015-12-01 13:10:18.24
----------Source Node--------
Nodeid: 1
----------Source Port--------
cdpcacheifindex: 10
cdpcachedeviceindex: 3
cdpinterfacename: GigabitEthernet0/2
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.42.10
cdpcacheversion: "Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE5, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-SW2.informatik.hs-fulda.de
cdpcachedeviceplatform: cisco WS-C2960-24TT-L
----------Remote Port--------
cdpcachedeviceport: FastEthernet0/2
----------cdp link --------
Create time: 2015-12-01 13:10:18.389
Last Poll time: 2015-12-01 13:10:18.389
----------Source Node--------
Nodeid: 2
----------Source Port--------
cdpcacheifindex: 8
cdpcachedeviceindex: 5
cdpinterfacename: GigabitEthernet0/0
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.2.2
cdpcacheversion: "Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.3(3)M2, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-R3.informatik.hs-fulda.de
cdpcachedeviceplatform: Cisco CISCO2911/K9
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet0/2
----------cdp link --------
Create time: 2015-12-01 13:10:18.713
Last Poll time: 2015-12-01 13:10:18.713
----------Source Node--------
Nodeid: 2
----------Source Port--------
cdpcacheifindex: 9
cdpcachedeviceindex: 3
cdpinterfacename: GigabitEthernet0/1
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.42.10
cdpcacheversion: "Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE5, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-SW2.informatik.hs-fulda.de
cdpcachedeviceplatform: cisco WS-C2960-24TT-L
----------Remote Port--------
cdpcachedeviceport: FastEthernet0/1
----------cdp link --------
Create time: 2015-12-01 13:10:18.747
Last Poll time: 2015-12-01 13:10:18.747
----------Source Node--------
Nodeid: 2
----------Source Port--------
cdpcacheifindex: 10
cdpcachedeviceindex: 2
cdpinterfacename: GigabitEthernet0/2
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.23.10
cdpcacheversion: "Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE5, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-SW1.informatik.hs-fulda.de
cdpcachedeviceplatform: cisco WS-C2960-24TT-L
----------Remote Port--------
cdpcachedeviceport: FastEthernet0/2
----------cdp link --------
Create time: 2015-12-01 13:10:18.821
Last Poll time: 2015-12-01 13:10:18.821
----------Source Node--------
Nodeid: 3
----------Source Port--------
cdpcacheifindex: 2
cdpcachedeviceindex: 3
cdpinterfacename: GigabitEthernet0/0
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.76.6
cdpcacheversion: "Cisco IOS Software, C3750 Software (C3750-IPSERVICESK9-M), Version 12.2(55)SE9, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: netlabSW03.informatik.hs-fulda.de
cdpcachedeviceplatform: cisco WS-C3750G-24PS
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet2/0/18
----------cdp link --------
Create time: 2015-12-01 13:10:18.851
Last Poll time: 2015-12-01 13:10:18.851
----------Source Node--------
Nodeid: 3
----------Source Port--------
cdpcacheifindex: 3
cdpcachedeviceindex: 1
cdpinterfacename: GigabitEthernet0/1
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.3.1
cdpcacheversion: "Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.3(3)M2, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-R1.informatik.hs-fulda.de
cdpcachedeviceplatform: Cisco CISCO2911/K9
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet0/0
----------cdp link --------
Create time: 2015-12-01 13:10:18.881
Last Poll time: 2015-12-01 13:10:18.881
----------Source Node--------
Nodeid: 3
----------Source Port--------
cdpcacheifindex: 4
cdpcachedeviceindex: 4
cdpinterfacename: GigabitEthernet0/2
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.2.1
cdpcacheversion: "Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.3(3)M2, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-R2.informatik.hs-fulda.de
cdpcachedeviceplatform: Cisco CISCO2911/K9
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet0/0
----------cdp link --------
Create time: 2015-12-01 13:10:18.975
Last Poll time: 2015-12-01 13:10:18.975
----------Source Node--------
Nodeid: 4
----------Source Port--------
cdpcacheifindex: 10001
cdpcachedeviceindex: 1
cdpinterfacename: FastEthernet0/1
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.23.9
cdpcacheversion: "Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.3(3)M2, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-R1.informatik.hs-fulda.de
cdpcachedeviceplatform: Cisco CISCO2911/K9
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet0/1
----------cdp link --------
Create time: 2015-12-01 13:10:19.004
Last Poll time: 2015-12-01 13:10:19.004
----------Source Node--------
Nodeid: 4
----------Source Port--------
cdpcacheifindex: 10002
cdpcachedeviceindex: 2
cdpinterfacename: FastEthernet0/2
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.23.8
cdpcacheversion: "Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.3(3)M2, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-R2.informatik.hs-fulda.de
cdpcachedeviceplatform: Cisco CISCO2911/K9
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet0/2
----------cdp link --------
Create time: 2015-12-01 13:10:19.089
Last Poll time: 2015-12-01 13:10:19.089
----------Source Node--------
Nodeid: 5
----------Source Port--------
cdpcacheifindex: 10001
cdpcachedeviceindex: 2
cdpinterfacename: FastEthernet0/1
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.42.9
cdpcacheversion: "Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.3(3)M2, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-R2.informatik.hs-fulda.de
cdpcachedeviceplatform: Cisco CISCO2911/K9
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet0/1
----------cdp link --------
Create time: 2015-12-01 13:10:19.115
Last Poll time: 2015-12-01 13:10:19.115
----------Source Node--------
Nodeid: 5
----------Source Port--------
cdpcacheifindex: 10002
cdpcachedeviceindex: 1
cdpinterfacename: FastEthernet0/2
----------Rem Node--------
cdpcacheaddresstype: ip
cdpcacheaddress: 192.168.42.8
cdpcacheversion: "Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.3(3)M2, RELEASE SOFTWARE (fc1)
cdpcachedeviceid: NMM-R1.informatik.hs-fulda.de
cdpcachedeviceplatform: Cisco CISCO2911/K9
----------Remote Port--------
cdpcachedeviceport: GigabitEthernet0/2
So clearly the problem consists of having doubled the number of links.

Antonio Russo December 1, 2015 at 5:07 AM
I'm creating tests under foundation...
Details
Assignee
Antonio RussoAntonio RussoReporter
Ronny TrommerRonny TrommerComponents
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee

Reporter

Components
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

In the topology UI the CDP links are shown twice for each direction. The information gathered by enhanced linkd are correct persisted in the database. The .PNG shows the real topology. The xlsx file is a dump with the link data. It seems the Topology UI visualizes a link in both directions which is a weird unexpected behavior.
The CDP neighborhood data is not discovered correct. The correct topology verified with
show cdp neighbor
on the CLI is documented in cdp-test.png. The cdplink database dump in XLSX show the wrong detected links and interfaces. The comments show which should be the correct value in the link entry.As a network administrator I would like see one CDP link between nodes with the following information on local and remote endpoints:
local cdpinterfacename
local IP address if available
local interface speed if available
remote cdpcacheaddress
remote cdpcachedeviceplatform
remote cdpcachedeviceport
remote interface speed if available