Adjusting performance parameters
Nmap not only adjusts itself to different network and target conditions while scanning, but it also supports several parameters that affect the behavior of Nmap, such as the number of hosts scanned concurrently, the number of retries, and the number of allowed probes. Learning how to adjust these parameters properly can reduce a lot of your scanning time.
This recipe explains the Nmap parameters that can be adjusted to improve performance.
How to do it...
Enter the following command, adjusting the values for your target and network conditions:
$ nmap --min-hostgroup 100 --max-hostgroup 500 --max-retries 2 <target>
How it works...
The command shown previously tells Nmap to scan and report by grouping no less than 100 (--min-hostgroup 100
) and no more than 500 hosts (--max-hostgroup 500
). It also tells Nmap to retry only twice before giving up on any port (--max-retries 2
):
# nmap --min-hostgroup 100 --max-hostgroup 500 --max...