Some of what I'm about to say is conjecture; in particular I'm
intrigued why
request prefix delegation on em0 for { em1/64 vlan66/64 }
does not work for dhcp6leased(8) while
ipv6only
noipv6rs
interface em0
ipv6rs
ia_na 1
ia_pd 2 em1/0
ia_pd 3 vlan66/0
works for dhcpcd(8).
I don't nor do I plan to use dhcp6leased(8); but based on
dhcp6leased.conf(5), dhcp6leased(8) seems to request the minimum prefix
delegation necessary to assign prefixes to the list of interfaces. In
your case since you listed two interfaces to be assigned /64 prefixes,
dhcp6leased(8) likely requests a /63 prefix to be delegated.
If memory serves me correctly, Xfinity only supports /60 and /64 prefix
delegations. This possibly explains why IPv6 doesn't work in that
situation.
In contrast you've directed dhcpcd(8) to request multiple /64 prefix
delegations which is not the same thing as requesting a single prefix
delegation and subnetting from it. Per dhcp6leased.conf(5):
More than one prefix can be requested from a DHCPv6 server, however
most ISP DHCPv6 servers will only delegate a single prefix. Therefore
it is better to let dhcp6leased(8) request a single larger prefix and
split it up. dhcp6leased(8) has a compile time limit on how many
prefix requests per interface it can handle.
Apparently Xfinity does support multiple prefix delegation requests;
otherwise dhcpcd(8) would have failed as well. I conjecture that when
Xfinity is requested to delegate multiple prefixes they internally
delegate a /60 to you and manually carve out the requested /64 prefixes
from it. Personally, even though it works, I'd configure dhcpcd(8) to
request a /60 and have it assign /64 prefixes from that /60. For
example my dhcpcd.conf(5) looks like:
noipv6rs
denyinterfaces !(ixl2)
allowinterfaces ixl2
script ""
link_rcvbuf 65536
interface ixl2
duid
iaid 0
ia_na 0
ia_pd 0/::/60 -
ipv6rs
nooption domain_name,domain_name_servers,domain_search,fqdn,
host_name,ntp_servers,time_offset,time_servers
option rapid_commit
persistent
require dhcp_server_identifier
waitip 64
In your case you'd have something like:
ia_pd 0/::/60 em1/0/64 vlan66/1/64
Note you'd also need to add those interfaces to allowinterfaces.
If you wanted to test the theory that Xfinity doesn't support /63
prefix delegations using dhcpcd(8), change above to:
ia_pd 0/::/63 em1/0/64 vlan66/1/64
If IPv6 doesn't work, then that lends credence to my conjecture.
To get dhcp6leased(8) to request a /60 prefix delegation and have it
manage the /64 subnets, I think the below may work:
request prefix delegation on em0 for { em1/64 vlan66/64 reserve/61 }
Per dhcp6leased.conf(5):
The special name reserve can be used to reserve space in the delegated
prefix for later use or when an interface is removed.
Here the minimum prefix delegation necessary to support above is /60
-the /60 will be subnetted into two /61s: one used for "reserve" while
the other will be subnetted further into two /64s to be used for em1
and vlan66 respectively.
Do note that dhcp6leased(8) only implements DHCPv6-PD; in particular it
does _not_ implement DHCPv6-NA. A consequence of this is that em0 will
not have IPv6 connectivity to the global Internet. If that's important,
then you (likely) have no choice but to use dhcpcd(8)-the line ia_na 0
is what directs dhcpcd(8) to request a non-temporary address for ixl2.
Xfinity is also my ISP, and it supports both DHCPv6-NA and DHCPv6-PD.
I don't _think_ Xfinity supports RFC 6603[^1]; and even if it does,
I'm not sure dhcp6leased(8) does. If both do though, then you can
assign a /128-/63 to em0 from the /60. For example:
request prefix delegation on em0 for { em0/128 em1/64 vlan66/64
reserve/61 }
Last RFC 4361[^2] recommends that dual-stack clients use the same DUID
for both DHCP and DHCPv6. I doubt Xfinity cares about this, but it's
another reason I use dhcpcd(8) for both DHCP and DHCPv6 since I can
ensure /var/db/dhcpcd/duid contains a valid DUID-UUID[^3] based on UUID
version 1[^4].
[^1]: https://www.rfc-editor.org/rfc/rfc6603
[^2]: https://www.rfc-editor.org/rfc/rfc4361
[^3]: https://www.rfc-editor.org/rfc/rfc6355
[^4]: https://www.rfc-editor.org/rfc/rfc9562