tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dhcpcd and routing of ipv6 prefixes



On 13/06/2016 19:16, Rhialto wrote:
> On Mon 13 Jun 2016 at 20:14:51 +0200, Gert Doering wrote:
>> Hi,
>>
>> On Mon, Jun 13, 2016 at 08:08:25PM +0200, Rhialto wrote:
>>> On Mon 13 Jun 2016 at 12:50:09 +0100, Roy Marples wrote:
>>>>
>>>> On 12/06/2016 20:37, Rhialto wrote:
>>>>> re0: adding address 2001:984:4b2a:fc::1/62
>>>>> re0: pltime 3600 seconds, vltime 7200 seconds
>>>>> if_addaddress6: Invalid argument
>>>>
>>>> That's a touch odd and worrying as I was hoping to release a new build.
>>>
>>> It kept repeating periodically:
>>>
>>> Jun 13 18:23:45 murthe dhcpcd[9146]: re0: adding address 2001:984:4b2a:fc::1/62
>>> Jun 13 18:23:45 murthe dhcpcd[9146]: if_addaddress6: Invalid argument
>>
>> Why is it trying to add a /62 there?  I think this could be the issue,
>> as many OSes assume that "a LAN interface has a /64, period"

I doubt it's the issue.
This looks like a bug in dhcpcd and needs to be fixed.
I will try and replicate this later today.

> 
> Possibly... but this is apparently a "feature" of the Fritz!Box, that it
> gives out /62s.

No, no, handing out a /62 is fine.
What you want to end up with is a /64 for easy SLAAC config - any other
prefix length will require hosts to have working DHCPv6 to get a
routeable address (ie, this rules out all Android devices as they don't
believe in DHCPv6 at all).

	# get a /64 and assign it to re0
	ia_pd 2 re0/0

That is wrong, at least in the trunk version.
An SLA of zero without specifying the prefix length now just takes the
prefix as is and assigns it to one interface. What you want is this.

	# Try and make a /64, otherwise take what we're given.
	# (delegated prefix length + interface index) <= 64
	ia_pd 2 re0

or

	# Try and make a /64, otherwise take what we're given.
	# interface index could be >2 which fails when handed a /62.
	ia_pd 2 re0/1

or

	# Force a /64.
	# We could use an SLA of 0 here, but it's more clear to use >0.
	ia_pd 2 re0/1/64

Comments on how to improve dhcpcd.conf(5) to reflect this are welcome :)

Roy


Home | Main Index | Thread Index | Old Index