I was working with support to create a custom report that queries the NCM Route Table so I can report on a few routers and the routes they advertise. I was given this statement but then told to contact THWACK for further assistance.
I am needing to EXCLUDE RFC 1918 IP space from this report. Can someone help me with that? I tried 10.% and that did not work. I am not an SQL guy. Its the very last line
where NcmRouteTable.destination not in ('10.10.0.0','10.11.0.0','add-more destination ip here') and OrionNodes.Caption Like '%INET-RT1'
thanks!
SELECT OrionNodes.Caption, OrionNodes.DetailsUrl, OrionNodes.Status, OrionNodes.ChildStatus,
NcmInterfaces.InterfaceName, NcmInterfaces.InterfaceDescription, NcmInterfaces.InterfaceIndex, NcmRouteTable.Destination, NcmRouteTable.Mask,
NcmRouteTable.NextHop,NcmRouteTable.RouteType,NcmRouteTable.RouteProtocol,NcmRouteTable.Metric1, NcmRouteTable.Metric2
FROM NCM.NodeProperties AS NcmNodeProperties
INNER JOIN Orion.Nodes AS OrionNodes ON NcmNodeProperties.CoreNodeID=OrionNodes.NodeID
INNER JOIN NCM.RouteTable AS NcmRouteTable ON NcmNodeProperties.NodeID=NcmRouteTable.NodeID
LEFT JOIN NCM.Interfaces AS NcmInterfaces ON NcmRouteTable.InterfaceID=NcmInterfaces.InterfaceID
where NcmRouteTable.destination not in ('10.10.0.0','10.11.0.0','add-more destination ip here') and OrionNodes.Caption Like '%INET-RT1'