EnLinkD IS-IS Link discovery fails on Cisco routers

Description

Hi,

This issue covers two issues regarding the new Enhanced Linkd and IS-IS link discovery. In short, it doesn't work with any cisco router I've been able to test. This is due to two different issues:

Cisco IOS does not support the IS-IS MIB (under .1.3.6.1.2.1.138), and in fact returns something unrelated here if you walk this. In fact, IOS claims to support the much different CISCO-IETF-ISIS-MIB, although support for this seems a bit lacking in some areas.

The Cisco IOS-XR problem is much more interesting:
Apparently Cisco IOS-XR (as tested on several ASR9000-routers), do respond to the OID, so Enlinkd tries to get the links, however one behaviour is bugged. When you send a SNMP GetBulk request with OID 1.3.6.1.2.1.138.1.3.1 to the router, it repeats the results until the configured max repetition is reached. This causes the following exception:

2014-08-27 08:58:16,744 INFO [Scheduler-Thread-3-of-5] o.o.n.e.NodeDiscoveryIsis: run:Aborting Is-Is Linkd node scan : Agent failed while scanning the isisCircTable table: Unexpected error occurred processing isisCircTable for /93.176.90.7: java.lang.NullPointerException

It happens in the following code block:

opennms-services/src/main/java/org/opennms/netmgt/enlinkd/snmp/IsisCircTableTracker.java

//Line 95 public IsIsLink getIsisLink() { LOG.info( "getIsisLink: row count: {}", getColumnCount()); IsIsLink link = new IsIsLink(); link.setIsisCircIndex(getIsisCircIndex()); LOG.info( "getIsisLink: IS-IS Circ Index: {}", link.getIsisCircIndex()); link.setIsisCircIfIndex(getIsisCircIfIndex()); LOG.info( "getIsisLink: IS-IS Circ If Index: {}", link.getIsisCircIfIndex()); link.setIsisCircAdminState(IsisAdminState.get(getIsisCircAdminState())); LOG.info( "getIsisLink: IS-IS Circ Admin State: {}", IsisAdminState.getTypeString(getIsisCircAdminState())); return link; } }

Now the part of the code that seems to generate the nullpointer exception is link.setIsisCircIfIndex(getIsisCircIfIndex()); and my theory is that it is because of the misbehaving GetBulk where only one row should be returned, yet since the grandfather class has a default setMaxRepetitions value of 2, it will fail.

However, I have tried to manually set it with setMaxRepetitions(1); in the constructors in the code, but that didn't fix the problem. I'm no java coder, so it might just be because of this.

I have also been in contact with Cisco TAC to hear their opinion about this, and they claim that the ISISMIB OID is unsupported in IOS-XR, so the correct way of using IS-IS to detect link adjacencies on a cisco platform may be to use different MIBs entirely (Juniper JUNOS supports this MIB fine though...)

Environment

Cisco IOS-XR any version. Cisco IOS any version.

Acceptance / Success Criteria

None

Attachments

1
  • 28 Aug 2014, 07:33 AM

Lucidchart Diagrams

Activity

Antonio Russo March 25, 2015 at 8:49 AM

Merged

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git merge features/foundation-enlinkd
Merge made by the 'recursive' strategy.
opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms6801EnTest.java | 124 ++
opennms-services/src/test/java/org/opennms/netmgt/nb/Nms6802NetworkBuilder.java | 57 +
opennms-services/src/test/java/org/opennms/netmgt/nb/NmsNetworkBuilder.java | 16 +
opennms-services/src/test/resources/linkd/nms6802/cisco-ios-xr-walk.txt | 5723 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 5920 insertionsPlus
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms6801EnTest.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/nb/Nms6802NetworkBuilder.java
create mode 100644 opennms-services/src/test/resources/linkd/nms6802/cisco-ios-xr-walk.txt
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 304 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
2524242..3528b4b foundation -> foundation

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git checkout release-15.0.2
Checking out files: 100% (1427/1427), done.
Switched to branch 'release-15.0.2'
Your branch is up-to-date with 'origin/release-15.0.2'.
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git merge features/15.0.2-enlinkd
Merge made by the 'recursive' strategy.
opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms6801EnTest.java | 124 ++
opennms-services/src/test/java/org/opennms/netmgt/nb/Nms6802NetworkBuilder.java | 57 +
opennms-services/src/test/java/org/opennms/netmgt/nb/NmsNetworkBuilder.java | 16 +
opennms-services/src/test/resources/linkd/nms6802/cisco-ios-xr-walk.txt | 5723 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 5920 insertionsPlus
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms6801EnTest.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/nb/Nms6802NetworkBuilder.java
create mode 100644 opennms-services/src/test/resources/linkd/nms6802/cisco-ios-xr-walk.txt
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 309 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
75f0c41..f48f276 release-15.0.2 -> release-15.0.2

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git checkout develop
Checking out files: 100% (1703/1703), done.
Switched to branch 'develop'
Your branch is up-to-date with 'origin/develop'.
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git merge features/16.0-enlinkd
Merge made by the 'recursive' strategy.
opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms6801EnTest.java | 124 ++
opennms-services/src/test/java/org/opennms/netmgt/nb/Nms6802NetworkBuilder.java | 57 +
opennms-services/src/test/java/org/opennms/netmgt/nb/NmsNetworkBuilder.java | 16 +
opennms-services/src/test/resources/linkd/nms6802/cisco-ios-xr-walk.txt | 5723 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 5920 insertionsPlus
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms6801EnTest.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/nb/Nms6802NetworkBuilder.java
create mode 100644 opennms-services/src/test/resources/linkd/nms6802/cisco-ios-xr-walk.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: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 304 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
d8639b3..375e6f8 develop -> develop

