Detecting...

Testing IPv4 and IPv6 connectivity status

IPv4 Waiting
IPv6 Waiting
IPv4

IPv4

Detecting...
-
-
IPv6

IPv6

Detecting...
-
-

Connection Type

-

How this test works: This page checks whether your browser can reach a public IPv6 endpoint. Only global unicast addresses such as 2xxx: / 3xxx: count as public IPv6. A device with only fe80:: or fd00::, or an IPv6 path blocked by the ISP, router or firewall, will appear as unavailable. VPN, proxy, or routing rules may send different domains through different exits; use curl -6 "https://v6.17nas.com?format=json" to verify the current terminal environment, and test a direct path separately only when troubleshooting a proxy. Keep the quotes when using zsh on macOS.

Connection Quality Score

0 /100
Evaluating...

Latency Comparison

IPv4
IPv6

What is IPv6?

IPv6 (Internet Protocol version 6) is the latest version of the Internet Protocol, designed to solve IPv4 address exhaustion.

IPv6 Advantages

  • Massive Address Space:IPv6 provides 340 undecillion addresses (2^128), virtually inexhaustible
  • End-to-End Connectivity:Every device can have a public IP, no NAT translation needed
  • Better Performance:Simplified header design, higher routing efficiency
  • Enhanced Security:Built-in IPsec support for better encryption and authentication

Connection Types

Dual Stack

Supports both IPv4 and IPv6, the ideal configuration for accessing all websites

IPv4 Only

Only supports IPv4, the most common configuration, can access most websites

IPv6 Only

Only supports IPv6, less common, some IPv4-only sites may be inaccessible

No Connection

Network connection error or blocked by firewall

How to Enable IPv6?

  • ISP Support:Contact your ISP to confirm if IPv6 service is available
  • Router Configuration:Enable IPv6 in router admin interface (DHCPv6 or SLAAC)
  • Operating System:Modern OS (Windows 10+, macOS, Linux) support IPv6 by default
  • Firewall:Ensure firewall does not block IPv6 traffic

Command Line Detection

Suitable for script automation, server monitoring, CI/CD integration, etc. We provide three detection endpoints supporting multiple output formats.

macOS / zsh note
URLs containing ? must be quoted, otherwise zsh treats the character as a wildcard and reports no matches found. The commands below are already quoted and ready to copy.

Quick Start

IPv4 Detection
curl -4 https://v4.17nas.com

Returns IPv4 address only

IPv6 Detection
curl -6 https://v6.17nas.com

Returns IPv6 address only

Dual Stack Detection
curl https://ip.17nas.com

Returns current network priority IP

Click to expand usage instructions
# For personal testing and learning only, not for commercial use. Please comply with local laws.
# Check your public IPv4 address
curl -4 https://v4.17nas.com

# Check your public IPv6 address
curl -6 https://v6.17nas.com

# Test IPv4/IPv6priority (access dual-stack site, if returns IPv6, then IPv6 is preferred)
curl https://ip.17nas.com
Using these curl commands in production

Public endpoints have no dedicated quota, may be rate-limited during abuse and provide no request history. For servers, NAS scheduled jobs or production services, the API-key endpoint adds a dedicated quota, usage stats, error logs and IP allowlisting.

Output Formats

Linux / macOS
curl -4 https://v4.17nas.com
Output Example: 203.0.113.42 Note: 203.0.113.0/24 is an RFC 5737 reserved documentation address range, not a real IP, for demonstration purposes only
Windows PowerShell (CLI)
curl.exe -4 https://v4.17nas.com
Get Full Information
curl -4 "https://v4.17nas.com?format=json"
Output Example:
{
  "ip": "203.0.113.42",
  "country": {
    "zh": "示例国家",
    "en": "Example Country",
    "code": "XX"
  },
  "asn": "AS12345 Example ISP Ltd.",
  "location": {
    "zh": "示例国家 示例省份 示例城市 Example ISP",
    "en": "Example Country Example State Example City Example ISP"
  },
  "region": "Example State",
  "city": "Example City",
  "datacenter": "XXX",
  "timezone": "Asia/Shanghai"
}
Note: All data above are RFC standard example data, not real information
Extract Specific Fields (using jq)
curl -4 -sS "https://v4.17nas.com?format=json" | jq -r '.country.en'
Output: Example Country
Formatted Output
curl -4 "https://v4.17nas.com?format=text&lang=en"
╔════════════════════════════════════════════════════════╗
║                   17NAS IPv4 Report                    ║
╚════════════════════════════════════════════════════════╝

📍 IP Address
   203.0.113.42

🌍 Country
   Example Country (XX)

🏢 ISP
   AS12345 Example ISP Ltd.

📍 Location
   Example Country Example State Example City Example ISP

🌐 Datacenter
   XXX

🕐 Timezone
   Asia/Shanghai

📊 Protocol
   IPv4

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Powered by 17NAS.com
Note: All data above are RFC standard example data, not real information

Practical Script Examples

Bash Network Diagnostic Script Click to expand code

#!/bin/bash
# 17NAS Network Diagnostic Tool

echo "🔍 Detecting network connection..."

# IPv4 Detection
echo -e "\n📡 IPv4 Detection:"
ipv4=$(curl -4 -sS https://v4.17nas.com)
if [[ $ipv4 == *"No IPv4"* ]]; then
    echo "❌ IPv4 not supported"
else
    echo "✅ IPv4 Address: $ipv4"
    curl -4 -sS "https://v4.17nas.com?format=json" | jq -r '"   Country: \(.country.en) (\(.country.code))"'
fi

# IPv6 Detection
echo -e "\n📡 IPv6 Detection:"
ipv6=$(curl -6 -sS https://v6.17nas.com)
if [[ $ipv6 == *"No IPv6"* ]]; then
    echo "❌ IPv6 not supported"
else
    echo "✅ IPv6 Address: $ipv6"
    curl -6 -sS "https://v6.17nas.com?format=json" | jq -r '"   Country: \(.country.en) (\(.country.code))"'
fi

# Access Priority
echo -e "\n⚡ Access Priority:"
curl -sS "https://ip.17nas.com?format=json" | jq -r '"Protocol: \(.protocol)\nPriority: \(.priority.en)"'

echo -e "\n✅ Diagnostic complete!"

Python Detection Script Click to expand code

import socket
import requests
import urllib3.util.connection as urllib3_connection

def get_json(url, family=None):
    original_family = urllib3_connection.allowed_gai_family
    session = requests.Session()
    session.trust_env = False
    if family is not None:
        urllib3_connection.allowed_gai_family = lambda: family
    try:
        response = session.get(url, timeout=10)
        response.raise_for_status()
        return response.json()
    finally:
        session.close()
        urllib3_connection.allowed_gai_family = original_family

def check_network():
    """Detect IPv4/IPv6 support status"""

    # IPv4 Detection
    print("📡 IPv4 Detection:")
    try:
        data = get_json('https://v4.17nas.com?format=json', socket.AF_INET)

        if 'error' in data:
            print(f"❌ {data['error']['en']}")
        else:
            print(f"✅ IPv4 Address: {data['ip']}")
            print(f"   Country: {data['country']['en']} ({data['country']['code']})")
            print(f"   Location: {data['location']['en']}")
    except Exception as e:
        print(f"⚠️ Detection failed: {e}")

    # IPv6 Detection
    print("\n📡 IPv6 Detection:")
    try:
        data = get_json('https://v6.17nas.com?format=json', socket.AF_INET6)

        if 'error' in data:
            print(f"❌ {data['error']['en']}")
        else:
            print(f"✅ IPv6 Address: {data['ip']}")
            print(f"   Country: {data['country']['en']}")
    except Exception as e:
        print(f"⚠️ Detection failed: {e}")

    # Access Priority
    print("\n⚡ Access Priority:")
    try:
        data = get_json('https://ip.17nas.com?format=json')
        print(f"Protocol: {data['protocol']}")
        print(f"Priority: {data['priority']['en']}")
    except Exception as e:
        print(f"⚠️ Detection failed: {e}")

if __name__ == '__main__':
    check_network()

Technical Features

Global Acceleration

CDN edge-node deployment for fast global response

Bilingual (ZH/EN)

Supports Chinese and English output, with mapping coverage for 24 countries/regions

No Authentication Required

Fully open API, no key or token required, works out of the box

CORS Support

Full cross-origin support for direct browser JavaScript calls

Notes

  • Default Format:Without parameters, the API returns compact mode (IP address only) for backward compatibility
  • URL Encoding:When used in scripts, remember to quote URL parameters curl -4 "https://v4.17nas.com?format=json"
  • Timeout Settings:Use a 3-5 second timeout to avoid long waits during network jitter
  • Cache Control:Response headers set Cache-Control: no-cache to ensure real-time data
  • Rate Limit:No explicit limit, but avoid high-frequency requests (recommended interval: >= 1 second)