Built-in Ping Sweep Autodiscovery
The Ping Sweep Auto-discovery performs a series of pings against the specified network(s), performing a quick intial discovery of which IPs are alive [respond to pings], and which are not.
Continue reading to learn how to use the ping sweep that is built-in to Device42’s main UI, or if you’d prefer an external / standalone utility, simply scroll down to the External Ping Sweep Utility’s section!
The built-in Ping Sweep utility is available in the Device42 menu: Tools>>Auto-Discovery>>Ping Sweep.
Adding a New Ping Sweep Auto-discovery
![Add a Ping Sweep Autodiscovery](/media/images/autodiscovery/ping-sweep/autodiscovery add new ping sweep v15.png)
- Enter a name for the job, and specify your target Network(s) in the “Networks:” field.
- 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 via commas, spaces, or new lines.
- If you want to use reverse DNS as device names, you can select that check box; default is unchecked (we recommend leaving it unchecked to avoid creation of duplicate devices!).
- An option to strip domain name suffix is also available.
- Configure your schedule, if desired, and/or save and kick off the job.
Using the External Ping Sweep Utility
The External Ping Sweep utility is a standalone tool that will do a ping sweep on specfied networks, and upload the results to the Device42 appliance.
It runs on windows or linux platforms and has no external dependencies.
Download and install:
Once you download the zip file from https://www.device42.com/autodiscovery/, you will see 3 files:
For windows, you need the .exe, and for Linux, you’ll need to set the *_linux file as executable. Do this by setting it to executable mode using chmod +x.
Copy or move ping.cfg.sample to ping.cfg and add your settings as described below.
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, as should also see new and/or updated Subnet / IP information within Device42.
Uploaded data in Device42 appliance.
- In the [Settings] section, enter the URL (FQDN or IP) for the Device42 appliance on your network, including credentials. Make sure the credentials have the required access permissions!
- 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 via spaces.
- The [Options] section provides the following options, which have explanations on the line above them.
Explanation: option_name = default value
- Try to get MAC address for found IP: get_mac_address = True
- Try to get hostname for found IP via DNS (if multiple domains using the
same IP, only first will be used): get_hostname = True
- Number of ping threads: threads = 128
- Timeout for each ping: timeout = 2000
- Number of retries (better to keep it higher than 2): retries = 3
- Print all found IPs: print_ips = False
- Print all debug messages: debug = False
Running and scheduling
You can start the process by running the executable from the command line. Root or Administrator privileges required. You can also schedule to run this using operating system task scheduler (like crontab or at)
General Ping Sweep Usage Considerations
Please make sure to add the respective subnets in device42 before discovering and uploading IP information, otherwise all IPs will go to an “undefined” subnet.
- MAC address discovery works only for local LANs.
- If reverse DNS option is selected, discovery takes longer.
- Depending on network devices, some subnet IP show up as used. e.g. a network behind a load balancer, where load balancer would reply to ping for any IP in that range.
- Doing a discovery using wireless card would only find itself.
- Please note that there exists both a built-in and an external version of the tool that runs as a standalone Windows application.