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::2orfe80::1or169.254.13.78 - Destination Address List:
2001:db8::1or198.51.100.121 - Unchanged Result:
2001:db8::1(src2001:db8::2) then198.51.100.121(src169.254.13.78) (prefer matching scope)
Example 2:
- Candidate Source Addresses:
fe80::1or198.51.100.117 - Destination Address List:
2001:db8::1or198.51.100.121 - Unchanged Result:
198.51.100.121(src198.51.100.117) then2001:db8::1(srcfe80::1) (prefer matching scope)
Example 3:
- Candidate Source Addresses:
2001:db8::2orfe80::1or10.1.2.4 - Destination Address List:
2001:db8::1or10.1.2.3 - New Result:
10.1.2.3(src10.1.2.4) then2001:db8::1(src2001:db8::2) (prefer higher precedence)