Ping Sweep


Built-in Ping Sweep Autodiscovery

Select Discovery > Ping Sweep from the Device42 main menu to display the view Ping Sweep page.

Device42’s Ping Sweep autodiscovery performs a series of pings against the specified network(s), performing a quick initial discovery of which IPs are live (respond to pings) and which are not.

For the time being, an external stand-alone Ping Sweep utility is also still available (may be deprecated in the future). Scroll to the Using the External Ping Sweep Utility section below for information on using the stand-alone tool.

Adding a New Ping Sweep Autodiscovery

Click Add Ping Sweep on the view Ping Sweep page. To edit an existing job, click its name to display its details, and then click Edit.

  1. Enter a name for the job, and specify your target network(s) in the Networks: field.
  2. Enter a network range using mask bits in slash notation or hyphenated IP ranges (nmap-style syntax). Examples: 192.168.11.0/24 (slash notation), 192.168.11.1-254 (hyphenated range):
    • Multiple ranges can be separated via commas, spaces, or new lines.
    • If you want to use reverse DNS values as device names, select the Add devices by reverse DNS of discovered IP check box. (The default is unchecked – we recommend leaving it unchecked unless your DNS is perfect to avoid creation of duplicate devices.)
    • Other options include Strip domain name suffix and an option to Create new subnet for networks not found.
  3. Configure a schedule for the job in the Auto Discovery Schedule section, and then save the job. You can select Run Now in the Ping Sweep jobs list to run the job right away.

Viewing Ping Sweep Data in Device42

Select Network > IP Addresses from the Device42 menu to display the IP Address list page.

Uploaded data in Device42 appliance.

General Ping Sweep Usage Considerations

Please make sure to add the respective subnets in Device42 before discovering and uploading IP informationotherwise all IPs will go to an “undefined” subnet.

Other Ping Sweep considerations and best practices:

  • MAC address discovery works only for local LANs.
  • If the reverse DNS option is selected, discovery will take longer.
  • Depending on the behavior of your network devices, some subnets / IP addresses will show up as used. For example, some networks that live behind load balancers, as some LBs will reply to pings for every IP on a given range.
  • Doing a discovery using a wireless card would only discover itself.
  • Please note that there are both a built-in Ping Sweep tool and a stand-alone external version of the tool (see the following section) that runs as a stand-alone Windows application.

Using the External Ping Sweep Utility

The External Ping Sweep utility is a stand-alone tool that will do a ping sweep on specified networks, and upload the results to the Device42 appliance. It runs on Windows or Linux platforms and has no external dependencies.

External Ping Sweep Tool

Download and Install

  1. Download the ping sweep .zip file from https://www.device42.com/autodiscovery/.
  2. Unzip the downloaded d42-ping-sweep .zip  – you’ll see 4 files:
    • d42_pingsweep_windows.exe
    • d42_pingsweep_linux
    • ping.cfg.sample
    • version.txt
  3. For Windows, you’ll need to download the .exe. On Linux, you’ll need to set the *_linux file to executable. Do this by setting the executable bit via $ chmod +x.
  4. Copy or move ping.cfg.sample to ping.cfg and add your settings as described below.
  5. Run the appropriate Windows .exe or Linux executable. You’re all set!

Configuring Ping Sweep Settings

Use the ping.cfg file to select your settings.

  1. In the [settings] section, enter the base URL (FQDN or IP) for the Device42 appliance on your network, including credentials. Make sure the credentials have the required access permissions.
  2. In the [targets] section, enter a network range using mask bits or you can use hyphen ranges (per nmap syntax).
    Examples: 192.168.11.0/24 for subnet range or 192.168.11.1-254 (for hyphenated range). Multiple ranges can be separated by spaces.
  3. The [0ptions] section provides the following options, with explanations and examples.

option_name: explanation = default value

  • get_mac_address: Try to get MAC address for found IP = False
  • get_hostname: Try to get hostname for found IP via DNS (if there are multiple domains using the
    same IP, only the first is used) = False
  • threads: Number of ping threads = 128
  • timeout: Timeout for each ping = 2000
  • retries: Number of retries (better to keep it greater than 2) = 4
  • print_ips: Print all found IPs = False
  • debug: Print all debug messages = False
  • nameservers: Custom nameservers = 8.8.8.8,8.8.4.4

4. The [discovery_options] section provides the following options, with explanations and examples.

option_name: explanation = default value

  • strip_domain_suffix: Strip everything after first dot = False
  • category: Category for discovered subnets = String
  • create_new_subnet: New subnet for networks not found = False
  • overwrite_subnet_categories: Overwrite existing subnet categories = False
  • vrfgroup: VRF group for discovered subnets = String
  • type: Static/DHCP/Reserved = String

Running and Scheduling Ping Sweep jobs

You can start the process by running the executable from the command line – root or administrator privileges required. You can also schedule runs this using operating system task scheduler (like crontab or at).

During / After an External Ping Sweep

You’ll see a command prompt after you launch the ping sweep. When completed, the Status will change to Finished. If successful, you will see Success messages in the status box, and also see new and updated subnet/IP information within Device42.