Configuring and Administering Network Components in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Configuring an IPv6 Token

The 64-bit interface ID of an IPv6 address is also referred to as a token. During address autoconfiguration, the token is associated with the interface's MAC address. In most cases, non-routing nodes (IPv6 hosts and servers) should use their autoconfigured tokens.

However, using autoconfigured tokens can be a problem for servers with interfaces that are routinely swapped as part of system maintenance. When the interface card is changed, the MAC address is also changed. Servers that depend on having stable IP addresses can experience problems as a result. Various parts of the network infrastructure, such as Domain Name System (DNS) or Network Information System (NIS), might have stored specific IPv6 addresses for the interfaces of the server.

To avoid address change problems, you can manually configure a token to be used as the interface ID in an IPv6 address. To create the token, you specify a hexadecimal number of 64 bits or less to occupy the interface ID portion of the IPv6 address. During subsequent address autoconfiguration, Neighbor Discovery does not create an interface ID that is based on the interface's MAC address. Instead, the manually created token becomes the interface ID. This token remains assigned to the interface, even when a card is replaced.


Note -  The difference between user-specified tokens and temporary addresses is that temporary addresses are randomly generated, rather than explicitly created by a user.

How to Configure a User-Specified IPv6 Token

The following procedure is particularly useful for servers with interfaces that are routinely replaced. You can also follow these steps to configure user-specified tokens on any IPv6 node.

  1. Verify that the interface that you want to configure with a token exists and that no IPv6 addresses are configured on that interface.
    # ipadm show-if
    IFNAME   CLASS      STATE   ACTIVE   OVER
    lo0      loopback   ok       yes     ---
    net0     ip         ok       yes     ---
    
    # ipadm show-addr
    ADDROBJ      TYPE       STATE   ADDR
    lo0/v4       static     ok      127.0.0.1/8

    The previous output shows that the network interface net0 exists with no configured IPv6 address.

  2. Create one or more 64-bit hexadecimal numbers to be used as tokens for the node's interfaces that follows the following format:

    xxxx:xxxx:xxxx:xxxx

  3. Configure each interface that will have a user-specified interface ID (token).
    # ipadm create-addr -T addrconf -i interface-ID interface

    For example, you configure interface net0 with a token as follows:

    # ipadm create-addr -T addrconf -i ::1a:2b:3c:4d/64 net0

    Note -  After the address object has been created with the token, you can no longer modify the token.
  4. Update the IPv6 daemon with the changes.
    # pkill -HUP in.ndpd
Example 3-5  Configuring a User-Specified Token on an IPv6 Interface

The following example shows how to configure net0 with an IPv6 address and a token.

# ipadm show-if
IFNAME   CLASS      STATE    ACTIVE     OVER
lo0      loopback   ok       yes        ---
net0     ip         ok       yes        ---

# ipadm show-addr
ADDROBJ      TYPE       STATE   ADDR
lo0/v4       static     ok      127.0.0.1/8

# ipadm create-addr -T addrconf -i ::1a:2b:3c:4d/64 net0
# pkill -HUP in.ndpd
# ipadm show-addr
ADDROBJ      TYPE       STATE   ADDR
lo0/v6       static     ok      ::1/128
net0/v6      addrconf   ok      fe80::1a:2b:3c:4d/10
net0/v6a     addrconf   ok      2002:a08:39f0:1:1a:2b:3c:4d/64

After the token is configured, the address object net0/v6 has both a link-local address, as well as an address with 1a:2b:3c:4d configured for its interface ID. Note that you can no longer modify the token for this interface after net0/v6 is created.

See also