Re: Updating to 7.0-beta3, dhcpv6-pd setup, duid change
Roy Marples
Sat Apr 22 08:59:47 2017
Hi Stuart
On 22/04/17 00:13, Stuart Henderson wrote:
> I ran into a small problem when updating, the new file locations
> meant I get a new DUID and my Zen (my ISP)'s dhcpv6-pd server refused
> to give me a lease right away with this.
Yeah, that does suck.
I didn't really want to move the file locations, but with people just
cloning new VM's from a master /etc they had to be moved out of there
just to solve a lack of proper management from users.
> I haven't yet tested what would happen if I bounce the VDSL connection
> and retry at that point or leave it to see if it works eventually (I would
> certainly hope so!)
Well, that really depends on upstream ISP.
>, but am wondering if it might make sense to help
> ease the transition by reading the value from /etc/dhcpcd.duid as a
> fallback iff /var/db/dhcpcd/duid doesn't exist at startup.
I thought about that as well, but rejected it as it's a lot of effort in
dhcpcd itself for something that is effectively one shot.
This is better handled by the packaging.
dhcpcd copies the old files over via it's Makefile, so a full `make
install` from source is fine (as long as it's installing to / and not
some destdir):
https://dev.marples.name/source/dhcpcd/browse/master/src/Makefile;85a4d9004e12fd2696a29e050c4df662dc603068$92
NetBSD's postinstall handles this here:
https://nxr.netbsd.org/xref/src/usr.sbin/postinstall/postinstall#877
Similar code in Gentoo (but also caters for even older file changes from
dhcpcd-3):
https://gitweb.gentoo.org/repo/gentoo.git/tree/net-misc/dhcpcd/dhcpcd-7.0.0_beta3.ebuild#n59
I should really get off my lazy behind and update pkgsrc dhcpcd Makefile
to do the same.
> For completeness I'll include config, logs and captures, but the only
> thing different between non-working and working is the DUID.
> Apr 21 23:26:01 jodrell dhcpcd[36707]: vlan2: IAID conflicts with one
assigned to vlan3666: Undefined error: 0
Fixed the silly error appending here:
https://dev.marples.name/rDHC24abc42d92cfbd3e4681d54c8ad62af6dc7adc92
>
> noipv6rs
> ipv6only
> duid
> persistent
> option rapid_commit
> require dhcp_server_identifier
> slaac private
> nohook resolv.conf, lookup-hostname
> allowinterfaces pppoe1 vlan2 vlan3666 vlan5
>
> # zen
> interface pppoe1
> iaid 1
> ia_pd 2 vlan2/1 vlan3666/2 vlan5/3
You might want to use different iaid's for your vlans to remove those
warnings:
(iaid is based on MAC address)
interface vlan2
iaid 2
interface vlan3666
iaid 3666
interface vlan5
iaid 5
I should probably try and add some code to special case vlan, but I'm
not sure (and not checked either) if I can work out it's a vlan from
userland.
Roy
Archive administrator: postmaster@marples.name