Skip to main content

It may be useful to compare the output of a traceroute against the Path Search output from Forward Networks.

The following NQE query takes a list of IP addresses as a parameter, and returns a list of devices based on interface IPs.

This query could be used while onboarding sources into Forward Networks. If there is no device entry for an interface IP address from this NQE, it could mean that the device with that IP address needs to be added to the collection (to Sources).

If there is overlapping IP space in the network - for example, if private IP space for network interface IPs at difference locations is the same - this query will return ALL the devices with a given interface IP.

Note that Forward Networks’ Path Search is superior to traceroute in that Path Search will shows layer-2 hops and cloud network objects that don’t respond to traceroute. 

import "@fwd/Interfaces/Interface IPs";

deviceIps =
foreach device in network.devices
select {
device: device.name,
ips: (foreach record in getAllIfaceSubnetsWithName(device)
select address(record.subnet))
};

@query
getDeviceNamesByIps(ipList: List<IpAddress>) =
foreach ip in ipList
let devs = (foreach deviceIpsRecord in deviceIps
where ip in deviceIpsRecord.ips
select deviceIpsRecord.device)
select { Devices: devs, IP: ip };

 

Be the first to reply!

Reply