Fundamentals 16 min read

Mastering IPv6: From Basics to Mobile App Auto‑Fallback Mechanisms

This article provides a comprehensive IPv6 introduction covering core concepts, supported operating systems, address formats, and essential network tools, and also examines how mobile applications automatically downgrade from IPv6 to IPv4 in dual‑stack environments, offering practical insights and real‑world testing examples.

Efficient Ops
Efficient Ops
Efficient Ops
Mastering IPv6: From Basics to Mobile App Auto‑Fallback Mechanisms
This article introduces IPv6 from basic concepts, network tools, to research on automatic downgrade mechanisms for mobile applications in IPv6/IPv4 environments.

Introduction

It is well known that the 32‑bit IPv4 address space is essentially exhausted. The next‑generation protocol IPv6 uses 128‑bit addresses, providing enough space to assign an address to every grain of sand on Earth. Despite years of promotion, IPv6 adoption in China has been slow due to various constraints.

In November 2017, the Central Committee and State Council issued the "IPv6 Scale Deployment Action Plan," urging all regions and departments to implement IPv6 seriously. In June 2018, the Cyberspace Administration ordered major operators and leading internet companies to submit implementation plans, setting a target to increase active IPv6 users by the end of 2018.

Because IPv6 is still relatively new, many people lack essential knowledge, so this article offers a simple introduction and practical guidance.

Fundamental Concepts

Software Support

Most modern operating systems and hardware support IPv6:

Windows 7/8.x/10 – IPv6 enabled by default.

Linux – kernels 2.6.x, 3.x, 4.x support IPv6 (may require manual enable).

iOS 9+ – IPv6‑only support; Apple has required apps to be IPv6‑compatible since 2016.

Android – IPv6 support present, though DHCPv6 is not supported.

To check IPv6 support on a device, open a browser and visit

ipv6-test.com

; the site will indicate whether the network has an IPv6 address.

IPv6 test result
IPv6 test result

Most IPv6‑capable networks operate in a dual‑stack mode, providing both an IPv4 address (often a private 10.x address) and a global IPv6 address. Clients prefer IPv6 when the server’s domain has an AAAA record; otherwise they fall back to IPv4.

IPv6 Protocol Overview

Below is a simple IPv6 packet capture:

IPv6 packet
IPv6 packet

According to RFC 2460, an IPv6 datagram consists of a fixed 40‑byte header followed by a payload that may include zero or more extension headers. The maximum payload length is 65 535 bytes.

IPv6 header fields
IPv6 header fields

Version – value 6.

Traffic Class – similar to IPv4’s TOS field, used for DSCP marking.

Flow Label – identifies a flow; its management is not yet standardized.

Payload Length – length of the payload following the basic header.

Next Header – indicates the type of the following extension header.

IPv6 Address Representation

An IPv6 address consists of eight groups of four hexadecimal digits separated by colons, e.g. 2001:cdba:0000:0000:0000:0000:3257:9652.

Common abbreviations:

Omit leading zeros: 2001:cdba:0:0:0:0:3257:9652.

Use a double colon (::) to replace a consecutive sequence of zeros (only once per address): 2001:cdba::3257:9652.

IPv6 Address Types

Unicast – identifies a single interface; analogous to IPv4 public and private addresses.

Multicast – identifies a group of interfaces; packets are delivered to all members.

Anycast – identifies a set of interfaces; the packet is delivered to the nearest one.

Unicast Addresses

Global Unicast – Prefix 2000::/3. These are routable on the public Internet, similar to IPv4 public addresses.

Global unicast address range
Global unicast address range

Link‑Local – Prefix FE80::/10. Used for communication on the same link; automatically assigned to every interface.

Link‑local address example
Link‑local address example

Unique Local – Prefix FC00::/7. Equivalent to IPv4 private addresses.

Unique local address example
Unique local address example

Special Addresses

::/128 – unspecified address (do not use).

::1/128 – loopback address, equivalent to 127.0.0.1.

FF00::/8 – multicast address space.

IPv6 Network Tools

dig

DNS lookup to check whether a domain has an AAAA record.

dig AAAA query
dig AAAA query

curl

Send HTTP requests over IPv6 to retrieve server data.

curl IPv6 request
curl IPv6 request

ping6

Test IPv6 connectivity and DNS resolution.

ping6 test
ping6 test

telnet

Check whether a specific IPv6 address and port are open.

telnet IPv6 port test
telnet IPv6 port test

mtr

Diagnose IPv6 network path quality.

mtr IPv6
mtr IPv6

traceroute6

Trace IPv6 routing hops.

traceroute6 example
traceroute6 example

ip & route

Display the local IPv6 routing table.

IPv6 routing table
IPv6 routing table

Study of Automatic Downgrade Mechanism for Mobile Apps in IPv6/IPv4 Environments

Using an Android phone (Xiaomi 5S, MIUI 10) in a dual‑stack network, the following process was observed:

1. DNS resolution: the client first queries the AAAA record, then the A record.

DNS query capture
DNS query capture

2. Decision logic:

If a valid AAAA address exists and the local network supports IPv6, the client attempts to connect via IPv6. After up to four retries (≈300 ms total) failing to reach the server, it automatically falls back to IPv4.

If an AAAA address exists but the network lacks IPv6 support, the client directly uses the IPv4 address.

If no AAAA address is returned, the client uses the IPv4 address from the A record.

IPv6 fallback flow
IPv6 fallback flow

Conclusion

This article offers a brief overview of IPv6, focusing on concepts, tools, and a practical case of mobile app fallback behavior. Many advanced topics such as Neighbor Discovery, DHCPv6, ICMPv6, PMTU, and EUI‑64 are omitted but are covered in other detailed resources.

Original source: IPv6入门教程

IPv6MobilenetworkProtocoltoolsDual-Stack
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.