Configuring and Administering Network Components in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Using Temporary Addresses for an IPv6 Interface

An IPv6 temporary address includes a randomly generated 64-bit number as the interface ID instead of an interface's MAC address. You can use temporary addresses for any interface on an IPv6 node that you want to keep anonymous. For example, you might want to use temporary addresses for the interfaces of a host that needs to access public web servers. Temporary addresses implement IPv6 privacy enhancements. These enhancements are described in RFC 3041, which is available at “Privacy Extensions for Stateless Address Autoconfiguration in IPv6”.

You enable a temporary address in the /etc/inet/ndpd.conf file for one or more interfaces, if needed. However, unlike standard, autoconfigured IPv6 addresses, a temporary address consists of the 64-bit subnet prefix and a randomly generated 64-bit number. This random number becomes the interface ID segment of the IPv6 address. A link-local address is not generated with the temporary address as the interface ID.

Be aware that temporary addresses have a default preferred lifetime of one day. When you enable temporary address generation, you can also configure the following variables in the /etc/inet/ndpd.conf file:

valid lifetime TmpValidLifetime

Time span in which the temporary address exists, after which the address is deleted from the host.

preferred lifetime TmpPreferredLifetime

Elapsed time before the temporary address is deprecated. This time span should be shorter than the valid lifetime.

address regeneration

Duration of time before the expiration of the preferred lifetime, during which the host should generate a new temporary address.

You express the duration of time for temporary addresses as follows:

n

n number of seconds, which is the default

n h

n number of hours (h)

n d

n number of days (d)

How to Configure a Temporary IPv6 Address

  1. If necessary, enable IPv6 on the host's interfaces

    Refer to How to Configure a System For IPv6.

  2. Edit the /etc/inet/ndpd.conf file to turn on temporary address generation.
    • To configure temporary addresses on all of the interfaces of a host, add the following line to the /etc/inet/ndpd.conf file:

      ifdefault TmpAddrsEnabled true
    • To configure a temporary address for a specific interface, add the following line to the /etc/inet/ndpd.conf file:

      if interface TmpAddrsEnabled true 
  3. (Optional) Specify the valid lifetime for the temporary address.
    ifdefault TmpValidLifetime duration

    This syntax specifies the valid lifetime for all of the interfaces on a host. The value for duration should be in seconds, hours, or days. The default valid lifetime is 7 days. You can also use TmpValidLifetime with the if interface keywords to specify the valid lifetime for a temporary address of a particular interface.

  4. (Optional) Specify a preferred lifetime for the temporary address, after which the address is deprecated.
    if interface TmpPreferredLifetime duration

    This syntax specifies the preferred lifetime for the temporary address of a particular interface. The default preferred lifetime is one day. You can also use TmpPreferredLifetime with the ifdefault keyword to specify the preferred lifetime for the temporary addresses on all of the interfaces of a host.


    Note -  Default address selection gives a lower priority to IPv6 addresses that have been deprecated. If an IPv6 temporary address is deprecated, default address selection chooses a non-deprecated address as the source address of a packet. A non-deprecated address could be the automatically generated IPv6 address or possibly the interface's IPv4 address. For more information about default address selection, see Administering Default Address Selection in Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle Solaris 11.2 .
  5. (Optional) Specify the lead time in advance of address deprecation, during which the host should generate a new temporary address.
    ifdefault TmpRegenAdvance duration

    This syntax specifies the lead time in advance of address deprecation for the temporary addresses of all of the interfaces on a host. The default is 5 seconds.

  6. Change the configuration of the in.ndpd daemon as follows:
    # pkill -HUP in.ndpd
    # /usr/lib/inet/in.ndpd
  7. Verify that temporary addresses have been created by issuing the ipadm show-addr command, as shown in Example 3–4.

    The command output displays the t flag on the CURRENT field of temporary addresses.

Example 3-4  Displaying ipadm show-addr Command Output With Temporary Addresses Enabled

The following example shows the output of the ipadm show-addr command after temporary addresses are created. Note that only IPv6–related information is included in the sample output.

# ipadm show-addr -o all
ADDROBJ   TYPE     STATE CURRENT PERSISTENT ADDR
lo0/v6    static   ok    U----   ---        ::1/128
net0/v6   addrconf ok    U----   ---        fe80::a00:20ff:feb9:4c54/10
net0/v6a  static   ok    U----   ---        2001:db8:3c4d:15:a00:20ff:feb9:4c54/64
net0/?    addrconf ok    U--t-   ---        2001:db8:3c4d:15:7c37:e7d1:fc9c:d2cb/64

Note that for the address object net0/?, the t flag is set under the CURRENT field, indicating that the corresponding address has a temporary interface ID.

See also