Summary

  • RFC 6724 specifies two algorithms — one for source address selection, one for destination address selection — and makes them the default behaviour of every IPv6 implementation.
  • It does not override choices made by applications or upper-layer protocols, and it shares a context between both algorithms, including an optional mechanism that lets administrators supply policy overriding the defaults.

The consequence is easy to miss: a host holding several addresses picks one before any application asks. What leaves the machine is a default, not a decision.

The vote happens before the meeting

Your code opens a socket, names a destination, and believes it made a decision. It made half of one. Which of its own addresses the packet carries out of the door was settled further down the stack, by a preference table most engineers have never opened and could not recite from memory.

That table belongs to RFC 6724, Default Address Selection for Internet Protocol Version 6 (IPv6), which replaced RFC 3484 in 2012 and has been quietly arbitrating ever since. It defines two algorithms. Source address selection answers: given this destination, which of my addresses goes in the header? Destination address selection answers: given a name that resolved to six addresses, which do I try first? Both run in the stack. Neither asks the application for permission.

The document is honest about the limits of its own authority, which is more than most governance documents manage: it does not override choices made by applications or upper-layer protocols. If your code binds explicitly, it wins. If it does not bind — and almost nothing does — the default wins, and the default was written by someone else, years ago, for a network that no longer looks like yours.

Nine rows, two numbers, and the last word

The centre of the document is a table. It has three columns, nine rows, and it outranks your application.

Nine rows, two numbers, and the last word
PrefixPrecedenceLabel
::1/128500
::/0401
::ffff:0:0/96354
2002::/16302
2001::/3255
fc00::/7313
::/9613
fec0::/10111
3ffe::/16112

Read the second and third rows together and you have the whole IPv6 transition in miniature. ::/0 carries precedence 40. ::ffff:0:0/96 — the IPv4-mapped space, the addresses a dual-stack host uses to reach the other Internet — carries 35. Higher precedence wins. The preference for IPv6 is not a law of physics and not a property of the wire. It is row two beating row three, in a table, by five points.

That is what a default is: a policy choice that has stopped being visible as a choice.

Why IPv4 and IPv6 never compete

The third column is the interesting one. Every prefix carries a label, and the rules prefer a source and a destination that share one. Native IPv6 sits in label 1. IPv4-mapped addresses sit in label 4. 6to4 sits in label 2. Teredo sits in label 5. Unique local addresses sit in label 13.

The effect is a passport regime. Addresses from different labels are not ranked against each other; they are kept apart. A host with both families does not weigh IPv4 against IPv6 and pick the better one — the table has already decided these are two different countries, and the rules only compare citizens of the same one.

This is the formal admission that IPv4 and IPv6 are not one network with a larger address field. They are two networks that happen to share a cable, a routing table and an on-call rota. The label column is the paperwork that stops them being mistaken for each other — and the reason a dual-stack host can look, from the outside, like it is behaving consistently while running two of everything.

The override exists. That is the point.

RFC 6724 does not hand the table down as scripture. It specifies an optional mechanism by which administrators can supply their own policy, and implementations took it up: glibc reads a policy table from gai.conf, and Linux exposes the label table through ip addrlabel.

Which means the most consequential line in a dual-stack deployment is a preference order that is fully editable, fully documented, and almost universally left alone. Operators will spend a week tuning BGP communities and never once look at the table that decides which source address their monitoring probes, their outbound mail and their API calls present to the world.

When something behaves oddly — a service that reaches the wrong interface, a probe reporting a source nobody recognises, a connection preferring a path the diagram says it shouldn't — the answer is usually here, in a default nobody chose and nobody overrode.

What thin coordination looks like

There is a lesson in this document that the number-resource layer has spent two decades avoiding.

RFC 6724 is coordination at its thinnest. The rules are deterministic and locally verifiable. There is no institution to petition, no committee to convene, no recognition to wait for. It says plainly that it does not override the application, and it hands anyone who bears the consequence a documented way to replace the defaults. It knows exactly what it is: a tie-breaker for hosts with more than one address, and nothing more.

Compare that modesty with a registry layer that began as an address book and ended up deciding whether an address may leave a region. The registry kept a clerk's liability and acquired a government's authority. RFC 6724 kept a default's authority and a suggestion's manners. One of these documents has a sense of proportion. The other has a policy development process.

Your kernel will keep voting before your application speaks. The least you can do is read the ballot.