Link discovery gets confused by Cisco HSRP Mac Addresses

Description

We are using Cisco HSRP (Hot Standby Router Protcol) in several parts of our network. The MAC addresses used by HSRP are not unique. So the same addresses occure on several devices with different MAC address to IP address mappings. This serverely confuses Link Discovery. Suggested solution is to exclude the HSRP MAC address range from Link Discovery. The following patch does that:

— DiscoveryLink.java.orig Tue Jan 5 18:50:29 2010
+++ DiscoveryLink.java Tue Feb 23 22:38:55 2010
@@ -241,6 +241,14 @@
macsExcluded.add(macAddress);
continue;
}
+ if (macAddress.indexOf("00000c07ac") == 0) {
+ log()
+ .info("run: at interface "
+ + macAddress
+ + " is cisco hsrp address! Not adding to discoverable atinterface.");
+ macsExcluded.add(macAddress);
+ continue;
+ }
List<AtInterface> ats = macToAtinterface.get(macAddress);
if (ats == null) ats = new ArrayList<AtInterface>();
if (log().isInfoEnabled())

Environment

Operating System: All Platform: All

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Seth Leger November 22, 2011 at 10:31 AM

I added this one-line patch to the 1.10 branch so that both HSRP MAC addresses are checked. Marking as fixed.

commit 8be2e7b1a876a69db93e8679aee98a5c6e16437e

Dan Bruhn November 21, 2011 at 10:10 AM

If I am not mistaken the MAC addresses for HSRP version 2 should also be included.

See the following link for details: http://www.cisco.com/en/US/tech/tk648/tk362/technologies_q_and_a_item09186a00800a9679.shtml

Suggested patch

— DiscoveryLink.java.org 2011-11-21 16:00:20.870768221 +0100
+++ DiscoveryLink.java 2011-11-18 08:32:09.000000000 +0100
@@ -667,7 +667,7 @@
macsExcluded.add(macAddress);
continue;
}

  • if (macAddress.indexOf("00000c07ac") == 0) {
    + if ( (macAddress.indexOf("00000c07ac") == 0) || (macAddress.indexOf("00000c9ff") == 0) ) {
    LogUtils.infof(this, "populateMacToAtInterface: AtInterface %s is Cisco HSRP address! Not adding to discoverable atinterface.", macAddress);
    macsExcluded.add(macAddress);
    continue;

Former user April 11, 2010 at 11:14 AM

Resolved in master:

commit c7b34ee58f7c446dce71ea843b96dcf9b424210b
Author: Antonio <rssntn67@yahoo.it>
Date: Sun Apr 11 17:11:59 2010 +0200

Fixed : Linkd is gets confused by HSRP cisco mac addresses

Added a control that excludes the HSRP reserved addresses from being parsed
by the DiscoveryLink (Thanks to Juergen Weiss)

Juergen Weiss March 31, 2010 at 4:27 AM

(In reply to comment #1)
> Do you have any references were I can be sure that such addresses are reserved?
> I can commit the changes weekly after you send me this reference!

RFC2281 - Cisco Hot Standby Router Protocol (HSRP) Section 6.1 or
the following cisco document describe the mac addresses used by HSRP:

http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094a91.shtml#hrspadd

Former user March 30, 2010 at 12:55 PM

Do you have any references were I can be sure that such addresses are reserved?

I can commit the changes weekly after you send me this reference!

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created February 28, 2010 at 5:21 PM
Updated January 27, 2017 at 4:25 PM
Resolved November 22, 2011 at 10:31 AM