312-50V10 · Question #599
A company has five different subnets: 192.168.1.0, 192.168.2.0, 192.168.3.0, 192.168.4.0 and 192.168.5.0. How can NMAP be used to scan these adjacent Class C networks?
The correct answer is A. NMAP -P 192.168.1-5.. NMAP supports hyphenated range notation within any IP octet, enabling a single command to scan multiple sequential subnets efficiently.
Question
A company has five different subnets: 192.168.1.0, 192.168.2.0, 192.168.3.0, 192.168.4.0 and 192.168.5.0. How can NMAP be used to scan these adjacent Class C networks?
Options
- ANMAP -P 192.168.1-5.
- BNMAP -P 192.168.0.0/16
- CNMAP -P 192.168.1.0,2.0,3.0,4.0,5.0
- DNMAP -P 192.168.1/17
How the community answered
(31 responses)- A90% (28)
- C6% (2)
- D3% (1)
Why each option
NMAP supports hyphenated range notation within any IP octet, enabling a single command to scan multiple sequential subnets efficiently.
NMAP accepts hyphenated ranges within any octet, so the notation 192.168.1-5.0 instructs NMAP to scan all addresses across 192.168.1.0 through 192.168.5.0 in a single command. This range syntax is the most concise method for targeting exactly these five adjacent Class C networks without over-scanning or using invalid notation. The five subnets are addressed precisely with no unintended hosts included.
The CIDR notation 192.168.0.0/16 would scan all 65,536 addresses in the entire 192.168.x.x space, vastly exceeding the five specific target subnets and generating excessive noise.
NMAP does not support comma-separated partial octet notation in the format shown; that syntax is not valid for specifying multiple discrete subnets in a single scan command.
The expression 192.168.1/17 is not valid NMAP target syntax or legitimate CIDR notation, as a /17 prefix cannot be correctly applied at that position to describe the five target subnets.
Concept tested: NMAP octet range notation for multi-subnet scanning
Source: https://nmap.org/book/man-target-specification.html
Topics
Community Discussion
No community discussion yet for this question.