Overblog Suivre ce blog
Editer l'article Administration Créer mon blog
20 juin 2013 4 20 /06 /juin /2013 14:19

RFC 6724 : Default Address Selection for Internet Protocol Version 6 (IPv6)

As IPv6 hosts may have several IPv6 addresses over a single network interface, a choice has to be made by the OS so to choose a Source IP, as well as a Destination IP.

Furthermore, in case of Dual-Stack IPv4/IPv6 networking, a choice has to be made too about which IP to use as Source and Destination IPs : IPv4 or IPv6.

Finally, in case there are several physical or virtual network interfaces ( ex: tunnelling, .... ), a choice has to be made too.


RFC 6724 provides the mechanismes to be implemented in OS and in softwares to resolve this Source Address and Destination Address selection.


 

The RFC 6724 Basic Algorithm



. Each Address is passed through the prefix policy table, and thus receives a Precedence and a Label value.

. The Source address is selected

. The Destination address is selected



The Prefix policy table

 

To show the Prefix policy table on a windows OS :

 

netsh int ipv6 show prefix

 

Here is the default Prefix Policy table :

 

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


It's a longest prefix match, like the routing table. Each candidate address receives a Precedence and a Label value, based on this longest prefix match.

The IPv4 addresses are processed through this table too, using a ::ffff:0:0/96 IPv4 mapped address.

 

 

here is the meaning of the default table entries :

::1/128                                   Loopback
::/0                                          Default Route
::ffff:0:0/96                             IPv4 mapped address
2002::/16                              6to4
2001:0000::/32                    reserved for teredo
fc00::/7                                  ULAs
::/96                                        IPv4 compatible address ( depracated )
fec0::/10                                ancient site-local address, deprecated
3ffe::/16                                 6bone


notes :

IPv6 GUA wins over IPv4 Public IP for destination choice because the IPv6 matches a 40 preference, wherease the IPv4 gets a 35

::/0                 40    1
::ffff:0:0/96    35    4


For source selection, same labels win as source ( rule 6 ) all other rules being equals

So this default table prefers IPv6 over IPv4, and native connectivity over tunnelled one.



source selection

 

All the potential source addresses are processed through this set of rules, discarding addresses as they loose in a rule, and stopping when one only address is left :

 

1.  Prefer same address ( ie source IP=destination IP )
2.  Prefer appropriate scope
3.  Avoid deprecated addresses
4.  Prefer home adress ( Mobile IPv6 )
5.  Prefer outgoing interface ( ie to internal forwarding interface )
5.5 Prefer the next-hop advertised prefix addresses
6.  Prefer matching label
7.  Prefer temporary address
8.  Use longest matching prefix

nb : rules 5.5 and 8 are optional, and can be supperseded

        rule 7 is supposed to be user-configurable in OS and applications



destination selection

1.  Avoid unusable destinations ( unreachable or undefined )
2.  Prefer matching scope
3.  Avoid deprecated addresses
4.  Prefer home addresses
5.  Prefer matching label
6.  Prefer higher precedence
7.  Prefer native transport
8.  Prefer smalller scope
9.  Use longest matching prefix
10. Otherwise, choose the first on the list

note : rules 9 and 10 may be superseded


Exemple of Prefix Policy Table settings

 

For administrative means, the prefix policy table may be changed, so to reach a particular effect. For an example :

 

prefering IPv4 :

To prefer IPv4 over IPv6 for Internet Access, we raise the preference value of the ::ffff:0:0/96 row ( which matches IPv4 addresses ) to 100, over the ::/0 40 preference value ( which matches IPv6 default addresses ) :

 

      Prefix          Precedence            Label

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

command line :

 

netsh int ipv6 set prefix ::ffff:0:0/96 100 4

 

Partager cet article

Repost 0
Published by computer outlines - dans IPv6
commenter cet article

commentaires

Présentation

  • : Computer Outlines Blog
  • : Blog mainly focused over IPv6, Windows Server, and Networking in general.
  • Contact

Recherche

Liens