Date: Wed, 24 Jul 2024 09:10:22 +0100 From: Roy Marples <roy@marples.name> To: "Karl Denninger" <karl@denninger.net> Cc: "freebsd-net" <freebsd-net@freebsd.org> Subject: Re: DHCPv6 IA_PD - how-to Message-ID: <190e3ca9424.10cb640b9133631.4510537448957801250@marples.name> In-Reply-To: <ed40dd43-3aa9-42ac-aff9-0d14c041379a@denninger.net> References: <CA0C0E7D-4956-4DB4-A274-D74C84A18529@distal.com> <190e09e6c1a.11450232913849.654798645277119294@marples.name> <ed40dd43-3aa9-42ac-aff9-0d14c041379a@denninger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
---- On Wed, 24 Jul 2024 02:48:15 +0100 Karl Denninger wrote ---=20 > I'd like to replicate this that is currently being sent up via = dhcp6c, which is not quite-clear to me from the docs on how to do that= . > # > # This configuration will attempt to get /56 or a /60 from the > # ISP and assign a /64 internally. > # Note that if you have a /60 you can have four /64s defined; if = you have a > # /56 then obviously you can have 16 internal networks.=C2=A0 For = most "house" > # size networks four separate delineations is enough, for most = "moderate" > # sized corporate environments 16 is enough.=C2=A0 BE AWARE THAT T= HE SLA-LEN MUST > # MATCH THE DIFFERENCE BETWEEN THE LOCAL PREFIX AND THE REMOTE = ONE!=C2=A0 If > # you ask for a /56 then sla-len is 8, if you ask for a /60 then = the sla-len > # is 4 (difference between the requested prefix length and 64, = respectively.) > # > =20 > interface igb0 { > =C2=A0=C2=A0=C2=A0=C2=A0 send ia-pd 1; > =C2=A0=C2=A0=C2=A0=C2=A0 send ia-na 1; > =C2=A0=C2=A0=C2=A0=C2=A0 send rapid-commit; > =C2=A0=C2=A0=C2=A0=C2=A0 script "/usr/local/etc/dhcp6c.script"; > }; > =20 > id-assoc na 1 { > =20 > }; > =20 > id-assoc pd 1 { > =C2=A0 prefix ::/56 1800; > =20 > =C2=A0 prefix-interface igb1 { > =C2=A0=C2=A0=C2=A0 sla-id 0; > =C2=A0=C2=A0=C2=A0 sla-len 8; > =C2=A0 }; > =C2=A0=20 > }; > =20 > igb1 is the "normal" internal network; igb0 is the external one. > The ISP hands out /56s (although at one time I could choose eit= her a /56 or /60); I have routines in the script file that then genera= te dynamic updates for DNS so the gateway has its pointers updated if/= when the address changes (I run my own zones) > =20 > Its not entirely-clear how to replicate that in the config file for = dhcpcd; I can figure out the script I'm sure, but the base config is not cl= ear to me. So you would add this to the bottom of the default dhcpcd.conf file: interface igb0 ia_na ia_pd 0/::/56 igb1/0/64 That mirrors your config exactly apart from requesting a specific lifetime = which dhcpcd doesn't support for PD. rapid commit is enabled already in the default dhcpcd.conf file. You could then edit /etc/dhcpcd.exit-hook to handle your DDNS. You might be able to get away with this lighter config as well, based on wh= at you said: interface igb0 ia_na ia_pd 0 igb1 Any pointers on now to make this more clear in dhcpcd.conf(5) are welcome. Good luck! Roy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?190e3ca9424.10cb640b9133631.4510537448957801250>