What does ping -4 do?

Study for the CCST Cybersecurity Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

What does ping -4 do?

Explanation:
Controlling which IP protocol version the ping command uses is what's being tested. The flag -4 forces IPv4, so the echo requests are sent only over IPv4 networks. If the target hostname has IPv6 addresses as well, using -4 makes ping ignore those and attempt to reach the host via IPv4 instead. This is helpful when IPv6 isn’t available or is misconfigured on the network, ensuring you get IPv4-based responses. It doesn’t itself resolve hostnames—that step happens as part of ping’s normal operation, and -4 simply selects the protocol version used for the actual probe.

Controlling which IP protocol version the ping command uses is what's being tested. The flag -4 forces IPv4, so the echo requests are sent only over IPv4 networks. If the target hostname has IPv6 addresses as well, using -4 makes ping ignore those and attempt to reach the host via IPv4 instead. This is helpful when IPv6 isn’t available or is misconfigured on the network, ensuring you get IPv4-based responses. It doesn’t itself resolve hostnames—that step happens as part of ping’s normal operation, and -4 simply selects the protocol version used for the actual probe.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy