IPv6 with DHCP6 on top of PPPoE and VLAN

Started by carbas, August 06, 2024, 01:39:39 PM

Previous topic - Next topic
Hi, I'm kinda new to OPNSense but I think I know few things about networking ;) So far I was using Mikrotik router but my old friend RB2011 has poor performance (+/- 150Mbps routing performance in IPv6 - probably due to lack of Fasttrack support on IPv6, IPv4 performance was OK-ish). At this point I want to give OPNSense a try and learn few thing along the way  ;D
I'm trying to setup OPNSense as a gateway for FTTH connection from Orange in Poland. With some reading, knowledge from RouterOS setup and "sniffing around" between Livebox 6 and ONT. I try to more or less replicate ISP setup wich includes:

  • VLAN id 35 on WAN interface
  • PPPoE connection on top of VLAN35 interface - this gives me link-local connection (FE80::/10) between my box and ISP router.
  • DHCPv6 on top of PPPoE interface to get public IPv6 prefix (/56) for my subnets and also dhcpv6.aftr-name (option-64) to use in DS-lite tunnell
And this is the point where I'm kinda stuck. My current setup looks like this: I got VLAN, I got PPPoE on it, assigned PPPoE as WAN interface, in WAN interface IPv4 configuration set to PPPoE and IPv6 configuration set to DHCPv6.
The problem is I don't recive public IPv6 prefix from DHCPv6. I turned on debug log for DHCP and it looks like DHCP6c is sending solicit messages on VLAN interface instead od PPPoE interface so there is no response.
It acts the same way whenever the "Use IPv4 connectivity" setting is set or not set.

Any ideas what is wrong with my setup?

Sidenote: PPPoE does not provide any IPv4 connectivity. It provides IPv6 Link-local and gateway adresses only.

Did you tick "Use IPv4 connectivity" for WAN?


Cheers,
Franco

They wrote:
QuoteIt acts the same way whenever the "Use IPv4 connectivity" setting is set or not set.

HTH,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Yes.
And also no.
I tried how dhcp6c will behave on both settings and it acts exactly the same. Solicit messages are sent to correct multicast address but through VLAN interface in both cases (FF02::1:2%vlan1).

The WAN interface device is pppoeX? or still vlanXZY?


Cheers,
Franco

August 06, 2024, 03:25:11 PM #5 Last Edit: August 06, 2024, 03:39:44 PM by carbas
It's pppoe0.

EDIT:
Can you, perhaps, point me to the place in source where configuration for dhcp6c is generated? I'm interested in how the correct interface and configuration for dhcp6c is determined and how dhcp6c process is started. I'm a newbie with OPNSense and can't find it myself (I just used pfSense for some time 10+ years ago so it doesn't count ;) )
So far I just found the config file for dhcp6c in /var/etc but in my case it is empty. Is this correct?

Sidenote: I tried to start dhcp6c on pppoe0 manually form the shell (with -fD options) and I saw it got response from ISP DHCP server but failed to set the address of the interface and jumped into loop. But I would leave this thing for later :)

BR,
Carbas

Firstly, check /var/etc/dhcp6c.conf -- the first line is the interface it uses.


Cheers,
Franco

The file is empty.
root@router:~ # cat /var/etc/dhcp6c.conf
root@router:~ # ls -la /var/etc/dhcp6c.conf
-rw-r--r--  1 root wheel 0 Aug  5 23:57 /var/etc/dhcp6c.conf

Then DHCPv6 WAN connectivity is not really possible. ;)

Yea, I figured it out  ;D
Question remains why is it empty  :o

Not sure, but smells like a configuration issue.


Cheers,
Franco

This is my config, maybe someone can spot something...





Update:
I've been wrong about /var/etc/dhcp6c.conf content. The file is empty when the "Use IPv4 connectivity" is checked. And then there is no trace of dhcp6c in syslog.

If the "Use IPv4 connectivity" is unchecked then the content changes to:
interface vlan01 {
  send ia-pd 6; # 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 6 {
  prefix ::/56 infinity;
  prefix-interface bridge0 {
    sla-id 0;
    sla-len 8;
  };
};

and in syslog it spits:
<29>1 2024-08-06T17:53:03+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="97"] Sending Solicit
<29>1 2024-08-06T17:53:03+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="98"] set client ID (len 14)
<29>1 2024-08-06T17:53:03+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="99"] set elapsed time (len 2)
<29>1 2024-08-06T17:53:03+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="100"] set option request (len 4)
<29>1 2024-08-06T17:53:03+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="101"] set IA_PD prefix
<29>1 2024-08-06T17:53:03+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="102"] set IA_PD
<29>1 2024-08-06T17:53:03+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="103"] send solicit to ff02::1:2%vlan01
<29>1 2024-08-06T17:53:03+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="104"] reset a timer on vlan01, state=SOLICIT, timeo=1, retrans=2083
<29>1 2024-08-06T17:53:05+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="105"] Sending Solicit
<29>1 2024-08-06T17:53:05+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="106"] set client ID (len 14)
<29>1 2024-08-06T17:53:05+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="107"] set elapsed time (len 2)
<29>1 2024-08-06T17:53:05+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="108"] set option request (len 4)
<29>1 2024-08-06T17:53:05+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="109"] set IA_PD prefix
<29>1 2024-08-06T17:53:05+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="110"] set IA_PD
<29>1 2024-08-06T17:53:05+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="111"] send solicit to ff02::1:2%vlan01
<29>1 2024-08-06T17:53:05+02:00 router.home.local dhcp6c 17117 - [meta sequenceId="112"] reset a timer on vlan01, state=SOLICIT, timeo=2, retrans=3982