DHCPv6 Commands

This chapter contains the following sections:

clear ipv6 dhcp client

To restart DHCP for an IPv6 client on an interface, use the clear ipv6 dhcp client command in Privileged EXEC mode.

Syntax

clear ipv6 dhcp client interface-id

Parameters

  • interface-id—Interface identifier.

Command Mode

Privileged EXEC mode

User Guidelines

This command restarts DHCP for an IPv6 client on a specified interface after first releasing and unconfiguring previously-acquired prefixes and other configuration options (for example, Domain Name System [DNS] servers).

Example

The following example restarts the DHCP for IPv6 client on VLAN 100:

switchxxxxxx# clear ipv6 dhcp client vlan 100

ipv6 address dhcp

To enable DHCP for an IPv6 client process and acquire an IPv6 address on an interface, use the ipv6 address dhcp command in Interface Configuration mode. To remove the address from the interface, use the no form of this command.

Syntax

ipv6 address dhcp [rapid-commit]

no ipv6 address dhcp

Parameters

  • rapid-commit—Allows the two-message exchange method for address assignment.

Default Configuration

No IPv6 addresses are acquired from the DHCPv6 server.

Command Mode

Interface (VLAN) Configuration mode

Interface (Ethernet, Port Channel) Configuration mode

User Guidelines

This command enables IPv6 on an interface (if it is not enabled) and starts the DHCP for IPv6 client process, if this process is not yet running and if an IPv6 interface is enabled on the interface. This command allows an interface to dynamically learn its IPv6 address by using DHCPv6 and enables the DHCPv6 Stateless service.

The rapid-commit keyword enables the use of the two-message exchange for address allocation and other configuration. If it is enabled, the client includes the rapid-commit option in a solicit message.

This command allows an interface to dynamically learn its IPv6 address by using DHCPv6.

The DHCPv6 stateless service allows to receive the configuration from a DHCP server, passed in the following options:

  • Option 7: OPTION_PREFERENCE - The preference value for the server in this message

  • Option 12: OPTION_UNICAST - The IP address to which the client should send messages delivered using unicast

  • Option 23: OPTION_DNS_SERVERS - List of DNS Servers IPv6 Addresses

  • Option 24: OPTION_DOMAIN_LIST - Domain Search List

  • Option 31: OPTION_SNTP_SERVERS - List of SNTP Servers IPv6 Addresses

  • Option 32: OPTION_INFORMATION_REFRESH_TIME - Information Refresh Time Option

  • Option 41: OPTION_NEW_POSIX_TIMEZONE - New Timezone Posix String

  • Option 59: OPT_BOOTFILE_URL - Configuration Server URL

    Option 60: OPT_BOOTFILE_PARAM, the first parameter - Configuration File Path Name

The DHCPv6 client uses the following IAID format based on the interface-id on which it is running:

  • Octet 1, bits 7-4: These bits are reserved and must be 0

  • Octet 1, Bits 3-0: These bits contain the interface type:

    0—VLAN

    • 1—Ethernet port

    • 2—Port channel

    • 3—Tunnel

  • Octets 2-4: The octets contain a value depending on the interface type in the network format:

    • VLAN

Octet 2: Reserved, must be 0

Octets 3-4: VLAN ID (1-4095)

  • Ethernet port

Octet 2, bits 7-4: Slot number

Octet 2, bits 3-0: Port Type:

0—Ethernet

1—Fast Ethernet

2—Giga Ethernet

3—2.5 Giga Ethernet

4—5 Giga Ethernet

5—10 Giga Ethernet

6—12 Giga Ethernet

7—13.6 Giga Ethernet

8—16 Giga Ethernet

9—20 Giga Ethernet

10—40 Giga Ethernet

11—100 Giga Ethernet

Octet 3: Unit number

Octet 4: Port number

  • Port channel

Octets 2-3: Reserved, must be 0

Octet 4: Port channel number

  • Tunnel

Octets 2-3: Reserved, must be 0

Octet 4: Tunnel number

