3.12. Default Address Selection
The architecture of IPv6 allows an interface to have multiple addresses. The addresses may differ in scope (link-local, global) or state (preferred, deprecated); they may be part of mobility (home-address, care-of-address) or multihoming situation; or they may be permanent public addresses or virtual tunnel interfaces. Dual-stack hosts have IPv6 and IPv4 addresses. The result is that IPv6 implementations that need to initiate a connection are often faced with a choice between multiple Source and Destination addresses.
Imagine a situation where a client issues a DNS request for an external service and receives a global IPv6 and a public IPv4 address back. If this client has a private IPv4 address and a global IPv6 address, it might make sense to use IPv6 to access this external service. But if the client has a link-local IPv6 address and a public IPv4 address, choose the IPv4 address for connecting to the service. These are types of situations and choices that will have to be dealt with in the future world of mixed networks, some IPv4-only, some IPv6-only, and some dual-stack. The way this is dealt with depends on the implementations. Application developers have to be aware of this and try to provide mechanisms that will make their applications behave optimally in every possible environment.
RFC 3484, "Default Address Selection for IPv6," defines two general algorithms, one for Source address selection and the other for Destination address selection. All IPv6 nodes (host and router) have to implement RFC 3484. The algorithms specify default behavior for IPv6 nodes. The algorithms do not override choices made by applications or upper-layer protocols.
Here's a summary of the most important rules:
The rules in RFC 3484 are to be used in all situations when nothing else is specified. The specification also allows the configuration of a policy that can override these defaults with preferred combinations of Source and Destination addresses.
Now that we are familiar with the extended address space and the IPv6 address types, the next chapter introduces the advanced features of ICMPv6, which offer management functionality not known with ICMPv4.