Configuration of DHCPv6

DHCPv6 (Dynamic Host Configuration version 6) and SLAAC (Stateless Address Auto Configuration)

  • The host will use 1 of the 3 methods defined by the ICMPv6 RA(Router Advertisement) message received on the interface to obtain the IPv6 address automatically.
  • The Link Local address will be created automatically when the host boots and the interface is active.
  • Sometime there is %number appended the link local address. This is known as a Zone ID or Scope ID. It is used by the OS to associate the Link local address with a specific interface.

fe80::fb:1d54:839f:f595%21

Dynamic IPv6 GUA Assignment

  • Stateless
    • SLAAC only (ALl information is provided by RA message)
    • SLAAC and Stateless DHCPv6 server (RA message provides the IPv6 configuration information and additional information is provided by Stateless DHCPv6 server)
  • Stateful
    • Stateful DHCPv6 server (Hosts obtain IPv6 address information from a stateful DHCPv6 server and the RA message only provide the default gateway information)
  • Although the hosts follow the suggestion of RA message, but the actual decision is ultimately up to the host.

3 RA Message Flags

  • A flag (Address Auto Configuration. SLAAC)
  • O flag (Other Configuration. Stateless DHCPv6 Server)
  • M flag (Managed Address Configuration. Stateful DCHPv6 Server)

RA Flags combination

  • A flag=1 , O flag=0 , M flag=0 (SLAAC only)
  • A flag=1 , O flag=1 , M flag=0 (SLAAC and Stateless DHCPv6 Server)
  • A flag=0 , M flag=1 (Stateful DHCPv6 Server only)

SLAAC

  • To enable the sending of RA message, a router must join the IPv6 all-routers group (FF02::2) using the command

R1(config)# ipv6 unicast-routing

  • An IPv6-enabled router sends RA messages to the IPv6 all-nodes multicast address FF02::1 every 200 seconds.
  • SLAAC method is enabled by default.
    • The client can use EUI-64 (Extended Unique Identifier) method to generate the 64 bits interface ID
    • Generate the 64 bits interface ID randomly.
    • The default gateway is the source address of the RA message

RS message

  • when a client is configured to obtain the address information automatically, it sends an RS message to the IPv6 all-routers multicast address of FF02::2

DAD (Duplicated Address Detection)

  • The host sends an ICMPv6 NS (Neighbor Solicitation) message with a solicited-node multicast address. This address duplicates the last 24 bits of IPv6 address of the host.
  • If no other devices respond with a NA (Neighbor Advertisement) message, then the address is unique and can be used.
  • If there is a NA message received, the host has to determine a new interface ID to use.

DHCPv6 Operation Steps

  1. Host sends an RS (Router Solicitation) message (FF02::2 to all IPv6-enabled routers)
  2. Router responds with an RA (Router Advertisement) message
  3. Host sends a DHCPv6 SOLICIT message (FF02::1:2 reserved IPv6 multicast All-DHCPv6-Servers address. This address has link-local scope which means routers do not forward the messages to other networks.)
  4. DHCPv6 server responds with an ADVERTISE unicast message to inform client that server is available for service.
  5. Host responds to DHCPv6 Server
    • Stateless DHCPv6 client
      • The client creates the IPv6 address using the prefix in the RA message and a self-generated Interface ID.
      • The client sends a DHCPv6 INFORMATION-REQUEST message to the DHCPv6 server requesting additional configuration (e.g.,DNS)
    • Stateful DHCPv6 client
      • The client sends a DHCPv6 REQUEST message to the DHCPv6 server to obtain all IPv6 configuration.
  6. DHCPv6 Server sends a unicast REPLY message

Stateless DHCPv6 Operation

  • The stateless DHCPv6 server is only providing configuration information that is identical for all devices, not IPv6 address.

Enable stateless DHCPv6 on an interface

R1(config-if)# ipv6 nd other-config-flag
    # this command set the flag O=1

Set defalt SLAAC only again

R1(config-if)# no ipv6 nd other-config-flag

Enable Stateful DHCPv6 on an interface

R1(config-if)# ipv6 nd managed-config-flag
# this command set the flag M=1
R1(config-if)# ipv6 nd prefix default no-autoconfig
# this command set the flag A=0

Configure a stateless DHCPv6 server

R1(config)# ipv6 unicast-routing
R1(config)# ipv6 dhcp pool IPV6-STATELESS
R1(config-if)# ipv6 nd other-config-flag
R1(config-if)# ipv6 dhcp server IPV6-STATELESS

Configure a stateless DHCPv6 Client

R3(config)# ipv6 unicast-routing
R3(config-if)# ipv6 enable
# create a Link-local address
R3(config-if)# ipv6 address autoconfig
# use SLAAC

Configure a stateful DHCPv6 Server

R1(config)# ipv6 unicast-routing
R1(config)# ipv6 dhcp pool IPV6-STATEFUL
R1(config-dhcpv6)# address prefix 2001:db8:acad:1::/64
R1(config-if)# ipv6 nd managed-config-flag
R1(config-if)# ipv6 nd prefix default no-autoconfig
R1(config-if)# ipv6 dhcp server IPV6-STATEFUL

Configure a stateful DHCPv6 Client

R3(config)# ipv6 unicast-routing
R3(config-if)# ipv6 enable
R3(config-if)# ipv6 address dhcp

Configure a DHCPv6 relay agent

R1(config-if)# ipv6 dhcp relay destination 2001:db8:acad:1::2 G0/0/0

Leave a Comment

Your email address will not be published. Required fields are marked *