Cisco DHCPv6 Server Configuration

Hi Laz,
helpful ? yes it is

The true thing is: when you dive in DHCPv6, this is much more complex than DHCPv4. So i think this WAS one of the reasons not to introduce DHCPv6 in your company !!!

For those who are interesting i recommand 2 links from Pepelnjak


and

  1. my post was not clear.When a host use DHCPv6 (is forced to) it receives an ipv6 IID from the server DHCPv6. This IID is built randomly by the server and sent to the host: and the server stores the binding with this host. The question was: independently of DHCP (v6), when you assign a static addr to an interface why IOS does not offer a option to set IID randomly ?

  2. if you read the pepelnjak’s papers above, written in 2012 you will find
    “At the moment (2012), DHCPv6 cannot be used to send the prefix length …to IPv6 hosts”

I wonder why DHCPv6 was built in a so complex way.

First, you have to use ND RA to send prefix/length and to force dhcpv6 with flag M=1 and prefix flag A=1 and prefix flag L=1
Second, the server dhcpv6 has to build randomly the IID and send it to the host
Is it right ?

Pepelnjak said “at the moment”, so what is the situation in 2020 ? 8 years later

Regards

1 Like

Hello Dominique

It’s always great to see your posts, and to spend the time looking deeper into the concepts of IPv6!
Thanks for sharing those posts with us.

The answer here is “I don’t know”. This has to do with the policies adopted by each individual vendor and the way the operating system of the device is configured. Typically, if SLAAC is used, a Cisco device will use EUI-64 to generate its IID even for the global unicast address. A Microsoft Windows PC for example, will by default use a random interface ID, but can be configured to use the EUI-64 process. As far as I know Cisco devices cannot be configured to create a random IID. It’s not ideal from a privacy perspective, but there you go.

An effort has been made in IPv6 to disassociate the prefix length from the actual address. Unlike IPv4, where the subnet mask was an absolutely necessary component of the address, the prefix length here is something a little less connected. This is evident from comments I made in this other post responding to another query you had.

The prefix length is always provided by the default router via the RA.

I think the reasoning behind this architecture is to try to make IPv6 as “plug and play” as possible. What I mean is, if everything is set to the default, an IPv6 device plugged in to an IPv6 network, will automatically gain its default gateway and obtain network connectivity without a single configuration from a human being. This philosophy is phenomenal if you think about it, because from now on, new devices (TVs, cameras, refrigerators, washers, dryers, lights, cars, alarm systems, traffic signs, sensors, etc, etc, etc, etc…) will all automatically obtain network connectivity. Do you want to go in and configure each one? Or configure each network to function appropriately? These will all connect by default.

The whole concept behind all of this is to make future networks, which will be networks with devices that don’t have a direct human-computer interface, obtain network connectivity with zero configuration. In order to achieve this “simplicity” it was necessary to create a more complex autoconfiguration concept for such networks. For networks that require more information than is available from the autoconfig, like more traditional PCs, IP phones, mobile phones, laptops etc, such as DNS, and additional DHCP options, the additional functionality of DHCPv6 is added on top of the autoconfig capability.

And as always, I hope this has been helpful!

Laz

3 Likes

Great lesson! When I tried this lab today on GNS3 (2.2.25) using VIRL images, specifically IOSv 15.7 routers, concerning the stateless configuration, my stateless host could not compute a Global unicast ipv6 address unless i configured it first with the ipv6 address autoconfig command. If I did the stateless DHCP server first, then tried to enable autoconfig on my stateless host it would not compute a Global unicast address only a link-local. Is there a reason for this?

Hello Earl

An IPv6 interface will compute a global unicast IPv6 address only if the ipv6 address autoconfig command is issued AND there is an active IPv6 router on that subnet. So your first statement makes sense, that no IPv6 global unicast address is computed unless that command is issued on the interface.

Your second statement however shouldn’t be so. If you have the DHCPv6 stateless configuration on the DHCPv6 router configured, then R2 should be able to compute its global unicast IPv6 address. If no IPv6 global unicast address can be computed, then that means that R2 is not able to receive any RA messages from the DHCPv6 router. Can you confirm that your configuration is correct? You can also use the debug commands used in the lesson to see if the information request is being received by the DHCPv6 router.

Let us know how you get along so that we can help you further in troubleshooting.

I hope this has been helpful!

Laz

Hi,
I’m trying to sort out an issue with DHCPv6 Lease times.
My issue is how do I set a lease to infinite.
The default Lease time for Cisco kit is 30 days, i would like to make it like a static address.
I’ve tried the information refresh infinite but that doesn’t appear to change the 30 days.

Andy

Hello Andy

I went into one of my production ISR 4331 routers and created an IPv6 DHCP pool called “laz”.
I attempted to change the information refresh infinite command, and I was able to do so:

R1(config)#ipv6 dhcp pool laz
R1(config-dhcpv6)#information refresh infinite
R1(config-dhcpv6)#exit
R1(config)#exit
R1#show ipv6 dhcp pool
DHCPv6 pool: laz
  Information refresh: 4294967295
  Active clients: 0
