Quantcast
Channel: THWACK: Message List - Network Configuration Manager
Viewing all articles
Browse latest Browse all 8827

Re: NCM help with duplicate IP in a router config?

$
0
0

Ok, I actually have this set up as a resource on a page that I have for looking for unusual things.   For this to work, the IP would actually have to be "active", ie: not on a shutdown interface I believe.  You don't need NCM to do it either, it relies on NPM's discovery of a device.   This is a bit rough as I only use it myself (ie: don't publish it to other users on our system) and you WILL see duplicates.  That's because you will see it from the perspective of both Node1 having a duplicate IP with Node2, as well as the reverse, Node2 having a duplicate IP with Node1.   Haven't figured out a way to get rid of that yet easily.   The stuff in the WHERE clause is where I weed out some nodes that I know will have duplicate IP's, like our Riverbeds and such because of the use of internal IP's that are the same on every device, or how all our cisco ASA failover clusters use the same IP's for the link between them rather than unique ones.    You can remove this WHERE clause or customize it to your own network as needed.

 

SELECT I.NodeID, I2.NodeID, I.IPAddress, N.Caption AS Node1, N.DetailsURL AS [_LinkFor_Node1],  I2.IPAddress, N2.Caption AS Node2, N2.DetailsURL AS [_LinkFor_Node2]

FROM Orion.NodeIPAddresses I JOIN Orion.NodeIPAddresses I2 ON ((I.IPAddress = I2.IPAddress) AND NOT (I.NodeID = I2.NodeID))

  JOIN Orion.Nodes N ON (I.NodeID = N.NodeID)

  JOIN Orion.Nodes N2 ON (I2.NodeID = N2.NodeID)

WHERE (NOT(Node1 LIKE '%ASA%') AND NOT(Node2 LIKE '%ASA%'))

   AND (NOT(Node1 LIKE '%RVB%') AND NOT(Node2 LIKE '%RVB%'))

ORDER BY I.IPAddress

 

To add this, create or go to the View on which you want to see it on.  I created a new view for mine, but you can put it anywhere.   Once there, click on "Customize Page" and click on the green "+" sign to add a new resource to a column.    Choose "Custom Query" as the type of resource, and click on  "Preview".  You should see the "Custom Query" resource, click on the "Edit" button to edit the resource.  Set the Title to what you want, maybe "Duplicate IP's", and in the Custom SWQL query box paste it in.  I recommend setting the "Number of Rows per Page" to maybe 50 or so?


Viewing all articles
Browse latest Browse all 8827

Trending Articles