dhcpcd-discuss

Re: DHCPv6 addresses being assigned with /128 prefixes

Graham Breed

Fri Sep 29 10:39:46 2017

On 28/09/17 19:03, harald.albrecht wrote:

> Well, IPv6 addresses don't have prefix lengths outside the Linux kernel universe. Linux uses the prefix length attached to its addresses to autogenerate route table entries ... probably in an attempt to do IPv4 in IPv6. After all, IPv6 is just IPv4 with longer addresses ... what could probably go wrong ;) So with dhcpcd you should never see an address/128. Or am I mixing up the route table entries with the address table entries here, that is, you refer to the routing table entries?

You know, I'm wondering if I've been getting this wrong.  I assumed that
the IP addresses as shown by the "ip address" Linux command should show
/64 if I know the subnet is /64.  But it doesn't seem to matter because
the routing table knows that the address is in the /64 subnet and does
the right thing.

A simple test confirms this: I make two DHCPV6-configured clients and I
can get an SSH connection from one to the other with no problem.  The
only apparent issue is the output of "ip address".

> From my experience with dhcpcd it correctly creates the required route table entries. And the IPv6 address table just contains /128 addresses, but not any prefix information. But I'm also dazzled why your setup doesn't work. Disclaimer: I use dhcpcd for PD and SLAAC only, never had a need to deploy IA-NAs.

My experience of dhcpcd so far has been that it wasn't working with
DHCPv6 because we didn't have the router advertisements correct.  My
experience with DHCPv6 was, therefore, with the older versions of
dhclient that used a /64 in violation of the RFC.  So my expectations
were that a /64 should come back (as it does with SLAAC).  But maybe my
expectations are wrong and this is the way it's supposed to be.

It does make some sense, in that the routing table might be changed
after the DHCPv6 address is assigned.  Choosing a prefix based on the
routing table at the point the address was assigned doesn't guarantee
that the prefix will be valid for the whole life of the address.  I
think I set the lifetime of the router advertisement to be longer than
the lifetime of the DHCPv6 lease, but maybe I missed something, or maybe
dhcpcd doesn't care.


                 Graham


> Best regards,Harald
> 
> -------- Ursprüngliche Nachricht --------Von: Graham Breed <graham.breed@xxxxxxxxxxxxxx> Datum: 28.09.17  15:17  (GMT+01:00) An: Roy Marples <roy@xxxxxxxxxxxx>, dhcpcd-discuss@xxxxxxxxxxxx Betreff: Re: [dhcpcd-discuss] DHCPv6 addresses being assigned with /128
>   prefixes 
> On 28/09/17 13:43, Roy Marples wrote:
> 
>> ISC dhclient **only** does DHCPv6. It doesn't handle any RA recieved
>> inforamtion such as prefixes, not will it generate any routes.
>> AFAIK, no patches for it do either - instead a 3rd party will do this.
>> NetworkManager, systemd, Linux kernel (if dhcpcd hasn't turned that off).
>>
>> So what you say about dhclient not receiving SLAAC addressess makes
>> perfect sense.
> 
> The interface is configured to receive the addresses, however Ubuntu
> does that.  This is a separate test VM without dhcpcd.  And SLAAC works
> with a "route" section in radvd.conf along with the "prefix" (or maybe
> it just takes a while to apply).  But DHCPv6 is still giving /128
> addresses in both cases.
> 
> So I'm still mystified in that both implementations think there's
> something wrong, but I don't know what it is.
> 
>> dhcpcd is the only all-in-one solution :)
> 
> Indeed, and we find it useful to use it like that to control all dynamic
> address and route assignment.  And it makes this all the more
> perplexing, because if dhcpcd can use the prefix length to assign a
> stateless address, why not use the same prefix length for the DHCPv6
> address?  It wouldn't attempt to get the address at all if it hadn't
> received the correct advertisement.
> 
> 
>> dhcpcd is saying that a 3rd party deleted the address.
> 
> In that case, I know what the 3rd party is, so never mind this detail.
> 
> 
>                    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 prefixesRoy Marples
References:
Re: DHCPv6 addresses being assigned with /128 prefixesharald.albrecht
Archive administrator: postmaster@marples.name