R1#

You can see that the information refresh is set to 4294967295. The value for the refresh time interval is represented by a 32-bit value. According to RFC 8415, when this 32-bit number is set to all ones, the value is interpreted as infinity. This means that the information refresh value of 4294967295, which is 2^32 which is indeed the decimal number that corresponds to a 32-bit number of all ones, thus it means infinity.

What do you see on your device that indicates that this configuration doesn’t change the DHCPv6 behavior? Let us know so that we can further help you in your troubleshooting procedures.

I hope this has been helpful!

Laz

Hi Laz,
I was looking in the wrong place…
I was looking under

ISP#sh ipv6 dhcp bind
Client: FE80::5054:FF:FE04:4B25 
  DUID: 00030001525400044B25
  Username : unassigned
  VRF : default
  Interface : GigabitEthernet0/0
  IA PD: IA ID 0x00020001, T1 302400, T2 483840
    Prefix: 2001:DB8:1100::/48
            preferred lifetime 604800, valid lifetime 2592000
            expires at Nov 05 2021 11:18 AM (2590873 seconds)

and expecting the expires to change but as you pointed out

ISP#sh ipv6 dhcp pool
DHCPv6 pool: CUSTOMERS
  Prefix pool: GLOBAL_POOL
               preferred lifetime 604800, valid lifetime 2592000
  DNS server: 2001:4860:4860::8888
  DNS server: 2001:4860:4860::8844
  Domain name: NETWORKLESSONS.LOCAL
  Information refresh: **4294967295**
  Active clients: 1

is where I should have been looking.

I’ll have to start reading the RFC’s :thinking:

1 Like

Hi Community !

As we verify #show ipv6 dhcp pool on DHCPV6 Server , the STATEFUL DHCP pool is showing Active Clients where as STATELESS DHCP pool is showing Active Clients = 0, even though STATELESS DHCPV6 client received IPV6 address through AUTOCONFIG. Please explain if any config is missing.

Hello Raghu

When configuring DHCP pools for use with stateless DHCP, the DHCP server is not actually managing IPv6 addresses. It is just providing supplementary information such as DNS server addresses to the stateless clients. Since no actual IPv6 addresses are being provided by the DHCP pool, the “active client” number remains zero. An active client is only one for which IPv6 addresses are actively managed.

I labbed this one up as well just to verify.

I hope this has been helpful!

Laz

Hi Lazaros
Thanks for the explanation. :smile:

1 Like

Hi all,

very interesting discussion and lab. I’m trying to setup a similar IPV6 dhcp stateful environment using also a dhcp relay router so dhcp server and client are not on the same segment.
For now I have some problems because router acting as client is not able to get also the ipv6 address from dhcp; it seems that dhcp server is receiving request and seems reply…but in some parts the comunication is broken

Do you have in plan to describe in a lesson lab also this type of case?

Thanks
Stefano

Hello Stefano

That’s a good exercise to do. You can take a look at the following thread in Cisco’s community that describes how to set up a DHCPv6 relay.

Remember that for DHCPv6, it is possible to have your local router deliver the IPv6 prefix to the client, and still use DHCPv6 relay for other network parameters such as DNS server for example. So even if you do enable the relay feature, you may not be getting your IPv6 addresses from the relayed DHCPv6 server, but from the local router. In order to ensure that your IPv6 addresses are being delivered by the DHCPv6 server, you can use the no-autoconfig keyword as used in this lesson.

Can you share some more details of the specific trouble you are facing in your particular implementation? Maybe we’ll be able to help you further…

I hope this has been helpful!

Laz

Hello Laz,
Thanks a lot for your suggestion that confirmed my experience on the Lab.

My issue at the end was a trivial routing problem due to the mechanism how the DHCP relay router send packet to DHCP server , using Always as source ip the wan interface and not the interface facing clients

I’ll send as soon as possibile a description of my Lab and a synthesis of configs applied.

Just a note : for my experience using a Cisco iOS router to simulate an IPv6 client It Is Better to not enable IPv6 unicast-routing as with routing enabled i was not able ti have a a vallid default route installed.

Thanks and good Day to all

Stefano

Hello Stefano

Thanks for sharing your solution! Looking forward to seeing your description of the lab for more detailed info.

Yes, thanks for pointing that out. That would be best practice since most IPv6 hosts, such as a PC or a mobile device are not capable of IPv6 routing, so that would be a more accurate simulation.

Thanks for your input!

Laz

I have got an issue with the command
#ipv6 address dhcp

I couldn’t find dhcp after address, when i put ?
It gives other options but not dhcp.

Hello Abdalla

It seems that your device simply doesn’t support the DHCP option for IPv6 addresses. There are indeed some IOS versions that will not support this. Can you share your IOS version with us so we can verify?

I hope this has been helpful!

Laz