When IPv6 Forwarding is enabled only stateless information is required from a DHCPv6 server.

When IPv6 forwarding is changed from disabled to enabled, IPv6 addresses assigned by a DHCPv6 are removed.

When IPv6 forwarding is changed from enabled to disabled receiving IPv6 addresses from a DHCPv6 server is resumed.

The DHCPv6 client, server, and relay functions are mutually exclusive on an interface.

Example

The following example enables IPv6 on VLAN 100 and acquires an IPv6 address:

switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ipv6 address dhcp
switchxxxxxx(config-if)# exit

ipv6 dhcp client information refresh

To configure the refresh time for IPv6 client information refresh time on a specified interface if the DHCPv6 server reply does not include the Information Refresh Time, use the ipv6 dhcp client information refresh command in Interface Configuration mode. To return to the default value of the refresh time, use the no form of this command.

Syntax

ipv6 dhcp client information refresh seconds | infinite

no ipv6 dhcp client information refresh

Parameters

  • seconds—The refresh time, in seconds. The value cannot be less than the minimal acceptable refresh time configured by the ipv6 dhcp client information refresh command. The maximum value that can be used is 4,294967,294 seconds (0xFFFFFFFE).

  • infinite—Infinite refresh time.

Default Configuration

The default is 86,400 seconds (24 hours).

Command Mode

Interface Configuration mode

User Guidelines

The ipv6 dhcp client information refresh command specifies the information refresh time. If the server does not sends an information refresh time option then a value configured by the command is used.

Use the infinite keyword, to prevent refresh, if the server does not send an information refresh time option.

Example

The following example configures an upper limit of 2 days:

switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ipv6 dhcp client information refresh 172800
switchxxxxxx(config-if)# exit

ipv6 dhcp client information refresh minimum

To configure the minimum acceptable refresh time on the specified interface, use the ipv6 dhcp client information refresh minimum command in Interface Configuration mode. To remove the configured refresh time, use the no form of this command.

Syntax

ipv6 dhcp client information refresh minimum seconds | infinite

no ipv6 dhcp client information refresh minimum

Parameters

  • seconds—The refresh time, in seconds. The minimum value that can be used is 600 seconds. The maximum value that can be used is 4,294,967,294 seconds (0xFFFFFFFE).

  • infinite—Infinite refresh time.

Default Configuration

The default is 86,400 seconds (24 hours).

Command Mode

Interface Configuration mode

User Guidelines

The ipv6 dhcp client information refresh minimum command specifies the minimum acceptable information refresh time. If the server sends an information refresh time option of less than the configured minimum refresh time, the configured minimum refresh time will be used instead.

This command may be configured in the following situations:

  • In unstable environments where unexpected changes are likely to occur.

  • For planned changes, including renumbering. An administrator can gradually decrease the time as the planned event nears.

  • Limit the amount of time before new services or servers are available to the client, such as the addition of a new Simple Network Time Protocol (SNTP) server or a change of address of a Domain Name System (DNS) server.

If you configure the infinite keyword client never refreshes the information.

Example

The following example configures an upper limit of 2 days:

switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ipv6 dhcp client information refresh 172800
switchxxxxxx(config-if)# exit

ipv6 dhcp duid-en

To set the Vendor Based on Enterprise Number DHVPv6 Unique Identified (DUID-EN) format, use the ipv6 dhcp duid-en command in Global Configuration mode.

To return to the default value, use the no form of this command.

Syntax

ipv6 dhcp duid-en enterprise-number identifier

no ipv6 dhcp duid-en

Parameters

  • enterprise-number—The vendor’s registered Private Enterprise number as maintained by IANA.

  • identifier—The vendor-defined non-empty hex string (up to 64 hex characters). If the number of the character is not even ’0’ is added at the right. Each 2 hex characters can be separated by a period or colon.

Default Configuration

DUID Based on Link-layer Address (DUID-LL) is used. The base MAC Address is used as a Link-layer Address.

Command Mode

Global Configuration mode

User Guidelines

