Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

Find port and switch for a given IPAddress

$
0
0

I'm attempting to get the port and switch for some IP Addresses that are connected and in use.  I've attempted a couple of different ways, but haven't had any luck.  Can anyone provide some advice?

 

Raw non UDT based.

SELECT P.PortID      , P.IfIndex      , P.VlanId      , P.PortType     , p.Description     , N.IPAddress     , N.DisplayName
FROM Orion.NodePortInterfaceMap AS P
JOIN Orion.Nodes AS N ON N.NodeID = P.NodeId
WHERE N.IPAddress = '#.#.#.#' -- with a real IP Address

 

UDT based.

SELECT N.DisplayName     , N.IPAddress     , P.PortDescription     , P.PortIndex
FROM Orion.Nodes N
INNER JOIN Orion.UDT.Port AS P on P.NodeID=N.NodeID 
WHERE N.IPAddress = '#.#.#.#' -- with a real IP Address

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 2677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>