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
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:
Octet 2: Reserved, must be 0
Octets 3-4: VLAN ID (1-4095)
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
Octets 2-3: Reserved, must be 0
Octet 4: Port channel number
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