Antonio Russo March 24, 2015 at 2:11 PM

I set up the test and is running without error. So I guess the problem is related to timeout or erron in community string.

Fixed in features/16.0-enlinkd
Cherry-picked to features/15.0.2-enlinkd and features/foundation-enlinkd

commit c5938a85c5055f2ba15d30d3ae9bff1384bdf740
Author: Antonio <rssntn67@yahoo.it>
Date: Tue Mar 24 19:05:51 2015 +0100

Fix https://opennms.atlassian.net/browse/NMS-6802#icft=NMS-6802: ISIS link fails on Cisco

Created a test with produced walk.

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 111, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (18/18), 41.22 KiB | 0 bytes/s, done.
Total 18 (delta 9), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
caca97e..c5938a8 features/16.0-enlinkd -> features/16.0-enlinkd

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git checkout features/15.0.2-enlinkd
Checking out files: 100% (1702/1702), done.
Switched to branch 'features/15.0.2-enlinkd'
Your branch is up-to-date with 'origin/features/15.0.2-enlinkd'.
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git cherry-pick c5938a85c5055f2ba15d30d3ae9bff1384bdf740
[features/15.0.2-enlinkd 90c3112] Fix https://opennms.atlassian.net/browse/NMS-6802#icft=NMS-6802: ISIS link fails on Cisco
4 files changed, 5920 insertionsPlus
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms6801EnTest.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/nb/Nms6802NetworkBuilder.java
create mode 100644 opennms-services/src/test/resources/linkd/nms6802/cisco-ios-xr-walk.txt
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 100, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (11/11), 922 bytes | 0 bytes/s, done.
Total 11 (delta 6), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
688de1a..90c3112 features/15.0.2-enlinkd -> features/15.0.2-enlinkd

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git checkout features/foundation-enlinkd
Checking out files: 100% (1426/1426), done.
Switched to branch 'features/foundation-enlinkd'
Your branch is up-to-date with 'origin/features/foundation-enlinkd'.
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git cherry-pick c5938a85c5055f2ba15d30d3ae9bff1384bdf740
[features/foundation-enlinkd 3254457] Fix https://opennms.atlassian.net/browse/NMS-6802#icft=NMS-6802: ISIS link fails on Cisco
4 files changed, 5920 insertionsPlus
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms6801EnTest.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/nb/Nms6802NetworkBuilder.java
create mode 100644 opennms-services/src/test/resources/linkd/nms6802/cisco-ios-xr-walk.txt
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 98, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (10/10), 828 bytes | 0 bytes/s, done.
Total 10 (delta 5), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
62f404d..3254457 features/foundation-enlinkd -> features/foundation-enlinkd

Allan Eising September 15, 2014 at 10:48 AM

Yeah, well, Cisco got back to me and told me they haven't updated their SNMP docs for a while, so it may be supported after all. It's also now an official IOS-XR bug to be addressed in future software versions (I hope).

Antonio Russo September 12, 2014 at 3:51 AM

Allan, it is strange that cisco tells that they do not support ISIS-MIB, the attache walk contains all the relevant mib data. I found that there are 4 IS-IS links.
So I have to create a test to check what is going on. Thanks for sharing this.

Allan Eising August 28, 2014 at 7:33 AM

Hi Antonio,

I've attached the first walk. The other OID is not available, says the device.

/Allan

Fixed

Details

Assignee

Reporter

Affects versions

Priority

PagerDuty

Created August 27, 2014 at 3:34 AM
Updated April 7, 2015 at 3:06 PM
Resolved March 25, 2015 at 8:49 AM

Flag notifications