IPv6 with DHCP6 on top of PPPoE and VLAN

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

Previous topic - Next topic
@pataps
Which PPPoE username are you using in your setup? The one with "/ipv6" suffix or without one?
If the one without suffix then does the PPPoE connection provide IPV6CP layer to you?

Quote from: carbas on August 07, 2024, 10:28:57 AM
@pataps
Which PPPoE username are you using in your setup? The one with "/ipv6" suffix or without one?
If the one without suffix then does the PPPoE connection provide IPV6CP layer to you?

The /ipv6 one. How else would I get DSLite to work?  ;D

August 07, 2024, 10:37:40 AM #32 Last Edit: August 07, 2024, 10:39:55 AM by carbas
@pataps
Ok, my brain just exploded. HOW???   :o ;D
Which version of OPNsense do you have in your setup? For me it sounds like a bug that just became a feature :P

August 07, 2024, 11:00:49 AM #33 Last Edit: August 07, 2024, 11:02:58 AM by pataps
Quote from: carbas on August 07, 2024, 10:37:40 AM
@pataps
Ok, my brain just exploded. HOW???   :o ;D
Which version of OPNsense do you have in your setup? For me it sounds like a bug that just became a feature :P

¯\_(ツ)_/¯

I made it working on one of the 24.1 builds and have it ever since. Now I'm on latest version.

My WAN setup is the same, excluding blocking bosons and private networks. LAN is static ipv4/ track interface ipv6 (WAN, default RA settings) I managed to screw the up at some point and couldn't rebuild it, so I suspect OPNsense is a little picky about this configuration (at some point...).

I attached my configuration. Nothing fancy really. It does work until reboot, so there is some issue with this setup, but redoing ipv6 setup on one of the vlans triggers dhcp6c to start and it's smooth sailing after that.  Maybe try to redo the wan vlan and pppoe interfaces?








Suppose now is as good as ever to work on this while there are testers? :)

DISCLAIMER: I have worked on PPPoE for many years with users, but I do not have a setup to test. I can verify the config looks correct and mpd5 starts, but that's about it.

https://github.com/opnsense/core/commit/84a6d3ad

What I did:

Decouple IP modes from the decision that mpd5 daemon is going to be used. It's now possible to set IPv4 None and IPv6 DHCPv6 and still run in PPPoE mode if the PPPoE device is assigned to WAN.

What I didn't do yet:

Wire DHCPv6 to the IPv6 event in case PPPoE only runs on IPv6. I'm not sure which way to go. It also requires "IPv4 connectivity" changes that I wanted to do anyway because this doesn't make any sense when only IPv6 is acquired. But in the end only the user knows if we should trigger further connectivity on IPv4 or IPv6 tunnel establishment.

Feel free to try and tell me how it goes:

# opnsense-patch 84a6d3ad

(This is especially helpful with people already using PPPoE successfully.)


Cheers,
Franco


Quote from: franco on August 07, 2024, 01:04:31 PM
Suppose now is as good as ever to work on this while there are testers? :)

DISCLAIMER: I have worked on PPPoE for many years with users, but I do not have a setup to test. I can verify the config looks correct and mpd5 starts, but that's about it.

https://github.com/opnsense/core/commit/84a6d3ad

What I did:

Decouple IP modes from the decision that mpd5 daemon is going to be used. It's now possible to set IPv4 None and IPv6 DHCPv6 and still run in PPPoE mode if the PPPoE device is assigned to WAN.

What I didn't do yet:

Wire DHCPv6 to the IPv6 event in case PPPoE only runs on IPv6. I'm not sure which way to go. It also requires "IPv4 connectivity" changes that I wanted to do anyway because this doesn't make any sense when only IPv6 is acquired. But in the end only the user knows if we should trigger further connectivity on IPv4 or IPv6 tunnel establishment.

Feel free to try and tell me how it goes:

# opnsense-patch 84a6d3ad

(This is especially helpful with people already using PPPoE successfully.)


Cheers,
Franco

This is awesome! I can confirm after brief testing, that after changing ipv4 configuration type to none and unchecking use ipv4 connectivity my connection works great. I still need to manually start dhcp6c for some reason, but that is another story.

