dhcpcd-discuss

Re: DHCPv6 addresses being assigned with /128 prefixes

harald.albrecht

Wed Sep 27 10:33:18 2017

As I'm not sure that I understand your problem correctly, please cut me some slack in case I did so.
DHCPv6 assigns only IPv6 addresses, so that's the reason why you are seeing /128. In order to use DHCPv6 for address assignments, you definitely need a router advertising the required IPv6 prefix matching your IPv6 address. Without the router advertisements, no prefix route is being generated in the routing table, so DHCPv6 on its own is pretty useless. There's even RFC 5942 "IPv6 Subnet Model: The Relationship between Links and Subnet Prefixes" ... which also tackles the broken kernels that guess /64 prefixes from IPv6 addresses. See, in particular, section 4 "Host Rules", item #1.
And DHCPv6 prefix delegation is not for assigning IPv6 addresses with prefixes, but for use with routers, et cetera.
So, did you make sure to advertise the required /64 prefix to use with the DHCPv6 assigned IPv6 /128 addresses?
Best regards,
Harald

-------- Ursprüngliche Nachricht --------Von: Graham Breed <graham.breed@xxxxxxxxxxxxxx> Datum: 27.09.17  12:14  (GMT+01:00) An: dhcpcd-discuss@xxxxxxxxxxxx Betreff: [dhcpcd-discuss] DHCPv6 addresses being assigned with /128 prefixes 
Hello!

I'm running dhcpcd for plain DHCPv6 address assignment (along with
DHCPv4 and SLAAC).  Everything works except the DHCPv6 addresses are
being created with /128 prefixes where I want /64.  The router
advertisements look correct and if I enable "AdvAutonomous" on the same
subnet on the same link I get SLAAC addresses (from dhcpcd) with the
correct prefix.

I don't know where the prefix should come from and why it's not working.
 I found a section of code for "RFC 5942 Section 5" but I patched it and
it doesn't help so I don't think that's the problem.


Here are some logs as the address gets assigned:

Sep 27 08:59:35 [5605]: eth1: broadcasting SOLICIT6 (xid 0x32576f), next
in 0.9 seconds
Sep 27 08:59:35 [5605]: eth1: ADV
fd70:a6a5:a58b:0:ffff:ffff:ffff:fff8/128 from fe80::a00:27ff:fe5d:6607
Sep 27 08:59:35 [5605]: eth1: broadcasting REQUEST6 (xid 0x8f2ce2), next
in 1.0 seconds
Sep 27 08:59:35 [5605]: eth1: REPLY6 received from fe80::a00:27ff:fe5d:6607
Sep 27 08:59:35 [5605]: eth1: adding address
fd70:a6a5:a58b:0:ffff:ffff:ffff:fff8/128
Sep 27 08:59:35 [5605]: eth1: pltime 1125 seconds, vltime 1800 seconds
Sep 27 08:59:35 [5605]: eth1: renew in 562, rebind in 900, expire in
1800 seconds
Sep 27 08:59:35 [5605]: eth1: writing lease `/var/db/dhcpcd/eth1.lease6'
Sep 27 08:59:35 [5605]: eth1: waiting for DHCPv6 DAD to complete


Here is the configuration:

debug
script /usr/sbin/dhcpcd_hook.py
logfile /var/log/dhcp_client.log

# Request nameservers from the server
option domain_name_servers

# From the example config:
# Use the hardware address of the interface for the Client ID.
clientid
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier


I'm running Linux 4.1.35.  net.ipv6.conf.eth1.accept_ra is 0.


The arch-rival dhclient works correctly on a different machine with the
same DHCPv6 server.


                  Graham

-- 
------------------------------

*Graham Breed*
Systems Developer, ApplianSys

ApplianSys House
Harry Weston Road
Coventry CV3 2UB

www.appliansys.com

*Our sales team sells by referral:*
Less time looking for customers, more time looking after them

ApplianSys Limited registered in England & Wales #: 07608382 at ApplianSys
House, Harry Weston Road, Coventry CV3 2UB


Follow-Ups:
Re: DHCPv6 addresses being assigned with /128 prefixesGraham Breed
Archive administrator: postmaster@marples.name