Configuring a Peer Device for DHCPv6 Address Auto-configuration

To configure a peer router for stateful and stateless Dynamic Host Configuration Protocol for IPv6 (DHCPv6) address auto-configuration, you need to set specific parameters on the interface. The following task configures a peer router for stateful DHCPv6 address auto-configuration.
For stateful address configuration, a device obtains an IPv6 address and other configuration parameters, such as domain name server (DNS) and domain search list, from a DHCPv6 server.
  1. Enter global configuration mode.
    device# configure terminal
  2. Enter interface configuration mode.
    device(config)# interface ethernet 1/1/5
  3. Configure an IPv6 address for the interface.
    device(config-if-e1000-1/1/5)# ipv6 address 3010::1/64
  4. Enable IPv6 for the interface.
    device(config-if-e1000-1/1/5)# ipv6 enable
  5. Configure the prefixes to be included in router advertisement (RA) messages.
    device(config-if-e1000-1/1/5)# ipv6 nd prefix-advertisement 3010::/64 3000 3000 onlink
    The peer router is configured to advertise the prefix 3010::/64 in router advertisement (RA) messages sent out on Ethernet interface 1/1/5 with a valid lifetime of 3000 seconds, a preferred lifetime of 3000 seconds, and the onlink flag set.
  6. Enable the managed configuration flag for IPv6.
    device(config-if-e1000-1/1/5)# ipv6 nd managed-config-flag
    The peer router is configured to send RA messages with the Managed Configuration Flag (M-flag) set to 1, indicating that the client should use DHCPv6 to obtain its IPv6 address.

This following example configures a peer router for stateful DHCPv6 address auto-configuration.

device# configure terminal
device(config)# interface ethernet 1/1/5
device(config-if-e1000-1/1/5)# ipv6 address 3010::1/64
device(config-if-e1000-1/1/5)# ipv6 enable
device(config-if-e1000-1/1/5)# ipv6 nd prefix-advertisement 3010::/64 3000 3000 onlink
device(config-if-e1000-1/1/5)# ipv6 nd managed-config-flag

This following example configures a peer router for stateless DHCPv6 address auto-configuration. For stateless address configuration, a device obtains network configuration parameters, such as domain name server (DNS) and domain search list, from a DHCPv6 server without obtaining an IPv6 address from the server. Instead, the IPv6 address is auto-configured using Router Advertisements (RA).

device# configure terminal
device(config)# interface ethernet 1/1/6
device(config-if-e1000-1/1/6)# ipv6 address 3010::1/64
device(config-if-e1000-1/1/6)# ipv6 enable
device(config-if-e1000-1/1/6)# ipv6 nd prefix-advertisement 3010::/64 3000 3000 onlink autoconfig
device(config-if-e1000-1/1/6)# ipv6 nd other-config-flag