By default, the DHCPv6 uses the DUID Based on Link-layer Address (see RFC3315) with the Base MAC Address as a Link-layer Address.

Use this command to change the DUID format to the Vendor Based on Enterprise Number.

Examples

Example 1. The following sets the DIID-EN format:

ipv6 dhcp duid-en 9 0CC084D303000912

Example 2. The following sets the DIID-EN format using colons as delimiter:

switchxxxxxx(config)# ipv6 dhcp duid-en 9 0C:C0:84:D3:03:00:09:12

show ipv6 dhcp

To display the Dynamic DHCP unique identifier (DUID) on a specified device, use the show ipv6 dhcp command in User EXEC mode.This information is relevant for DHCPv6 clients and DHCPv6 relays.

Syntax

show ipv6 dhcp

Command Mode

User EXEC mode

User Guidelines

This command uses the DUID, which is based on the link-layer address for both client and server identifiers. The device uses the MAC address from the lowest-numbered interface to form the DUID.

Examples

Example 1. The following is sample output from this command when the switch’s DUID format is vendor based on enterprise number:

switchxxxxxx# show ipv6 dhcp
The switch’s DHCPv6 unique identifier(DUID)is 0002000000090CC084D303000912
  Format: 2
  Enterprise Number: 9
  Identifier: 0CC084D303000912

Example 2. The following is sample output from this command when the switch’s DUID format is the vendor-based on link-layer address:

switchxxxxxx# show ipv6 dhcp
The switch’s DHCPv6 unique identifier(DUID)is 000300010024012607AA
  Format: 3
  Hardware type: 1
  MAC Address: 0024.0126.07AA

Example 3. The following is sample output from this command when the switch’s DUID format is vendorbased on link-layer address and DHCPv6 Relay is supported:

switchxxxxxx# show ipv6 dhcp
The switch’s DHCPv6 unique identifier(DUID)is 000300010024012607AA
  Format: 3
  Hardware type: 1
  MAC Address: 0024.0126.07AA
Relay Destinations:
  2001:001:250:A2FF:FEBF:A056
  2001:1001:250:A2FF:FEBF:A056
  2001:1011:250:A2FF:FEBF:A056 via VLAN 100
  FE80::250:A2FF:FEBF:A056 via VLAN 100
  FE80::250:A2FF:FEBF:A056 via VLAN 200

show ipv6 dhcp interface

To display DHCP for IPv6 interface information, use the show ipv6 dhcp interface command in User EXEC mode.

Syntax

show ipv6 dhcp interface [interface-id]

Parameters

  • interface-id—Interface identifier.

Command Mode

User EXEC mode

User Guidelines

If no interfaces are specified in the command, all interfaces on which DHCP for IPv6 (client or server) is enabled are displayed. If an interface is specified in the command, only information about the specified interface is displayed.

Note. This new output format is supported starting with the SW version supporting statefull configuration

Example

The following is sample output from this command when DHCPv6 client is enabled:

switchxxxxxx# show ipv6 dhcp interface
VLAN 100 is in client mode
  Configuration:
    Statefull Service is enabled (rapid-commit)
    Auto-Configuration is enabled
    Information Refresh Time: 86400 seconds
    Information Refresh Minimum Time: 600 seconds
  State:
    DHCP Operational mode is enabled
    Statefull Service is available
  DHCP server:
    Address: FE80::204:FCFF:FEA1:7439
    DUID: 000300010002FCA17400
    Preference: 20
  IPv6 Address Information:
    IA NA: IA ID 0x00040001, T1 120, T2 192
    IPv6 Address: 30e0::12:45:11
      preferred lifetime: 300, valid lifetime: 54333
      expires at Nov 08 2002 09:11 (54331 seconds)
      renew for address will be sent in 54301 seconds
    IPv6 Address: 3012::13:af:25
      preferred lifetime: 280, valid lifetime: 51111
      expires at Nov 08 2002 08:17 (51109 seconds)
      renew for address will be sent in 5101 seconds
  Stateless Information:
    Information Refresh Time:  86400 seconds
    expires at Nov 08 2002 08:17 (51109 seconds)
    DNS Servers: 1001::1, 2001::10
    DNS Domain Search List: company.com beta.org
    SNTP Servers: 2004::1
    POSIX Timezone string: EST5EDT4,M3.2.0/02:00,M11.1.0/02:00
    Configuration Server: config.company.com
    Configuration Path Name: qqq/config/aaa_config.dat
    Indirect Image Path Name: qqq/config/aaa_image_name.txt
