OPNsense Forum

English Forums => General Discussion => Topic started by: tdwr3 on June 04, 2025, 02:32:50 PM

Title: DHCPv6 no IPv6 Prefix
Post by: tdwr3 on June 04, 2025, 02:32:50 PM
Hello OPNSense Community,

i have problems with the ipv6 connectivity at my opnsense router.

My ISP give the WAN interface currently a public IPv4 address over PPPoE (VLAN 7). That works without problems.

But the IPv6 "/56" Prefix should be assigned by DHCPv6 in VLAN 7 (not over PPPoE connection). That does not work. I start a package capture (mirror WAN Port at my switch) and saw that no DHCPv6 package will be send out from the OPNSense. I want to get the /56 prefix at the WAN Interface.

In the OPNSense Logs it says "Error dhcp6c transmit failed: Network is down".

PPPoE-Settings:
PPPoE_device_settings.png

Gateway-Settings:
Gateway_configuration.png

DHCP6c-Config:
dhcp6c_config.png

I belive that OPNSense send out the DHCPv6 packages over the PPPoE connection, because the DHCP6c config is wrong. But how can i fix that? Is my PPPoE device wrong assigned?

Thanks for the help!
Title: Re: DHCPv6 no IPv6 Prefix
Post by: tdwr3 on June 04, 2025, 02:35:47 PM
VLAN-Settings attached
Title: Re: DHCPv6 no IPv6 Prefix
Post by: tdwr3 on June 04, 2025, 02:42:05 PM
WAN-configuration attached
Title: Re: DHCPv6 no IPv6 Prefix
Post by: meyergru on June 04, 2025, 02:56:37 PM
Your VLAN vlan0.7 could to be on the wrong parent interface. vlan0.30 is on your LAN?

You seem to have stacked the interfaces wrong, because the /56 prefix delegation size is nowhere to be found in your PPPoE config.

I assume nothing is wrong on the Proxmox side. It sure complicates things, but if it works with IPv4, then it should work with IPv6. Presumably, vtnet0 is connected to an ONT or VDSL modem directly?
Title: Re: DHCPv6 no IPv6 Prefix
Post by: meyergru on June 04, 2025, 03:02:50 PM
My WAN looks like this, but my ISP accepts "prefix delegation" only. Some ISPs need that, some do not allow it and some do not mind either setting:
2025-06-04 14_58_26-.png

The resulting /var/etc/dhcp6c.conf is:

root@OPNsense:~ # more /var/etc/dhcp6c.conf
interface pppoe0 {
  send ia-pd 0; # request prefix delegation
  request domain-name-servers;
  request domain-name;
  script "/var/etc/dhcp6c_wan_script.sh"; # we'd like some nameservers please
};
id-assoc pd 0 {
  prefix ::/56 infinity;
  prefix-interface pppoe0 {
    sla-id XX;
    sla-len 8;
    ifid YY;
  };
  prefix-interface ix0_vlan5 {
    sla-id 5;
    sla-len 8;
  };
  prefix-interface ix0_vlan4 {
    sla-id 4;
    sla-len 8;
  };
  prefix-interface ix0_vlan7 {
    sla-id 7;
    sla-len 8;
  };
  prefix-interface ix0_vlan10 {
    sla-id 16;
    sla-len 8;
  };
};
Title: Re: DHCPv6 no IPv6 Prefix
Post by: tdwr3 on June 04, 2025, 03:09:01 PM
Hello meyergru,

thanks for your reply. VLAN 0.30 (VLAN 30) is my LAN yes. The OPNSense ist at a TrueNAS Server inside a KVM VM. There is a attached physical SFP+ NIC directly at the VM. So no network goes over the hypervisor. The /56 prefix size is configured at the WAN Interface. Can you tell me how i can configure it right? I belive too that my interface configuration is wrong.

Interface Overview one:
overview_interface.png

Interface Overview two:
overview_interface2.png
Title: Re: DHCPv6 no IPv6 Prefix
Post by: meyergru on June 04, 2025, 03:23:52 PM
I was confused by all the other interfaces on vtnet0: Management, OnlyInternet, Trusted. Usually, you would use two interfaces for an OpnSense VM: one for WAN and one for (V)LANs. Your WAN would normally be on vtnet0, which would be directly connected to an ONT or bridge modem, the other one is vtmet1, bridged to the same interface as your VM host.

Of course, you can spread those out via a manageable switch, as well, if you only have one physical interface mapped to vtnet0.

Yes, the /56 is configured, you should probably also check "send prefix hint".