Thank you Lagpides,
Cisco IOS Software, 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2014 by Cisco Systems, Inc.
Compiled Thu 20-Feb-14 06:51 by prod_rel_team

ROM: ROMMON Emulation Microcode
BOOTLDR: 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5, RELEASE SOFTWARE (fc1)

Hello Abdalla

The 7200 series routers are indeed older routers with an end of sale data in 2012 and end of support date of 2017. Although they do support some IPv6 features, I believe that they are limited, and this is why you do not find the command in the CLI.

To confirm this I tried going into the archived data section of the Cisco Feature Navigator to find the exact features that the device supports, however, I was unable to find it, or the service was down at the time. Cisco states that the data in the archived section may be incomplete, so I was unable to confirm. However, you can attempt to go to this Cisco tool and determine if the configuration of an IPv6 address on an interface via DHCP is supported.

I hope this has been helpful!

Laz

I cannot help but notice

ipv6 DHCP interface FastEthernet 0/0

And show interface brief dont seem to give you any information about the prefix on the client.

Is there a command to determine what prefix was assigned to my client?

Hello Patrick

That’s a good question. Looking at the output of the show ipv6 dhcp interface FastEthernet 0/0 command in the lesson, you can see that it displays a /128 prefix like so:

 Configuration parameters:
      IA NA: IA ID 0x00030001, T1 43200, T2 69120
        Address: 2001:1111:1111:1111:255A:E159:32AF:5E42/128
                preferred lifetime 86400, valid lifetime 172800
                expires at Jul 19 2014 08:30 PM (172750 seconds)
      DNS server: 2001:4860:4860::8888
      Domain name: NETWORKLESSONS.LOCAL

I also tried to lab this up in CML, and found that the output of the above command is a little different:

R1#show ipv6 interface gi 0/1
GigabitEthernet0/1 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::5054:FF:FE0A:8FA6 
  No Virtual link-local address(es):
  Global unicast address(es):
    2001:1111:1111:1111:AD88:B915:BE2A:969, subnet is 2001:1111:1111:1111:AD88:B915:BE2A:969/128 
  Joined group address(es):
    FF02::1
    FF02::1:FF0A:8FA6
    FF02::1:FF2A:969
  MTU is 1500 bytes
!>-- output omitted--<

Again, however, the subnet is indicated as /128. I tried all of the above with the fully DHCPv6 learned address as well as with the SLAAC learned address, and it seems that the result is the same. I always get an indicator of /128 rather than the expected /64 that is offered by the DHCPv6 server.

Looking at the debugs, I see that the DHCP server sends a /64 address:

*Aug 14 08:27:25.877: IPv6 DHCP: Sending ADVERTISE to FE80::5054:FF:FE0A:8FA6 on GigabitEthernet0/1
*Aug 14 08:27:26.986: IPv6 DHCP: Received REQUEST from FE80::5054:FF:FE0A:8FA6 on GigabitEthernet0/1
*Aug 14 08:27:26.987: IPv6 DHCP: Using interface pool STATEFUL
*Aug 14 08:27:26.987: IPv6 DHCP: Looking up pool 2001:1111:1111:1111::/64 entry with username '0003000152540004ED3B00030001'
*Aug 14 08:27:26.988: IPv6 DHCP: Poolentry for user found
*Aug 14 08:27:26.988: IPv6 DHCP: Found address 2001:1111:1111:1111:E5A8:CA6A:9088:C670 in binding for FE80::5054:FF:FE0A:8FA6, IAID 00030001
*Aug 14 08:27:26.988: IPv6 DHCP: Updating binding address entry for address 2001:1111:1111:1111:E5A8:CA6A:9088:C670
*Aug 14 08:27:26.988: IPv6 DHCP: Setting timer on 2001:1111:1111:1111:E5A8:CA6A:9088:C670 for 172800 seconds
*Aug 14 08:27:26.989: IPv6 DHCP: SAS retured Null falling to link local

… but the client receives a /128 prefix:

*Aug 14 08:27:29.295: IPv6 DHCP: Received REPLY from FE80::5054:FF:FE0D:7AC7 on GigabitEthernet0/1
*Aug 14 08:27:29.295: IPv6 DHCP: Processing options
*Aug 14 08:27:29.295: IPv6 DHCP: Adding address 2001:1111:1111:1111:E5A8:CA6A:9088:C670/128 to GigabitEthernet0/1

Even when I look up the routing table, I see the route of the directly connected network as /128.

However, because we are still able to ping the interface of the DHCPv6 server, this means that the prefix understood by the router cannot be /128. If it was, it would assume the destination address is outside of the local subnet, and would look for a default router, which is not configured.

So to answer your question, I’m not sure. For some reason, all indications in the client, whether using DHCPv6 or autoconfig, seem to show a /128 prefix, but the routing seems to be operating correctly. Let me pass this one by @ReneMolenaar as well to see his opinion. Will get back to you shortly! In the meantime…

I hope this has been helpful!

Laz