DHCPv6 works pretty much the same way DHCP does in version 4, with the obvious
difference that it supports the new addressing scheme for IPv6. It might come as a surprise, but
there are a couple of other options that DHCP still provides for us that autoconfiguration
doesn’t. I’m serious—there’s absolutely no mention of DNS servers, domain names, or many
of the other options that DHCP has always provided via IPv4 with autoconfiguration. This is
a big reason why it’s likely we’ll still be using DHCP in IPv6 most of the time.
Upon booting up in IPv4, a client sends out a DHCP discover message looking for a server
to give it the information it needs. But remember, in IPv6, the Router Solicitation and Router
Advertisements process happens first. If there’s a DHCPv6 server on the network, the RA that
comes back to the client will tell it whether DHCP is available for use. If a router isn’t found,
the client will respond by sending out a DHCP solicit message—a solicit message that’s actually
a multicast message addressed with a source of ff02::1:2, meaning all DHCP agents,
including both servers and relays.
It’s good to know that there’s some support for DHCPv6 in the Cisco IOS. But it’s limited
to a stateless DHCP server, meaning it doesn’t offer any address management of the pool, plus
the options available for configuring that address pool are limited to the DNS, domain name,
and SIP servers only.
This means you’re definitely going to need some other server around that can supply and
dispense all the additional, required information, as well as manage the address assignment.
Anyway, here’s how the configuration looks for the stateless DHCP server in the router
IOS—it’s really close to what you’d configure with IPv4:
Router1(config)#
ipv6 dhcp pool ?
WORD DHCP pool name
Router1(config)#
ipv6 dhcp pool test
Router1(config-dhcp)#
?
TABLE 1 0 . 2
IPv6 DHCP Commands
Command Meaning
(config)#
ipv6 dhcp pool
Creates a pool of address on the router
(config-dhcp)#
dns-server
Sets IPv6 address of the DNS server
(config-dhcp)#
domain-name
Company domain name used for DNS lookups
(config-dhcp)#
Prefix-delegation
Sets the IPv6 subnet mask for the pool and the
registered lifetime
(config-if)#
ipv6 dhcp server pool-name
Assigns the pool to an interface on the router
IPv6 DHCP configuration commands:
default Set a command to its defaults
dns-server DNS servers
domain-name Domain name to complete unqualified host names
exit Exit from DHCPv6 configuration mode
no Negate a command or set its defaults
prefix-delegation IPv6 prefix delegation
sip SIP Servers options
Router1(config-dhcp)#
dns-server ?
Hostname or X:X:X:X::X Server's name or IPv6 address
Router1(config-dhcp)#
domain-name lammle.com
Router1(config-dhcp)#
prefix-delegation ?
X:X:X:X::X/<0-128> IPv6 x:x::y/
aaa Acquire prefix from AAA
pool IPv6 prefix pool
Router1(config-dhcp)#
prefix-delegation pool ?
WORD IPv6 prefix pool
Router1(config-dhcp)#
prefix-delegation pool test ?
lifetime Configure prefix lifetimes
Router1(config-dhcp)#
prefix-delegation pool test lifetime ?
<60-4294967295> Valid lifetime (seconds)
at Expire prefix at a specific time/date
infinite Infinite valid lifetime
Router1(config-dhcp)#
prefix-delegation pool test lifetime 3600 ?
<60-4294967295> Preferred lifetime (seconds)
infinite Infinite preferred lifetime
Router1(config-dhcp)#
prefix-delegation pool test lifetime 3600 3600 ?
Router1(config-dhcp)#
prefix-delegation pool test lifetime 3600 3600
Notice that just like in DHCP with IPv4, you don’t need to set a lifetime.
Now that I have the pool configured, I just have to assign it to an interface, which is a
departure from IPv4:
Router1(config)#
int fa 0/0
Router1(config-if)#
ipv6 dhcp server ?
WORD Name of IPv6 DHCP pool
Router1(config-if)#
ipv6 dhcp server test
Sweet—I now have a fully configured DHCPv6 server applied to the interface fa0/0!