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 in Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle Solaris 11.3.
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.
# 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
# cp /etc/inet/ipaddrsel.conf /etc/inet/ipaddrsel.conf.orig
# pfedit /etc/inet/ipaddrsel.conf
Use the following syntax for entries in /etc/inet/ipaddrsel:
prefix/prefix-length precedence label [# comment ]
See Example 1, Modifying the Default Pv6 Address Selection Policy Table for examples of some common modifications that you might make.
# ipaddrsel -f /etc/inet/ipaddrsel.conf
# ipaddrsel -d
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.