To scan both TCP and UDP ports in a single -p specification, which option is valid?

Prepare for the Nmap and ZenMap Tests. Access flashcards and multiple choice questions, with hints and explanations for each question. Ensure success in your exam!

Multiple Choice

To scan both TCP and UDP ports in a single -p specification, which option is valid?

Explanation:
Mixing TCP and UDP ports in one scan uses protocol prefixes to tell the tool which ports belong to which transport. By prefixing port lists with T: for TCP and U: for UDP, you can include both types in a single -p specification. The chosen form is best because it explicitly assigns each port to its protocol within the same command: TCP ports 80 and 443 are listed after T:, and UDP port 53 is listed after U:. This unambiguous grouping ensures both TCP and UDP ports are scanned in one pass without guessing which protocol a port belongs to. Options that list only TCP ports (without any UDP designation) don’t cover UDP. The other form shown also mixes the prefixes but the canonical, clear example in many references emphasizes the TCP portion first followed by the UDP portion, which is why this particular syntax is presented as the valid one.

Mixing TCP and UDP ports in one scan uses protocol prefixes to tell the tool which ports belong to which transport. By prefixing port lists with T: for TCP and U: for UDP, you can include both types in a single -p specification.

The chosen form is best because it explicitly assigns each port to its protocol within the same command: TCP ports 80 and 443 are listed after T:, and UDP port 53 is listed after U:. This unambiguous grouping ensures both TCP and UDP ports are scanned in one pass without guessing which protocol a port belongs to.

Options that list only TCP ports (without any UDP designation) don’t cover UDP. The other form shown also mixes the prefixes but the canonical, clear example in many references emphasizes the TCP portion first followed by the UDP portion, which is why this particular syntax is presented as the valid one.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy