IPv6 Autoconfiguration

Stateless Address Autoconfiguration (SLAAC) is an IPv6 function used to assign IPv6 addresses on hosts in an IPv6 network. It simplifies network administration.

Stateless means that there is no database used to keep track of what addresses have been assigned and what addresses are still available for an assignment. Addresses conflicts must be resolved by performing a Duplicate Address Detection.

Static Prefix Delegation

See also

For more details check RFC 4862

Configure IPv6 prefixes in the main VRF and advertise the prefixes through the eth0 interface:

vsr running config# vrf main ipv6-autoconf
vsr running ipv6-autoconf# enabled true
vsr running ipv6-autoconf# interface eth0
vsr running interface eth0# prefix 2001:db1:0:1::/64
vsr running prefix 2001:db1:0:1::/64# commit
Configuration committed.

The same configuration can be made using this NETCONF XML configuration

vsr running config# show config xml absolute vrf main ipv6-autoconf
<config xmlns="urn:6wind:vrouter">
  <vrf>
    <name>main</name>
    <ipv6-autoconf xmlns="urn:6wind:vrouter/ipv6-autoconf">
      <enabled>true</enabled>
      <interface>
        <name>eth0</name>
        <prefix>
          <address>2001:db1:0:1::/64</address>
        </prefix>
      </interface>
    </ipv6-autoconf>
  </vrf>
</config>

Show the state of ipv6-autoconf after applying the previous configuration:

vsr running config# show state vrf main ipv6-autoconf
ipv6-autoconf
    interface ntfp1
        max-advertisement-interval 600
        min-advertisement-interval 3
        managed-flag false
        other-config-flag false
        link-mtu 0
        reachable-time 0
        retrans-timer 0
        default-lifetime 0
        prefix 2001:db1:0:1::/64
            send-interface-address false
            on-link true
            valid-lifetime 86400
            preferred-lifetime 14400
            autonomous true
            ..
        ..
    ..

Note

Prefixes matching ::/X are forbidden. To advertise the default route, the default-lifetime parameter should be non-zero.

Dynamic DHCPv6 Prefix Delegation

You can use DHCPv6 Prefix Delegation to automate the delegation of IPv6 prefixes to any link. This feature works exactly like above, but the prefix is dynamically retrieved from a DHCPv6 server, instead of being statically configured by hand.

An optional suffix can be set to create a subnet from the prefix, here we will use 3000::.

First, configure the dhcp-prefix and its associated suffix to be advertised on the interface eth0 and retrieved from the DHCPv6 server from the interface eth1:

vsr running config# vrf main ipv6-autoconf
vsr running ipv6-autoconf# enabled true
vsr running ipv6-autoconf# interface eth0
vsr running interface eth0# dhcp-prefix interface eth1 suffix 3000::
vsr running dhcp-prefix eth1# commit
Configuration committed.

The same configuration can be made using this NETCONF XML configuration

vsr running config# show config xml absolute vrf main ipv6-autoconf
<config xmlns="urn:6wind:vrouter">
  <vrf>
    <name>main</name>
    <ipv6-autoconf xmlns="urn:6wind:vrouter/ipv6-autoconf">
      <enabled>true</enabled>
      <interface>
        <name>eth0</name>
        <dhcp-prefix>
          <interface>eth1</interface>
          <suffix>3000::</suffix>
        </dhcp-prefix>
      </interface>
    </ipv6-autoconf>
  </vrf>
</config>

Show the state of ipv6-autoconf after applying the previous configuration:

vsr running config# show state vrf main ipv6-autoconf
ipv6-autoconf
    interface ntfp1
        max-advertisement-interval 600
        min-advertisement-interval 3
        managed-flag false
        other-config-flag false
        link-mtu 0
        reachable-time 0
        retrans-timer 0
        default-lifetime 0
        dhcp-prefix eth1
            send-interface-address false
            on-link true
            valid-lifetime 86400
            preferred-lifetime 14400
            autonomous true
            ..
        ..
    ..

Now that the configuration is done, the eth0 interface will advertise the prefixes retrieved from the DHCPv6 server on the eth1 interface.

For the moment, no prefixes are retrieved from the eth1, so the state will not show any address.

To enable the DHCPv6 client to retrieve DHCPv6 server prefixes from eth1 link, see IPv6 prefix delegation.

For this example, we will assume that a DHCPv6 server is running, and delegates the prefix 2001:db8::/64. This server is connected to our machine through the eth1 link.

After the prefix is correctly received (it can take some seconds), you will see the resulting delegated address in the state:

vsr running config# show state vrf main ipv6-autoconf
ipv6-autoconf
    enabled true
    interface eth0
        max-advertisement-interval 600
        min-advertisement-interval 3
        managed false
        other-config false
        link-mtu 0
        reachable-time 0
        retransmit-timer 0
        default-lifetime 0
        dhcp-prefix eth1
            on-link true
            valid-lifetime 86400
            preferred-lifetime 14400
            autonomous true
            address 2001:db8:3000::/64
            ..
        ..
    ..

The above example shows that the eth0 interface is now advertising the prefix 2001:db8:3000::/64 and delegates it on the eth1 interface. This prefix is retrieved from the DHCPv6 server and is a combination of the prefix 2001:db8::/64 and the suffix 3000::.

Note

The suffix will be truncated if it exceeds the prefix length. If the provided suffix was 3000:1:2:: and the prefix length was /64 like in our example, the resulting prefix would be 2001:db8:3000:1::/64.

See also

The command reference for more details