VLAN 105 is in client mode
 Configuration:
    Statefull Service is enabled
    Auto-Configuration is disabled
    Information Refresh Time: 86400 seconds
    Information Refresh Minimum Time: 600 seconds
  State:
    DHCP Operational mode is enabled
    Statefull Service is not available (IPv6 routing is enabled)
  DHCP server:
    Address: FE80::204:FCFF:FEA1:7439
    DUID: 000300010002FCA17400
    Preference: 20
  Stateless Information:
    Information Refresh Time:  86400 seconds
    expires at Nov 08 2002 08:17 (51109 seconds)
    DNS Servers: 1001::1, 2001::10
    DNS Domain Search List: company.com beta.org
    SNTP Servers: 2004::1
    POSIX Timezone string: EST5EDT4,M3.2.0/02:00,M11.1.0/02:00
    Configuration Server: config.company.com
    Configuration Path Name: qqq/config/aaa_config.dat
    Indirect Image Path Name: qqq/config/aaa_image_name.txt
VLAN 107 is in client mode
 Configuration:
    Statefull Service is enabled
    Auto-Configuration is enabled
    Information Refresh Time: 86400 seconds
    Information Refresh Minimum Time: 600 seconds
  State:
    DHCP Operational mode is enabled
    Statefull Service is not available (IPv6 routing is enabled)
  DHCP server:
    Address: FE80::204:FCFF:FEA1:7439
    DUID: 000300010002FCA17400
    Preference: 20
  Stateless Information:
    Information Refresh Time:  86400 seconds
    expires at Nov 08 2002 08:17 (51109 seconds)
    DNS Servers: 1001::1, 2001::10
    DNS Domain Search List: company.com beta.org
    SNTP Servers: 2004::1
    POSIX Timezone string: EST5EDT4,M3.2.0/02:00,M11.1.0/02:00
    Configuration Server: config.company.com
    Configuration Path Name: qqq/config/aaa_config.dat
    Indirect Image Path Name: qqq/config/aaa_image_name.txt
VLAN 110 is in client mode
 Configuration:
    Statefull Service is enabled
    Auto-Configuration is disabled
    Information Refresh Time: 86400 seconds
    Information Refresh Minimum Time: 600 seconds
  State:
    DHCP Operational mode is disabled (IPv6 is not enabled)
VLAN 1000 is in client mode
 Configuration:
    Statefull Service is enabled
    Auto-Configuration is enabled
    Information Refresh Time: 86400 seconds
    Information Refresh Minimum Time: 600 seconds
  State:
    DHCP Operational mode is disabled (Interface status is DOWN)
  DHCP server:
    Address: FE80::204:FCFF:FEA1:7439
    DUID: 000300010002FCA17400
    Preference: 20
  Stateless Information:
    Information Refresh Time:  86400 seconds
    expires at Nov 08 2002 08:17 (51109 seconds)
    DNS Servers: 1001::1, 2001::10
    DNS Domain Search List: company.com beta.org
    SNTP Servers: 2004::1
    POSIX Timezone string: EST5EDT4,M3.2.0/02:00,M11.1.0/02:00
    Configuration Server: config.company.com
    Configuration Path Name: qqq/config/aaa_config.dat
    Indirect Image Path Name: qqq/config/aaa_image_name.txt
VLAN 1010 is in relay mode
  DHCP Operational mode is enabled
  Relay source interface: VLAN 101
  Relay destinations:
    2001:001:250:A2FF:FEBF:A056
    FE80::250:A2FF:FEBF:A056 via FastEthernet 1/0/10