Ping Test and IP Connectivity via Command Line (IPv4 + IPv6)
This page helps you run ping tests and check IP connectivity over IPv4, IPv6, or dual-stack using command-line tools. It's designed for practical network diagnostics with plain-text output, ideal for troubleshooting and scripting.
For this purpose, we provide three dedicated endpoints:
| Endpoint | Mode | DNS records |
|---|---|---|
| ipv4.whatismyip.help | IPv4 only | A |
| ipv6.whatismyip.help | IPv6 only | AAAA |
| whatismyip.help | Dual-stack (IPv4 + IPv6) | A + AAAA |
The IPv4-only and IPv6-only endpoints are used to test connectivity over IPv4 and IPv6 independently. The dual-stack endpoint is used to determine which IP version (IPv4 or IPv6) your operating system selects by default.
Testing each IP version consists of three steps:
- DNS check - confirms the hostname resolves (A for IPv4, AAAA for IPv6).
- Ping test - tests ICMP reachability of the IP stack.
- HTTPS test - confirms real connectivity over TCP 443 and TLS.
In most cases DNS works as expected, but checking it first helps rule out misconfiguration early.
On this page:
- Quick Ping and Connectivity Test (CLI)
- IPv6 Ping and Connectivity
- IPv4 Ping and Connectivity
- Dual-stack behavior (IPv4 + IPv6)
Quick Ping and Connectivity Test (CLI)
Choose your protocol and OS. Each button copies the full command to your clipboard. Use these commands to quickly run ping tests and HTTPS connectivity checks using curl or wget for IPv4, IPv6, or dual-stack connectivity on Linux, macOS, and Windows.
Prefer a browser-based check? View your IPv4 and IPv6 addresses in the browser.
The output format returned by curl and wget is identical for IPv4, IPv6, and dual-stack endpoints.
| Field | Meaning |
|---|---|
| IP | Your public IP address seen by the endpoint. |
| protocol | ipv4 or ipv6 |
| http_protocol | HTTP protocol used for the connection (HTTP/1.1 or HTTP/2), based on the server connection. |
| country | Two-letter country code (ISO 3166-1 alpha-2). |
| ASN | Autonomous System Number of your Internet Service Provider. |
The http_protocol value shows the negotiated HTTP version. In curl HTTP/2 mode, this can be influenced using the --http2 option.
curl --http2 https://whatismyip.help
Note: On Windows Command Prompt, the bundled curl.exe may not support HTTP/2. If --http2 is unavailable, this indicates a limitation of the local curl build, not a network issue.
IPv6 Ping and Connectivity
Follow the steps below to verify IPv6 connectivity, from DNS resolution to HTTPS.
IPv6 DNS Check (AAAA record)
This check verifies that the IPv6-only endpoint is reachable via DNS and publishes an AAAA record.
dig ipv6.whatismyip.help AAAA +short
nslookup ipv6.whatismyip.help
If no AAAA record is returned, the endpoint cannot be tested over IPv6.
IPv6 Ping Test - Command Prompt & Terminal
Ping tests basic ICMP v6 reachability and latency (RFC 4443). Failure may indicate missing IPv6 connectivity or blocked ICMP traffic.
ping -6 -c 5 ipv6.whatismyip.help
ping -6 -n 5 ipv6.whatismyip.help
Tip: on some systems you can force IPv6 with ping6.
IPv6 Connectivity via curl and wget
Use curl ipv6 (curl -6) or wget ipv6 (wget --inet6-only) to check IPv6 HTTPS connectivity from the command line.
curl --ipv6 --connect-timeout 5 --max-time 10 https://whatismyip.help
wget --inet6-only --quiet --output-document=- https://whatismyip.help
curl.exe -6 https://whatismyip.help
If this command succeeds, IPv6 HTTPS connectivity is working on your network.
IPv4 Ping and Connectivity
Follow the steps below to verify IPv4 connectivity, from DNS resolution to HTTPS.
IPv4 DNS Check (A record)
This check verifies that the IPv4-only endpoint publishes an A record.
dig ipv4.whatismyip.help A +short
nslookup ipv4.whatismyip.help
If no A record is returned, IPv4 testing is not possible and the endpoint is misconfigured.
IPv4 Ping Test - Command Prompt & Terminal
This is a simple ping check for IPv4 reachability (packet loss and latency). On Windows Command Prompt, the ping test command prompt syntax is the same.
ping -4 ipv4.whatismyip.help
Tip: on some systems you can force IPv4 with ping -4.
IPv4 Connectivity via curl and wget
Use curl ipv4 (curl -4) or wget ipv4 (wget --inet4-only) to verify IPv4-only HTTPS connectivity.
curl --ipv4 --connect-timeout 5 --max-time 10 https://whatismyip.help
wget --inet4-only --quiet --output-document=- https://whatismyip.help
curl.exe -4 --connect-timeout 5 --max-time 10 https://whatismyip.help
If this command succeeds, IPv4 HTTPS connectivity is working on your network.
Dual-stack behavior (IPv4 + IPv6)
The dual-stack endpoint publishes both IPv4 (A) and IPv6 (AAAA) DNS records. When connecting to this endpoint, your operating system automatically selects which protocol to use.
This selection follows the Happy Eyeballs algorithm (RFC 8305), which is designed to minimize connection delays by preferring the fastest available protocol rather than strictly prioritizing IPv6 or IPv4.
- Which IP version your system uses by default.
- Whether IPv6 connectivity is preferred, available, or bypassed by your system.
- How your network behaves when both IPv4 and IPv6 are present.
curl --connect-timeout 5 --max-time 10 https://whatismyip.help
Note: The selected protocol may vary depending on network conditions, routing, and connection latency.