Why can -T5 or a high --min-rate cost accuracy in Nmap 7.991, and what do you do when two scan runs disagree?
answer
- a late reply counts as no reply
- short timers, few retransmissions
- a floor on rate, not a ceiling
- faster can end up slower
- rerun the disagreeing ports calmly
basics
~20 s-T5 shortens round-trip timeouts to 300 ms and allows only two retransmissions, so slow or lost replies are read as silence. A high --min-rate can do the same through congestion. Treat disagreeing ports as unproven and rescan them at default timing.
solid answer
~40 s`-T5` assumes an extraordinarily fast, reliable network. It caps the RTT timeout at 300 ms, allows two retransmissions, ends a host after 15 minutes, and keeps the TCP scan delay at or below 5 ms. On a congested, distant or rate-limited path a late or dropped reply becomes silence, and silence is reported as `filtered` or a missed host. `--min-rate` is a floor on packets per second: faster than the network supports, it causes loss, Nmap's adaptive retransmission sends more packets, and the scan can take longer. When two runs disagree, trust neither blindly; rescan only the differing ports at `-T3` with `--reason` and compare.
go deeper
Recall that -T5 and high rates can lose accuracy, and that the reference guide recommends -T4 on a reliable network.
Explain the mechanism: a 300 ms RTT cap and two retransmissions turn slow replies into silence, and --min-rate is a floor, not a ceiling.
Reconcile disagreeing runs by rescanning only the differing ports at default timing with --reason, and check whether a host timed out before calling it down.
Set a rule for which assessments may use fast templates at all, and require the pace to be recorded so a clean result is not read as a complete one.
## What -T5 actually does The reference guide describes `insane` mode as assuming an extraordinarily fast network, or a willingness to sacrifice some accuracy for speed. In Nmap 7.991 the template sets: - a **maximum RTT timeout of 300 ms**, an initial timeout of 250 ms and a minimum of 50 ms; - a **retransmission cap of two** instead of the default ten; - a **host timeout of 15 minutes** and a **script timeout of 10 minutes**; - a ceiling of 5 ms on the dynamic TCP and SCTP scan delay. Every one of these trades patience for speed. A probe whose reply arrives after the timer has fired is not matched, and two retransmissions are few against a link that drops a burst of packets. ## Where the errors come from 1. **Late replies.** A distant or loaded host can answer later than 300 ms. Nmap has already moved on, and the port is recorded as no answer. 2. **Dropped replies.** Congestion, a busy firewall or a host that rate-limits its resets or ICMP errors can swallow a response. With few retries there is little chance to ask again. 3. **Host timeout.** A host that exceeds the timeout is skipped; its port table, OS and version results are not printed at all. 4. **Reading silence.** For a SYN scan, a port with no response after retransmissions is reported `filtered`. That is Nmap's inference from silence; a late SYN/ACK or a lost reset produces the same row as a real drop by a firewall. ## --min-rate and --max-rate | Option | Meaning | Caution | |---|---|---| | `--min-rate N` | Try to send at N packets per second or faster | Faster than the network can support loses packets and accuracy | | `--max-rate N` | Never average above N packets per second | May briefly exceed N to make up for delays | Both are global to the whole scan and apply to port scans and host discovery. Other features, such as OS detection, implement their own timing. The reference guide adds a counter-intuitive point: a faster rate can make a scan take longer, because the adaptive retransmission algorithms detect the congestion your rate caused and send more retransmissions. If you need an upper bound on total time, cap the retries with `--max-retries`. ## Reading two runs that disagree 1. Do not call either run the truth. Each port state is Nmap's inference from the replies it received in the time it allowed. 2. List only the ports that differ, usually open in the slow run and filtered or absent in the fast one. 3. Rescan those ports at `-T3`, with `--reason`, so each state arrives with the evidence Nmap used. 4. If a host is missing, check for the host-timeout line in the output before concluding it is down. 5. Record the template and rate in the report, so a reader knows how patient the scan was. ## A worked reading Suppose a scan of 192.0.2.10 across a wide-area link reports port 443 `open` at `-T3` and `filtered` at `-T5`. The round-trip time on that path wanders around 300 ms, so under `-T5` some SYN/ACK replies arrive after the timer fired, and with only two retransmissions a bad stretch of loss is not retried. Nothing about the host changed; the second run simply listened for less time. The `-T3` run, with its longer timeouts and ten retransmissions, is the better evidence, and the disagreement is resolved by repeating the check, not by declaring a firewall change. ## What goes in the report - The template and every explicit rate or retry option. In XML output the `nmaprun` `args` attribute records the command line. - Hosts that timed out, listed apart from the hosts that were measured. - Any port whose state differed between runs, with the rerun and its `--reason` column. ## Operational rule On a reliable local network, `-T4` is what the reference guide recommends. Use `-T5` for a deliberate quick survey where occasional misses are acceptable, and never for an inventory or audit whose result someone will treat as complete.
- Is --min-rate a limit on how fast Nmap sends?No. It is a floor: Nmap tries to send at or above that many packets per second. The ceiling is `--max-rate`. A floor can be missed when the hardware cannot send that fast or when Nmap has nothing left to send, and a high one risks accuracy loss and extra retransmissions.
- You set --max-rate 50 and also enabled OS detection. Does the cap cover it?Not reliably. The reference guide says the two rate options affect port scans and host discovery scans, and that features like OS detection implement their own timing. A cap on the scan is therefore not a statement about everything Nmap sent.
A courier who waits only a few seconds at each door and tries twice will record 'nobody home' for every tenant who walks slowly to the door. The note says the door gave no answer, not that the flat is empty.
- -T5 only changes send speed; accuracy is unaffected
- A faster scan always finishes sooner than a slower one
- --min-rate is a cap on packets per second
- filtered in the fast run and open in the slow one means the firewall changed
- A host missing from a -T5 report is certainly down
Assumes Nmap 7.991; the -T5 values are read from the 7.991 reference guide and source.