Skip to main content

10.3. Configuring Preference for IPv6 or IPv4

The default policy table gives IPv6 addresses higher precedence than IPv4 addresses. This means that applications will use IPv6 in preference to IPv4 when the two are equally suitable. An administrator can change the policy table to prefer IPv4 addresses by giving the ::ffff:0.0.0.0/96 prefix a higher precedence:

   Prefix        Precedence Label
::1/128 50 0
::/0 40 1
::ffff:0:0/96 100 4
2002::/16 30 2
2001::/32 5 5
fc00::/7 3 13
::/96 1 3
fec0::/10 1 11
3ffe::/16 1 12

This change to the default policy table produces the following behavior:

Example 1:

  • Candidate Source Addresses: 2001:db8::2 or fe80::1 or 169.254.13.78
  • Destination Address List: 2001:db8::1 or 198.51.100.121
  • Unchanged Result: 2001:db8::1 (src 2001:db8::2) then 198.51.100.121 (src 169.254.13.78) (prefer matching scope)

Example 2:

  • Candidate Source Addresses: fe80::1 or 198.51.100.117
  • Destination Address List: 2001:db8::1 or 198.51.100.121
  • Unchanged Result: 198.51.100.121 (src 198.51.100.117) then 2001:db8::1 (src fe80::1) (prefer matching scope)

Example 3:

  • Candidate Source Addresses: 2001:db8::2 or fe80::1 or 10.1.2.4
  • Destination Address List: 2001:db8::1 or 10.1.2.3
  • New Result: 10.1.2.3 (src 10.1.2.4) then 2001:db8::1 (src 2001:db8::2) (prefer higher precedence)