NetXMS Support Forum

English Support => General Support => Topic started by: ChrisC on September 15, 2021, 07:23:20 PM

Title: How to stop secondary interfaces showing up on L3 Map
Post by: ChrisC on September 15, 2021, 07:23:20 PM
I have a Cisco switch that has an interface (vlan) with two IP addresses attached.
2 Objects show up in the device tree after auto discovery, and even though I have set the object with the secondary IP to unmanaged, and deleted it from the L3 map, it keeps popping back up and makes the diagram confusing.
Of course just deleting the object itself means it will turn up again as managed after the next auto discovery.

How can I stop this from happening while keeping the L3 map dynamic?
Can I use an object filter and exclude the secondary IP somehow? To be honest, I would prefer if the object doesn't show up in the device tree at all, while keeping auto discovery enabled.

Thanks,
Title: Re: How to stop secondary interfaces showing up on L3 Map
Post by: Victor Kirhenshtein on September 16, 2021, 04:04:30 PM
Hi,

does NetXMS server has SNMP access to this Cisco device? Because normally it should read all configured addresses via SNMP and not attempt to create separate nodes for each known IP address.

If for some reason device is not accessible via SNMP, you can block secondary address in discovery filter. You can set discovery filter to script, and use script like this:

if ($node->ipAddr == "1.2.3.4")
   return false;
return true;


you can also use hook script Hook::AcceptNewNode for this, just add the following line to it:


return $ipAddr != "1.2.3.4";


(of course replace 1.2.3.4 with actual IP address).

Best regards,
Victor
Title: Re: How to stop secondary interfaces showing up on L3 Map
Post by: ChrisC on September 16, 2021, 06:01:50 PM
Hi Victor,
Thank you for the reply.
Yes, NetXMS is polling the device via SNMP without problems, so on both instances the device is listing all the interfaces, so it was surprising to me too!
Title: Re: How to stop secondary interfaces showing up on L3 Map
Post by: ChrisC on September 21, 2021, 11:47:14 AM
I have added the following (just in case I need to add more IPs) to Hook::AcceptNewNode and it is working.


switch ($ipAddr)
{
case "1.2.3.4":
return false;
default:
return true;
}


Thanks!