PTL-0033 Network Services

Stateful DHCPv6 Address Assignment

Configure and verify a Cisco router as a Stateful DHCPv6 server and examine ICMPv6 Router Advertisement Managed configuration flags, client lease bindings, and end-to-end IPv6 routing.

Level
Advanced
Time
60 min
Packet Tracer
8.2+
Simulator
Tested in Packet Tracer
You configure
Core-R2, DHCP-R1, Switch-S1, Switch-S2
Last reviewed

Packet Tracer files for Stateful DHCPv6 Address Assignment

FILES Packet Tracer topology

Download starter file

starter.pkt, 81 KB. Open it in Cisco Packet Tracer 8.2+. Install Packet Tracer.

Solution / reference file

The completed topology with every task configured. Try the lab first and use this to check your work or when you are stuck.

Download solution file

completed.pkt, 82 KB.

File checksums (SHA-256)
starter.pkt
eb0f4d00c41cdd27f4b697dec7fcb7989eda6df1231a3cfc22003b5c812bed3b
completed.pkt
4d15cdf9af59fd049c76699bb2f42831e8cf6ef8347ed6e5f68f31af9f22e2e3

Part of BSIT Networking Curriculum Learning Path (step 41 of 56) and CCNA-Aligned Topical Study Path (step 41 of 56).

Learning Objectives#

  • Differentiate between Stateless Address Autoconfiguration (SLAAC), Stateless DHCPv6, and Stateful DHCPv6 operation.
  • Configure an enterprise Cisco IOS router as a Stateful DHCPv6 server supplying IPv6 global unicast addresses (GUA), recursive DNS server addresses, and domain search lists.
  • Adjust ICMPv6 Router Advertisement (RA) flags (managed-config-flag and no-autoconfig) on local gateway interfaces to instruct clients to seek stateful leases.
  • Configure Windows/Cisco host PC clients to request IPv6 addresses dynamically via Stateful DHCPv6.
  • Inspect and interpret active DHCPv6 client bindings and DUID database entries on Cisco IOS.
  • Verify routed end-to-end IPv6 packet transport across dual-router network segments.

Prerequisites#

  • Completion of IPv6 Static and Default Routing labs (PTL-0027) or equivalent understanding of IPv6 unicast routing and link-local addressing.
  • Familiarity with ICMPv6 Neighbor Discovery Protocol (NDP), Router Solicitation (RS), and Router Advertisement (RA) messages.
  • Basic knowledge of Cisco IOS interface configuration and static routing syntax.

Topology#

Topology Diagram
Topology Diagram

The topology consists of two Cisco 4321 Integrated Services Routers connected via a point-to-point transit link (2001:DB8:ACAD:A::/64). DHCP-R1 serves as the default gateway and Stateful DHCPv6 server for LAN 1 (2001:DB8:ACAD:1::/64), where PC1 and PC2 connect via access switch Switch-S1. Core-R2 serves as the default gateway for remote LAN 2 (2001:DB8:ACAD:2::/64), where Server-Remote provides network services through Switch-S2.

Addressing Table#

Device Interface IPv6 Address / Prefix IPv6 Link-Local Address Default Gateway Purpose
DHCP-R1 Gi0/0/0 2001:DB8:ACAD:A::1/64 FE80::1 N/A Transit link to Core-R2
DHCP-R1 Gi0/0/1 2001:DB8:ACAD:1::1/64 FE80::1 N/A LAN 1 Gateway & DHCPv6 Server
Core-R2 Gi0/0/0 2001:DB8:ACAD:A::2/64 FE80::2 N/A Transit link to DHCP-R1
Core-R2 Gi0/0/1 2001:DB8:ACAD:2::1/64 FE80::2 N/A LAN 2 Gateway to Server-Remote
Switch-S1 VLAN 1 Unassigned (L2 Access) N/A N/A LAN 1 Layer 2 Switching
Switch-S2 VLAN 1 Unassigned (L2 Access) N/A N/A LAN 2 Layer 2 Switching
PC1 FastEthernet0 DHCPv6 Leased (2001:DB8:ACAD:1::/64) Auto (EUI-64/Random) FE80::1 (via RA) LAN 1 Client A
PC2 FastEthernet0 DHCPv6 Leased (2001:DB8:ACAD:1::/64) Auto (EUI-64/Random) FE80::1 (via RA) LAN 1 Client B
Server-Remote FastEthernet0 2001:DB8:ACAD:2::100/64 Auto 2001:DB8:ACAD:2::1 Remote LAN 2 Server

Lab Tasks#

  1. Verify baseline IPv6 physical connectivity and static routing between DHCP-R1 and Core-R2.
  2. Verify that end-hosts PC1 and PC2 have no stateful IPv6 global unicast leases in the starter state (NEG-01 and NEG-02).
  3. Create and configure Stateful DHCPv6 pool IPV6-STATEFUL-LAN1 on DHCP-R1 with an address prefix, recursive DNS server address, and domain search list.
  4. Bind the DHCPv6 pool to interface GigabitEthernet0/0/1 on DHCP-R1.
  5. Adjust Router Advertisement flags on DHCP-R1 Gi0/0/1 by setting the Managed configuration flag (M=1) and suppressing autonomous address autoconfiguration (A=0).
  6. Trigger DHCPv6 renewals on PC1 and PC2 and inspect acquired leases (POS-01, POS-02, and POS-03).
  7. Verify active client pools and client DUID bindings in Cisco IOS (POS-04 and POS-05).
  8. Validate end-to-end routing and reachability from LAN 1 clients across the inter-router link to Server-Remote (POS-06 and POS-07).

Configuration Walkthrough#

1. Configure the Stateful DHCPv6 Pool on DHCP-R1#

Define the DHCPv6 pool name and allocate the global address prefix and network parameters:

DHCP-R1# configure terminal
DHCP-R1(config)# ipv6 dhcp pool IPV6-STATEFUL-LAN1
DHCP-R1(config-dhcpv6)# address prefix 2001:DB8:ACAD:1::/64
DHCP-R1(config-dhcpv6)# dns-server 2001:4860:4860::8888
DHCP-R1(config-dhcpv6)# domain-name cisco.lab
DHCP-R1(config-dhcpv6)# exit

2. Bind the DHCPv6 Service and Set RA Flags#

To direct clients to query the DHCPv6 server for their global addresses rather than generating them using SLAAC, activate the server on LAN 1 interface GigabitEthernet0/0/1 and manipulate the ICMPv6 RA flags:

DHCP-R1(config)# interface GigabitEthernet0/0/1
DHCP-R1(config-if)# ipv6 dhcp server IPV6-STATEFUL-LAN1
DHCP-R1(config-if)# ipv6 nd managed-config-flag
DHCP-R1(config-if)# ipv6 nd prefix 2001:DB8:ACAD:1::/64 no-autoconfig
DHCP-R1(config-if)# end
DHCP-R1# copy running-config startup-config

Note

The ipv6 nd managed-config-flag sets the M-flag bit in outgoing ICMPv6 Type 134 Router Advertisement messages. This informs receiving hosts that stateful addresses are available via DHCPv6. The ipv6 nd prefix ... no-autoconfig directive clears the Autonomous flag (A-flag bit), instructing clients not to use SLAAC to build addresses from the RA prefix.

3. Verify Client Host Address Acquisition#

On PC1 and PC2, issue the renewal command from the command prompt:

C:\> ipv6config /renew

Check the assigned configuration on PC1:

C:\> ipv6config

FastEthernet0 Connection:(default port)

   Connection-specific DNS Suffix..: cisco.lab 
   Link-local IPv6 Address.........: FE80::250:FFF:FE15:6ECB
   IPv6 Address....................: 2001:DB8:ACAD:1:717D:5548:5548:47B6
   Default Gateway.................: FE80::1
   DHCPv6 IAID.....................: 1684834516
   DHCPv6 Client DUID..............: 00-01-00-01-95-10-3B-14-00-50-0F-15-6E-CB

Verification#

Confirm operational status on the router using the following commands:

  1. Verify DHCPv6 Pool Statistics:

    DHCP-R1# show ipv6 dhcp pool
    DHCPv6 pool: IPV6-STATEFUL-LAN1
      Address allocation prefix: 2001:DB8:ACAD:1::/64 valid 172800 preferred 86400 (6 in use, 0 conflicts)
      DNS server: 2001:4860:4860::8888
      Domain name: cisco.lab
      Active clients: 2
    
  2. Verify DHCPv6 Client Bindings:

    DHCP-R1# show ipv6 dhcp binding
    Client: FE80::250:FFF:FE15:6ECB
      DUID: 0001000195103B1400500F156ECB
      IA NA: IA ID 1684834516, T1 0, T2 0
        Address: 2001:DB8:ACAD:1:717D:5548:5548:47B6
                preferred lifetime 86400, valid lifetime 172800
    
  3. Verify End-to-End Ping Reachability: From PC1 and PC2, ping Server-Remote at 2001:DB8:ACAD:2::100:

    C:\> ping 2001:DB8:ACAD:2::100
    
    Pinging 2001:DB8:ACAD:2::100 with 32 bytes of data:
    Reply from 2001:DB8:ACAD:2::100: bytes=32 time<1ms TTL=126
    Reply from 2001:DB8:ACAD:2::100: bytes=32 time<1ms TTL=126
    Reply from 2001:DB8:ACAD:2::100: bytes=32 time<1ms TTL=126
    Reply from 2001:DB8:ACAD:2::100: bytes=32 time<1ms TTL=126
    
    Ping statistics for 2001:DB8:ACAD:2::100:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
    

For detailed test logs, see verification.md.

Troubleshooting#

  • Client receives Link-Local address only: Ensure that ipv6 unicast-routing is globally enabled on DHCP-R1. Without this directive, the router does not transmit unsolicited ICMPv6 Router Advertisements.
  • Client generates SLAAC address instead of DHCPv6: Verify that ipv6 nd managed-config-flag is set on the LAN interface and that ipv6 nd prefix ... no-autoconfig is applied to suppress SLAAC autoconfiguration.
  • Pool shows 0 active clients: Confirm that the pool prefix matches the subnet configured on the router interface (2001:DB8:ACAD:1::/64) and that ipv6 dhcp server <pool-name> is bound to the correct physical interface.
  • Client cannot reach remote subnets: Check that static route ipv6 route 2001:DB8:ACAD:2::/64 2001:DB8:ACAD:A::2 exists on DHCP-R1 and that return route ipv6 route 2001:DB8:ACAD:1::/64 2001:DB8:ACAD:A::1 exists on Core-R2.

Key Takeaways#

  • Unlike DHCPv4 where default gateway is provided via DHCP Option 3, IPv6 hosts always learn their default gateway from ICMPv6 Router Advertisements (FE80:: link-local address of the router), regardless of whether DHCPv6 or SLAAC is used.
  • Stateful DHCPv6 operates on UDP port 546 (client) and UDP port 547 (server). Clients locate servers by sending Solicit messages to all-DHCPv6-servers multicast address FF02::1:2.
  • The DHCP Unique Identifier (DUID) identifies the client host uniquely across restarts, while the Identity Association for Non-Temporary Addresses (IA_NA) tracks individual leased addresses.

References#

Files and Validation Status#

Reference configurations

Final device configurations from the solution. Like the solution file, these give the answers away.

Core-R2 Core-R2.txt, 1.4 KB
Current configuration : 873 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Core-R2
!
!
!
!
!
!
!
!
ip cef
ipv6 unicast-routing
!
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0

Core-R2#nable
Translating "nable"
% Unknown command or computer name, or unable to find computer address

Core-R2#show running-config
Building configuration...

Current configuration : 873 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Core-R2
!
!
!
!
!
!
!
!
ip cef
ipv6 unicast-routing
!
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0
 description Transit Link to DHCP-R1
 no ip address
 duplex auto
 speed auto
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:ACAD:A::2/64
!
interface GigabitEthernet0/0/1
 description LAN 2 Gateway to Server-Remote
 no ip address
 duplex auto
 speed auto
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:ACAD:2::1/64
!
ip classless
!
ip flow-export version 9
!
ipv6 route 2001:DB8:ACAD:1::/64 2001:DB8:ACAD:A::1
!
!
banner motd ^C Authorized Access Only - Core-R2 Gateway ^C
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

Download Core-R2.txt

DHCP-R1 DHCP-R1.txt, 2.2 KB
Current configuration : 1081 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname DHCP-R1
!
!
!
!
!
!
!
!
ip cef
ipv6 unicast-routing
!
no ipv6 cef
!
ipv6 dhcp pool IPV6-STATEFUL-LAN1
 address prefix 2001:DB8:ACAD:1::/64 lifetime 172800 86400
 dns-server 2001:4860:4860::8888
 domain-name cisco.lab
!
!
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!

DHCP-R1#nable
Translating "nable"
% Unknown command or computer name, or unable to find computer address

DHCP-R1#terminal length 0
                 ^
% Invalid input detected at '^' marker.
	
DHCP-R1#show running-config
Building configuration...

Current configuration : 1081 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname DHCP-R1
!
!
!
!
!
!
!
!
ip cef
ipv6 unicast-routing
!
no ipv6 cef

DHCP-R1#nable
Translating "nable"
% Unknown command or computer name, or unable to find computer address

DHCP-R1#show running-config
Building configuration...

Current configuration : 1081 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname DHCP-R1
!
!
!
!
!
!
!
!
ip cef
ipv6 unicast-routing
!
no ipv6 cef
!
ipv6 dhcp pool IPV6-STATEFUL-LAN1
 address prefix 2001:DB8:ACAD:1::/64 lifetime 172800 86400
 dns-server 2001:4860:4860::8888
 domain-name cisco.lab
!
!
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0
 description Transit Link to Core-R2
 no ip address
 duplex auto
 speed auto
 ipv6 address FE80::1 link-local
 ipv6 address 2001:DB8:ACAD:A::1/64
!
interface GigabitEthernet0/0/1
 description LAN 1 Gateway
 no ip address
 duplex auto
 speed auto
 ipv6 address FE80::1 link-local
 ipv6 address 2001:DB8:ACAD:1::1/64
 ipv6 nd managed-config-flag
 ipv6 dhcp server IPV6-STATEFUL-LAN1
!
ip classless
!
ip flow-export version 9
!
ipv6 route 2001:DB8:ACAD:2::/64 2001:DB8:ACAD:A::2
!
!
banner motd ^C Authorized Access Only - DHCP-R1 Stateful Server ^C
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

Download DHCP-R1.txt

Switch-S1 Switch-S1.txt, 1.2 KB
Current configuration : 1168 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch-S1
!
!
!
no ip domain-lookup
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
banner motd ^C Authorized Access Only - Switch-S1 Access Switch ^C
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
!
end

Download Switch-S1.txt

Switch-S2 Switch-S2.txt, 2.0 KB
Current configuration : 1168 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch-S2
!
!
!
no ip domain-lookup
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13

Switch-S2#nable
Translating "nable"
% Unknown command or computer name, or unable to find computer address

Switch-S2#show running-config
Building configuration...

Current configuration : 1168 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch-S2
!
!
!
no ip domain-lookup
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
banner motd ^C Authorized Access Only - Switch-S2 Access Switch ^C
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
!
end

Download Switch-S2.txt

  • IPv6
  • Dhcpv6
  • Stateful Dhcpv6
  • Slaac
  • Icmpv6
  • Router Advertisement
  • Network Services
  • Cisco IOS

This page is generated from labs/network-services/stateful-dhcpv6-address-assignment/README.md in the repository. Corrections go there.

Search

Type at least two letters, for example OSPF, DHCP relay or VLAN.