Fing Usage

 

Configure the Network Discovery

Posted in Documentation

 

The network discovery provides a complete view of any network: fing engine automatically detects the underlying network type and uses the best technique to take the picture of the target network.

The best results are surely achieved on ethernet LAN’s (WiFi ones included), where fing can make use of the dedicated data-link layer discovery engine which is the faster one and the more accurate one also, as it’s able to detect all the hosts present in the network, super-firewalled ones included!

Discoveries performed on non-local networks (or non-ethernet networks) are handled by a network layer discovery engine, which relies on TCP/IP network layer, i.e. ICMP (ping) and TCP queries. When you start a discovery fing tells you the actual engine which is being used; in case of specific needs, it is possible to configure and tune each engine for optimal results, creating dedicated discovery profiles in the related configuration properties file: discovery.properties.

fing configuration files are all in the same format: properties format, i.e. a list of declarations like settings=value. Configuration files are placed in /etc/fing on Linux and Mac, while on Windows they are placed in your application data folder: %APPDATA%\Overlook\Fing\conf. On Windows you also have a shortcut to that folder in fing’s program files start menu.

When you start fing without arguments, it takes the nearest of your available networks and starts performing a discovery on it, reporting stuff directly on console. But you can perform discovery on any network, by providing your target network to fing in the command line:

fing -n 192.168.1.0/24 or fing -n www.overlooksoft.com/24

If you do not provide any output parameter, fing uses default ones (as specified in its fing.propertiesconfiguration file). But for a running discovery you can setup as many output formats as you need, by providing a command line argument like: fing -o setupFormat1 setupFormat2 … setupFormatN

The output format setup syntax is pretty simple: there are 2 main categories of output flows, table and log. The table flow produces a network table dump every time a discovery round is completed, while the log flow logs each network event as soon as it’s detected.

If you want to change the discovery round frequency, edit the related round.interval setting indiscovery.properties configuration file. Note that for each profile you declare you must provide both configurations for data-link and network layer discovery classes.

The log flow allows you to log network events in real-time, on the console itself or in a specific file. Currently there are two formats supported for log flows: text and CSV.E.g. to start fing producing textual log in console and a CSV log in a file:

fing -o log,text log,csv,my-network-log.csv

The table flow instead produces a network table view refreshed each time a discovery round finishes. The most popular formats are text and HTML but here it is the complete list: stext (short text for 80-columns console), text (plain text), htmlcsv, and xml. E.g. on Windows to make fing report network discovery to an HTML file on your desktop and also produce a short text console output both as table and log:

fing -o log,text table,stext table,html,"%USERPROFILE%\Desktop\network.html"

 

The network table report contains details for each host found in the network, and it’s refreshed in real-time at each round: IP address, MAC address, hostname and host friendly name. The latter is a friendly name you can associate to the hosts by means of the hosts.properties configuration file, where you are able to define your custom names for hosts (by IP address or MAC address) and for networks.

By default when you close fing the discovery session is lost, unless you want to save session data into a session file; in this case fing can be closed and restarted when you need, without losing any discovery session data. To exploit discovery session feature you have to simply provide fing the session file name to use. E.g. to make fing generate an HTML report and save session data in a folder named report:

fing -n 192.168.1.0/24 -o table,html,c:\report\lan.html --session c:\report\lansessiondata