Ok, so far so good. :)

Finished the POC: https://github.com/opnsense/core/commit/e6f0ac158dc

# opnsense-revert opnsense && opnsense-patch e6f0ac158dc

If all goes well it should start dhcp6c automatically now in the latest config you mentioned.

IPv4 connectivity setting is gone now and the default. You need it anyway since you want DHCPv6 over PPPoE.


Cheers,
Franco

PS: I should note that DHCPv6 over PPPoE didn't work before some late 24.1.x anyway. This is all pretty new territory... https://github.com/opnsense/dhcp6c/commit/f5422a8eb4

Quote from: franco on August 07, 2024, 04:28:34 PM
Ok, so far so good. :)

Finished the POC: https://github.com/opnsense/core/commit/e6f0ac158dc

# opnsense-revert opnsense && opnsense-patch e6f0ac158dc

If all goes well it should start dhcp6c automatically now in the latest config you mentioned.

IPv4 connectivity setting is gone now and the default. You need it anyway since you want DHCPv6 over PPPoE.


Cheers,
Franco

Wow, amazing! Can confirm dhcp6c starts automatically now :D Thank you Franco :)

Good. Do you get your PD?

I'll trickle the relevant commits into the development version after 24.7.1 is out tomorrow.

I don't want to squash the full history yet the back-and-forth code changes can probably be removed.


Cheers,
Franco

Quote from: franco on August 07, 2024, 05:38:56 PM
Good. Do you get your PD?

I'll trickle the relevant commits into the development version after 24.7.1 is out tomorrow.

I don't want to squash the full history yet the back-and-forth code changes can probably be removed.


Cheers,
Franco

Yes I did! Now after every boot my VLANs get propped IPv6. It works great :)

If I understand correctly, in order to preserve this improved functionality I should NOT update to 24.7.1 and wait for 24.7.2?

Quote from: franco on August 07, 2024, 04:28:34 PM
Ok, so far so good. :)

Finished the POC: https://github.com/opnsense/core/commit/e6f0ac158dc

# opnsense-revert opnsense && opnsense-patch e6f0ac158dc

If all goes well it should start dhcp6c automatically now in the latest config you mentioned.

IPv4 connectivity setting is gone now and the default. You need it anyway since you want DHCPv6 over PPPoE.


Cheers,
Franco

Tested this and it seems to continue working as normal with my UK PPPoEv4 and DHCPv6 setup.

I still have the gateway monitor issue that started with 24.7 where the ipv6 gateway monitor won't start with a public ipv6 monitor IP set. It works fine with nothing set and using the default gateway IP as the monitor. WAN & gateway are fe80 link local addresses with my public prefix on LAN which may be relevant.

Neat, thanks for confirming.

Yes, correct. The patch should apply to 24.7.1 as well, but the reboot might get in the way.

Since this code is a change of behaviour in some ways most of it needs to be locked away for 25.1 I'm afraid. We could hook you up on the development version which would do what you need without patching once 24.7.2 hits.

I'm aware of what I'm suggesting but I also don't want to surprise other PPPoE users right now and those that don't have issues right now will need to test this too, which could introduce other problems for you so the development version would give us a quick feedback from you over time as well.


Cheers,
Franco

@csutcliff did you use IPv4 connectivity setting? It's gone from the GUI but I suppose you did because you said it keeps working.

Since when did you start using this anyway? 24.1.9?


Cheers,
Franco

Quote from: franco on August 07, 2024, 05:57:40 PM
Neat, thanks for confirming.

Yes, correct. The patch should apply to 24.7.1 as well, but the reboot might get in the way.

Since this code is a change of behaviour in some ways most of it needs to be locked away for 25.1 I'm afraid. We could hook you up on the development version which would do what you need without patching once 24.7.2 hits.

I'm aware of what I'm suggesting but I also don't want to surprise other PPPoE users right now and those that don't have issues right now will need to test this too, which could introduce other problems for you so the development version would give us a quick feedback from you over time as well.


Cheers,
Franco

I understand. I would appreciate some more info on hooking up to development version in advance :)
Also, worth asking I guess - Am I correct thinking that I cannot simply apply same patch as above after each update until 25.1?