Re: DHCPv6 addresses being assigned with /128 prefixes
Roy Marples
Wed Sep 27 18:27:19 2017
Hi Graham
On 27/09/2017 11:14, Graham Breed wrote:
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.
As Harald said in his reply, this is not possible.
DHCPv6 addresses are just an addresss, there is no way to associate it
with a prefix route, even if one currently exists.
This means that the prefix route has to be correctly setup via RA.
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.
Nothing above looks wrong or out of place.
The arch-rival dhclient works correctly on a different machine with the
same DHCPv6 server.
You've not said what dhclient version is.
Early versions of DHCPv6 in dhclient did try to erroneously associate
the DHCPv6 address with a prefix - later versions behave correctly like
dhcpcd and do not. Is this what you are seeing?
If not, can post address and routing output from both please and
describe what you think is correct and incorrect about it?
I'm glad you've tried dhcpcd-6 and dhcpcd-7.0.0-rc2, but any fixes if
needed will go into dhcpcd-7
Roy
Archive administrator: postmaster@marples.name