But the best solution would still be to allow a WAN interface to track itself. This has been requested and discussed before, but turned out to be harder than expected (as far as I remember).
The requesting router MUST NOT assign any delegatedprefixes or subnets from the delegated prefix(es) tothe link through which it received the DHCP messagefrom the delegating router.[RFC3633 Section 12.1]
Aha, here is the rub-in:https://github.com/opnsense/dhcp6c/blob/master/prefixconf.c#L204-L210Code: [Select]The requesting router MUST NOT assign any delegatedprefixes or subnets from the delegated prefix(es) tothe link through which it received the DHCP messagefrom the delegating router.[RFC3633 Section 12.1]Discuss!Somehow the logging is off but in foreground mode you get the message...Apr/26/2024 09:32:24: create a prefix 2003:xxxx:xxxx:xxxx::/61 pltime=3600, vltime=7200Apr/26/2024 09:32:24: add an address 2003:xxxx:xxxx:xxxx::/64 on igb0Apr/26/2024 09:32:24: skip igb1 as a prefix interface
But if we leave this as is, then (in the extreme) nobody in Japan can use Opnsense directly attached to an ONU device (and if behind an ISP-provided router, then you need to do IPv6 NAT, since only a /64 subnet is assigned to each device), so anything we can do to solve this?
You do not need a GUA on WAN. And you can NAT outbound packets on WAN to e.g. "LAN address" so the firewall itself can use IPv6.
Quote from: jbourne on May 06, 2024, 09:10:52 amBut if we leave this as is, then (in the extreme) nobody in Japan can use Opnsense directly attached to an ONU device (and if behind an ISP-provided router, then you need to do IPv6 NAT, since only a /64 subnet is assigned to each device), so anything we can do to solve this?You do not need a GUA on WAN. And you can NAT outbound packets on WAN to e.g. "LAN address" so the firewall itself can use IPv6.
"MUST NOT" is unambiguous - discussion over.
You do not need NAT for IPv6, just assign and use the LAN GUA. And in firewall rules, you can use "this firewall" or the dynamic IPv6 of the LAN interface. I do it since that discussion long ago. Not sure about GIF interfaces, though.
Quote from: meyergru on May 06, 2024, 09:21:31 amYou do not need NAT for IPv6, just assign and use the LAN GUA. And in firewall rules, you can use "this firewall" or the dynamic IPv6 of the LAN interface. I do it since that discussion long ago. Not sure about GIF interfaces, though.How do you make outbound traffic, e.g. NTP, DNS, download of updates ... from the firewall itself use that address? Will that happen automatically, i.e. will the services use the only GUA locally bound if there is only one?
Quote from: Patrick M. Hausen on May 06, 2024, 09:03:15 am"MUST NOT" is unambiguous - discussion over. Yes, in the RFC3633 which got obsoleted by RFC8415 which doesn't have such a restriction as far as I could find.I did test it without the code and it works... it would be optional anyway.. so I'm merely looking for an expert opinion WRT RFC8415.Maurice, where are you? Cheers,Franco
An IA_PD is different from an IA for address assignment in that it does not need to be associated with exactly one interface. One IA_PD can be associated with the client, with a set of interfaces, or with exactly one interface. A client configured to request delegated prefixes must create at least one distinct IA_PD.
WAA-6: If the IPv6 CE router receives a Router Advertisement message (described in [RFC4861]) with the M flag set to 1, the IPv6 CE router MUST do DHCPv6 address assignment (request an IA_NA option).WAA-7: If the IPv6 CE router does not acquire a global IPv6 address(es) from either SLAAC or DHCPv6, then it MUST create a global IPv6 address(es) from its delegated prefix(es) and configure those on one of its internal virtual network interfaces, unless configured to require a global IPv6 address on the WAN interface.
DHCPv6 Prefix Delegation (DHCPv6-PD) [RFC3633] has an explicitlimitation described in Section 12.1 of [RFC3633] that a prefixdelegated to a requesting router cannot be used by the delegatingrouter. This restriction implies that the delegating router willhave two (non-aggregatable) routes towards a customer: one for thelink between the requesting router and the delegating router, and onefor the customer site behind the requesting router.There are architectures and link models where a host (e.g., a mobilerouter, also acting as a requesting router) always has a single (/64)prefix configured on its uplink interface and the delegating routeris also the requesting router's first-hop router. Furthermore, itmay be required that the prefix configured on the uplink interfacehas to be aggregatable with the delegated prefixes. This introducesa problem in how to use DHCPv6-PD together with stateless [RFC4862]or stateful [RFC3315] address autoconfiguration on a link where the/64 advertised is also part of the prefix delegated (e.g., /56) tothe requesting router.