When performing network topology on the switch, the results of lldp and fdb are obtained at the same time, resulting in a conflict and failure to establish the peernode. In the following log record, I found that two record is
2024.10.16 23:13:55.965 *D* [topology.link ] LinkLayerNeighbors::isDuplicate: inconsistent data: FDB(ifLocal=2 remote=76050/5) FDB(ifLocal=41 remote=76040/5)
2024.10.16 23:13:55.965 *D* [topology.link ] LinkLayerNeighbors::isDuplicate: inconsistent data: FDB(ifLocal=2 remote=76050/5) FDB(ifLocal=42 remote=76048/5)
As a result, I was supposed to find 5 but then I only found 2.
The netxms I use is 5.0.8 and the switch is dlink dgs-1510-52 Other switches of the same type Also having the same issue. The switches are connected to computers and operating systems with the same hardware specifications.I would like to ask what is the reason for this result, which makes me very confused. I've found that this issue may not be limited to a certain type of network switch.2024.10.16 23:13:51.088 *D* [topology.fdb ] GetSwitchForwardingDatabase(sw-203-dlink [47278]): 165 entries read from dot1qTpFdbTable
2024.10.16 23:13:51.177 *D* [topology.fdb ] GetSwitchForwardingDatabase(sw-203-dlink [47278]): 0 entries read from dot1dTpFdbTable
2024.10.16 23:13:51.177 *D* [poll.topology ] Switch forwarding database retrieved for node sw-203-dlink [47278]
2024.10.16 23:13:51.177 *D* [topology.link ] BuildLinkLayerNeighborList(sw-203-dlink [47278]): building link level topology
2024.10.16 23:13:51.177 *D* [topology.driver ] Collecting topology information from driver DLINK for node sw-203-dlink [47278]
2024.10.16 23:13:51.177 *D* [topology.driver ] Driver for node sw-203-dlink [47278] cannot provide link layer topology information
2024.10.16 23:13:51.177 *D* [topology.lldp ] Collecting LLDP topology information for node sw-203-dlink [47278]
2024.10.16 23:13:55.690 *D* [topology.lldp ] 5 entries in LLDP-MIB connection database for node sw-203-dlink [47278]
2024.10.16 23:13:55.690 *D* [topology.lldp ] Finished collecting LLDP topology information for node sw-203-dlink [47278]
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): FDB retrieved
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): found single MAC A0:36:BC:5B:19:A7 on interface eth1/0/2
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): found remote interface ethernet 2 [76051]
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): found single MAC A0:36:BC:5B:18:1C on interface eth1/0/3
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): found remote interface ethernet [75986]
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): found single MAC A0:36:BC:5B:18:D9 on interface eth1/0/41
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): found remote interface ethernet 2 [76041]
2024.10.16 23:13:55.965 *D* [topology.link ] LinkLayerNeighbors::isDuplicate: inconsistent data: FDB(ifLocal=2 remote=76050/5) FDB(ifLocal=41 remote=76040/5)
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): found single MAC A0:36:BC:5B:1A:E0 on interface eth1/0/42
2024.10.16 23:13:55.965 *D* [poll.topology ] Node::addHostConnections(sw-203-dlink [47278]): found remote interface ethernet 2 [76049]
2024.10.16 23:13:55.965 *D* [topology.link ] LinkLayerNeighbors::isDuplicate: inconsistent data: FDB(ifLocal=2 remote=76050/5) FDB(ifLocal=42 remote=76048/5)
2024.10.16 23:13:55.965 *D* [topology.link ] BuildLinkLayerNeighborList(sw-203-dlink [47278]): 2 connections found
nodeid 76050 have a interface(objectId=76051) ifindex=5 mac address A0:36:BC:5B:19:A7 is physical link on the sw-203-dlink(dgs-1510-52) switch eth1/0/2
nodeid 76040 have a interface(objectId=76041) ifindex=5 mac address A0:36:BC:5B:18:D9 is physical link on the sw-203-dlink(dgs-1510-52) switch eth1/0/41
nodeid 76048 have a interface(objectId=76049) ifindex=5 mac address A0:36:BC:5B:1A:E0 is physical link on the sw-203-dlink(dgs-1510-52) switch eth1/0/42
my nodeid 76050 76040 76048 's operation The operating systems are completely cloned. Only the hardware information is slightly different, such as the network card mac address and ip.
in netxms i use topology sw-203-dlink switch forwarding database list result ,It is also consistent with the actual interface between the computer and the switch.
so i search in source code
In lln.cpp I find I saw the relevant code below
Also, I have also directly queried the lldp of the switch and I get this result
Name/OID: .1.0.8802.1.1.2.1.4.1.1.7.306145956.42.9; Value (OctetString): A0-36-BC-5B-1A-E0
Name/OID: .1.0.8802.1.1.2.1.4.1.1.7.306145970.41.17; Value (OctetString): A0-36-BC-5B-18-D9
Name/OID: .1.0.8802.1.1.2.1.4.1.1.7.306146123.2.15; Value (OctetString): A0-36-BC-5B-19-A7
The information on lldp also confirms that the node is on the correct interface.
so,Is it possible that some misjudgment or mistake occurred here?
/**
* Check if given information is duplicate
*/
bool LinkLayerNeighbors::isDuplicate(const LL_NEIGHBOR_INFO& info)
{
for(int i = 0; i < m_connections.size(); i++)
{
LL_NEIGHBOR_INFO *n = m_connections.get(i);
if (n->ifLocal == info.ifLocal)
{
if ((n->ifRemote != info.ifRemote) || (n->objectId != info.objectId))
{
nxlog_debug_tag(DEBUG_TAG_TOPO_LINK, 5, _T("LinkLayerNeighbors::isDuplicate: inconsistent data: %s(ifLocal=%d remote=%d/%d) %s(ifLocal=%d remote=%d/%d)"),
GetLinkLayerProtocolName(n->protocol), n->ifLocal, n->objectId, n->ifRemote,
GetLinkLayerProtocolName(info.protocol), info.ifLocal, info.objectId, info.ifRemote);
}
return true;
}
if (n->ifRemote == info.ifRemote)
{
if ((n->ifLocal != info.ifLocal) || (n->objectId != info.objectId))
{
nxlog_debug_tag(DEBUG_TAG_TOPO_LINK, 5, _T("LinkLayerNeighbors::isDuplicate: inconsistent data: %s(ifLocal=%d remote=%d/%d) %s(ifLocal=%d remote=%d/%d)"),
GetLinkLayerProtocolName(n->protocol), n->ifLocal, n->objectId, n->ifRemote,
GetLinkLayerProtocolName(info.protocol), info.ifLocal, info.objectId, info.ifRemote);
}
return true;
}
}
return false;
}