Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

How to Administer the IPv6 Address Selection Policy Table

The following procedure describes how to modify the address selection policy table. For conceptual information about IPv6 default address selection, see Description of the ipaddrsel Command.


Caution

Caution  -  Do not change the IPv6 address selection policy table except for the reasons that are provided in the following procedure. Doing so, can cause problems on the network due to a badly constructed policy table. Also, be sure to save a backup copy of the policy table, as shown in this procedure.


  1. Become an administrator.
  2. Review the current IPv6 address selection policy table.
    # ipaddrsel
    # Prefix                  Precedence Label
    ::1/128                           50 Loopback
    ::/0                              40 Default
    2002::/16                         30 6to4
    ::/96                             20 IPv4_Compatible
    ::ffff:0.0.0.0/96                 10 IPv4
  3. Make a backup copy of the default address policy table.
    # cp /etc/inet/ipaddrsel.conf /etc/inet/ipaddrsel.conf.orig
  4. Add any customizations to the /etc/inet/ipaddrsel.conf file.
    # pfedit /etc/inet/ipaddrsel.conf

    Use the following syntax for entries in /etc/inet/ipaddrsel:

    prefix/prefix-length precedence label [# comment ] 

    See Example 1–1 for examples of some common modifications that you might make.

  5. Load the modified policy table into the kernel.
    # ipaddrsel -f /etc/inet/ipaddrsel.conf
  6. If the modified policy table has problems, restore the default IPv6 address selection policy table.
    # ipaddrsel -d
Example 1-1  Modifying the Default Pv6 Address Selection Policy Table

    The following are some common modifications that you might want to make to your policy table:

  • Assign the highest priority to 6to4 addresses.

    2002::/16                         50 6to4
    ::1/128                           45 Loopback

    The 6to4 address format now has the highest priority, 50. Loopback, which previously had a 50 precedence, now has a 45 precedence. The other addressing formats remain the same.

  • Designate a specific source address to be used in communications with a specific destination address.

    ::1/128                           50 Loopback
    2001:1111:1111::1/128             40 ClientNet
    2001:2222:2222::/48               40 ClientNet
    ::/0                              40 Default

    This particular entry is useful for hosts with only one physical interface. Here, 2001:1111:1111::1/128 is preferred as the source address on all packets that are bound for destinations within network 2001:2222:2222::/48. The 40 priority gives higher precedence to the source address 2001:1111:1111::1/128 than to other address formats configured for the interface.

  • Favor IPv4 addresses over IPv6 addresses.

    ::ffff:0.0.0.0/96                 60 IPv4
    ::1/128                           50 Loopback
    .
    .

    The IPv4 format ::ffff:0.0.0.0/96 has its precedence changed from the default 10 to 60, the highest priority in the table.