I'm attempting to get the port and switch for some IP Addresses that are connected and in use. We have the Switch Port Mapping Tool - Switch Port Checker | SolarWinds searching for an IP via the web interface, I can get the switch and port information, but when I attempt to get the same with SWQL, I haven't had any luck. Can anyone provide some advice as to which tables this uses?
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.