Can Android be used in IPv6-only networks? What level of IPv4 faking is necessary?


Question

I'm using several Android devices that have Android 6.0.x and 6.0.1, and that I want to use in an IPv6 island ("private") network. The Android devices are either attached to a WiFi-to-Ethernet bridge, or some tablets even accept USB 2.0 Ethernet dongles using OTG cables. The IPv6 network has RAs signalling the IPv6 prefix to use, as well as DNS IPv6 server address, and optionally some more-specific IPv6 routes. There are neither DHCPv6 nor DHCPv4 servers available. Well, there are DHCPv6 servers in this network, but they only respond with delegated prefixes.



Unfortunately, I cannot reliably connect my Android devices to this network. For cross-checking, an ordinary Linux Raspbian-equipped Pi does immediately become connected and works correctly, using DNS and getting proper addresses.



Even when I set a static IPv4 address, my Android devices often don't correctly connect in that they don't use IPv6 DNS, albeit it is getting advertised (RFC 5006). I have to set fake IPv4 DNS server addresses to be able to set the static IPv4 parameters. But even then, the Android devices aren't properly working, either not correctly using DNS or even getting disconnected after some seconds.



What kind of IPv4 connectivity do Android devices expect?


Answer

So after some more testing, using an especially made Brouter using a Raspberry Pi Zero W, I now know from my tests that Android 5.x, 6.0/6.1, and 7.0 in fact do support IPv6-only networks. However, the caveat is that as soon as Android neither gets an IPv4 address nor an IPv6 global address, the network manager will declare this network unusable and will disconnect from it.



The reason why I was experiencing such disconnects was because I was connecting my Android devices to a test network, where I shut down the link-local router from time to time for fixing, and only after some delay restarted it. And during these spans without IPv6 RAs advertising global prefixes and without IPv4, Android declared my network dead and disconnected.



Some more background information gained over time:




  • Some Android versions are allergic to ULA DNS server addresses, and only deem GUAs proper. However, the same Android versions happily accept ULA prefixes. The symptom then is that these Android devices keep connected to an IPv6 network using ULAs, but cannot resolve any DNS names after some seconds. Using one of the better diagnosis apps I notice that these Android versions first learn the DNS server address, then remove it after around 15-30 seconds. It seems as if newer Android versions 7.x are less rigid in their expectations at the moment.


  • Some Android versions react allergic to documentary addresses, that is, the 2001:db8::/32 address range. They are ignoring these addresses, especially for DNS servers. More recent Android versions 7.x seem to be tolerant of using the documentary address block in networks.




In the end, the safe side is as follows, unless you can avoid especially Android 5.x, but also some 6.x releases for sure:




  • ULAs fc00::/7 are evil ;) Please note that this includes the fd00::/8 often taught as "best practice" in IPv6 courses, so be careful.

  • documentary IPv6 addresses 2001:db8::/32 are evil too.

  • stick to real global addresses, even if they're faked.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes