Guest

IP Version 6 (IPv6)

DHCPv6 using the Prefix Delegation Feature Configuration Example

Cisco - DHCPv6 using the Prefix Delegation Feature Configuration Example

Document ID: 113141

Updated: Jul 25, 2011

   Print

Introduction

This document describes how to use the Prefix Delegation feature in order to configure the DHCPv6 (Dynamic Host Configuration Protocol for IPv6) server and client. This feature can be used to manage link, subnet, and site addressing changes.

In this example configuration, the router named DHCPv6 server has the Prefix Delegation feature enabled and acts as a delegating router. The delegating router automates the process of assigning prefixes to the requesting router (that is, the DHCP client). Once the server has delegated prefixes to the client, the interface that is connected to the local area network (LAN) of the requesting router has an IPv6 address using the received prefix block. The requesting router then announces this address in the Router Advertisement messages. The client routers (that is, the routers in the local network) can use the autoconfig option to pull the global IP address from the advertised Router Advertisement messages by the DHCP client.

Prerequisites

Requirements

Ensure that you meet these requirements before you attempt this configuration:

Components Used

This document is not restricted to specific software and hardware versions.

The configurations in this document is based on the Cisco 3700 series router on Cisco IOS® Software Release software 12.4 (15)T 13.

Conventions

Refer to Cisco Technical Tips Conventions for information on document conventions.

Configure

In this section, you are presented with the information to configure the features described in this document.

Note: Use the Command Lookup Tool (registered customers only) to find more information on the commands used in this document.

Network Diagram

This document uses this network setup:

DHCPv6-01.gif

Configurations

This document uses these configurations:

Here's a link to video that demonstrates the steps involved in configuring DHCPv6 on Cisco IOS routers available on Cisco Support Community leavingcisco.com:

Configuration of DHCPv6 in Cisco IOS leavingcisco.com

DHCPv6-02.gif

DHCP Server Configuration
DHCPSERVER#show running-config

version 12.4
!
hostname DHCPSERVER
!
ipv6 unicast-routing
ipv6 dhcp pool dhcpv6

!--- The DHCP pool is named "dhcpv6."

!
prefix-delegation pool dhcpv6-pool1 lifetime 1800 600

!--- The prefix delegation pool name is "dhcpv6-pool1."

!
dns-server 2001:DB8:3000:3000::42
domain-name example.com
!
interface Serial0/0
 no ip address
 ipv6 address 2010:AB8:0:1::1/64
 ipv6 enable
 ipv6 dhcp server dhcpv6
 clock rate 2000000
!
ipv6 local pool dhcpv6-pool1 2001:DB8:1200::/40 48

!--- The prefix pool named dhcpv6-pool1 has a prefix of  length
!--- /40 from which it will delegate (sub)prefixes of length /48.

!
end

DHCP Client Configuration
DHCPCLIENT#show running-config

version 12.4
!
hostname DHCPCLIENT
!
ipv6 unicast-routing
!
interface Serial0/0
no ip address
ipv6 address autoconfig default

!--- The autoconfig default adds a static ipv6 
!--- default route pointing to upstream DHCP server.

!
ipv6 enable
ipv6 dhcp client pd prefix-from-provider

!--- The DHCP client prefix delegation is 
!--- given the name prefix-from-provider.

!
clock rate 2000000
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address prefix-from-provider ::1:0:0:0:1/64

!--- The first 48 bits are imported from the delegated
!--- prefix (2001:db8:1200) and the ::/64 is the client
!--- identifier that gives the interface Fa0/1 the
!--- global IPv6 address 2001:DB8:1200:1::1/64.

!
ipv6 enable
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
ipv6 enable
ipv6 address prefix-from-provider ::1/64

!--- Similarly, the global IPv6 address 
!--- for fa0/1 is 2001:DB8:1200::1.

!
end

Local LAN Configuration
Client 1 Client 2
CLIENT1#show running-config

version 12.4
!
hostname CLIENT1
!
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address autoconfig

!--- The clients can run autoconfig to get an IPv6
!--- address depending on the router advertisements 
!--- sent by the DHCP client (requesting router).

!
ipv6 enable
!
end
CLIENT2#show running-config

version 12.4
!
hostname CLIENT2
!
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address autoconfig
ipv6 enable
!
end

Verify

Use the commands described in this section in order to verify the configuration.

Note: In order to conserve space, some output in this section wraps to a new line.

On the DHCP Server

The output in this section shows that the number of active clients is 1 and also shows other configuration parameter information, such as domain name server address and preferred life time information.

show ipv6 dhcp pool
DHCPv6 pool: dhcpv6
  Prefix pool: dhcpv6-pool1
  preferred lifetime 600, valid lifetime 1800
  DNS server: 2001:DB8:3000:3000::42
  Domain name: example.com
  Active clients: 1

The show ipv6 dhcp binding command provides information about the clients, which includes their DUIDs, IAPDs, prefixes, and preferred and valid lifetimes.

show ipv6 dhcp binding
Client: FE80::C002:FFF:FEB4:0
  DUID: 00030001C2020FB40000
  Username : unassigned
  Interface : Serial0/0
  IA PD: IA ID 0x00060001, T1 300, T2 480
  Prefix: 2001:DB8:1200::/48
  preferred lifetime 600, valid lifetime 1800
  expires at Mar 02 2002 01:26 AM (1707 seconds)

On the DHCP Client

The show ipv6 dhcp interface command shows that interface S0/0 is configured in client mode and also shows the details of the DNS server address and the domain name that it received from the DHCP server.

show ipv6 dhcp interface
Serial0/0 is in client mode
  State is OPEN
  Renew will be sent in 00:04:37
  List of known servers:
  Reachable via address: FE80::C003:FFF:FEB4:0
  DUID: 00030001C2030FB40000
  Preference: 0
  Configuration parameters:
  IA PD: IA ID 0x00060001, T1 300, T2 480
  Prefix: 2001:DB8:1200::/48
  preferred lifetime 600, valid lifetime 1800
  expires at Mar 01 2002 10:59 AM (1777 seconds)
  DNS server: 2001:DB8:3000:3000::42
  Domain name: example.com
  Information refresh time: 0
  Prefix name: prefix-from-provider
  Rapid-Commit: disabled

The show ipv6 interface command on the FastEthernet interfaces Fa0/0 and Fa0/1 provides this output:

show ipv6 int fa0/0 show ipv6 int fa0/1
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address 
          is FE80::C002:FFF:FEB4:0
  No Virtual link-local address(es):
  Global unicast address(es):
    2001:DB8:1200:1::1, subnet is 
          2001:DB8:1200:1::/64 [CAL/PRE]
      valid lifetime 1535 preferred lifetime 335

!--- Output omitted.

FastEthernet0/1 is up, line protocol is up
  IPv6 is enabled, link-local address 
          is FE80::C002:FFF:FEB4:1
  No Virtual link-local address(es):
  Global unicast address(es):
    2001:DB8:1200::1, subnet is 
          2001:DB8:1200::/64 [CAL/PRE]
      valid lifetime 1712 preferred lifetime 512

!--- Output omitted.

The show ipv6 general-prefix command verifies any received prefix (general prefix) from the DHCP server through Prefix Delegation.

show ipv6 general-prefix
IPv6 Prefix prefix-from-provider, acquired via DHCP PD
  2001:DB8:1200::/48 Valid lifetime 1656, preferred lifetime 456

!--- 2001:DB8:1200::/48 is the general prefix received from server.


   FastEthernet0/1 (Address command)
   FastEthernet0/0 (Address command)

On the Local LAN Clients

The show ipv6 interface command on the FastEthernet interface Fa0/0 of the client routers Client 1 and Client 2 provides this output:

show ipv6 int fa0/0
Client 1 Client 2
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address 
          is FE80::C000:FFF:FEB4:0
  No Virtual link-local address(es):
  Global unicast address(es):
  2001:DB8:1200:1:C000:FFF:FEB4:0, subnet is 
          2001:DB8:1200:1::/64 [EUI/CAL/PRE]
  valid lifetime 1709 preferred lifetime 509
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address 
          is FE80::C001:FFF:FEB4:0
  No Virtual link-local address(es):
  Global unicast address(es):
  2001:DB8:1200:0:C001:FFF:FEB4:0, subnet 
          is 2001:DB8:1200::/64 [EUI/CAL/PRE]
  valid lifetime 1770 preferred lifetime 570

Troubleshoot

There is currently no specific troubleshooting information available for this configuration.

Related Information

Updated: Jul 25, 2011
Document ID: 113141