core icon indicating copy to clipboard operation
core copied to clipboard

PPPoE on bridge device broken between OPNsense 23.7 and OPNsense 24.1.4-amd64

Open Sumpfdotter opened this issue 2 years ago • 4 comments

  • [X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
  • [X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

Abstract

With OPNsense 23.7, PPPoE worked as expected: It dialed in automatically after each reboot. After upgrading to OPNsense 24.1.4-amd64, without changing anything in the config, the WAN interface disappears from GUI pages "Interfaces/Overview" and "Interfaces/Assignments", the PPPoE dial-in is not performed and therefore the LAN clients have no WAN connectivity. I isolated this bug to appear only when PPPoE is performed over a bridge device (details see below).

Details

By upgrading from OPNsense 23.7 to OPNsense 24.1.4-amd64, the WAN connection is not active after each reboot. It turns out that the WAN interface is not started at bootup (no console message "Configuring NameOfWanIf interface ..." anymore). In the Web GUI, the WAN interface turns out not to be listed anymore on "Interfaces/Assignments" and "Interfaces/Overview". Nevertheless, the wan's interface config page is still accessible in the GUI navigation tree under Interfaces/NameOfWanIf.

The situation after each reboot (users have no WAN) all this can be fixed with a simple manual step after reboot: By pressing "save" and "apply" in the WAN interface's config page without having changed anything, or alternatively by performing "11 - restart all services" as root on the console, the wan interface reappears under "Interfaces/Assignments" as well as "Interfaces/Overview", and the PPPoE connection is established successfully again.

The bug turns out to be reproducible with a fresh and empty installation of OPNsense 24.1.4-amd64 with a quite simple config (see steps to reproduce below). But with that fresh installation and config, it gets even worse: Also webgui fails to start now at bootup (Console message: "Starting web GUI ... failed"). Again, both problems can easily be fixed by logging into the console as root and performing "11 - restart all services": The WAN interface reappears, PPPoE dials in and web gui starts up (Console message "Starting web GUI ... done").

Relevant log messages: image

To Reproduce

Steps to reproduce the behavior. Here we're first creating a very simple but working config, then we make a change in that config to reproduce the erroneous behavior:

  1. Freshly install OPNsense-24.1-vga-amd64 with a new, fresh config.

  2. In my case I'm configuring the LAN interface as follows: {physical port3, physical port4} --> lagg0 --> lagg0_vlan1 --> static IP

  3. In my case I'm configuring the WAN interface as follows: {physical port3, physical port4} --> lagg0 --> lagg0_vlan37 --> pppoe0

  4. [Optional: In my case I'm configuring an additional guest-LAN interface as follows: {physical port3, physical port4} --> lagg0 --> lagg0_vlan9(opt1) --> bridge0 --> static IP (opt2)]

  5. Update to OPNsense 24.1.4-amd64

  6. [Optional: In my case I was installing plugins os-ddclient, os-iperf, os-mdns-repeater and os-squid]

  7. Verify that PPPoE is configured correctly and that WAN is up (LAN clients in my case can access to internet)

  8. Reboot the router and check WAN interface is listed in the Web gui under "Interfaces/Overview" and PPPoE is dialed in --> With this setup, wan interface is working fine!

  9. [Note: For being precise regarding the config I'm describing now the the exact config changes. See below for corresponding UI steps.] Now, we're adding a bridge: Assign an interface to the device that is so far used for as pppoe port, i.e. in my case to lagg0_vlan37: image Assign this interface, in my case opt3, to a new bridge, in my case bridge1: image Change the port of the pppoe config to that bridge device: image

  10. Reboot OPNSense --> The WAN interface is not listed under "Interfaces/Overview" and "Interfaces/Assignments" anymore. The PPPoE is not dialed in (WAN is down).

  11. Log in on console as root, perform "11 - restart all services" --> The WAN Interface reappears, PPPoE dials in, WAN is up

Note: To configure PPPoE on the bridge device in the Web Gui rather than changing the config file, you'll have to perform the following steps alternatively:

  1. Assign an interface (in my case to lagg0_vlan37) under Interfaces/Assingments
  2. Enable the interface under Interfaces/LAGG0_VLAN37
  3. Create a bridge device under Interfaces/Other Types/Bridge with LAGG0_VLAN37 as the only member
  4. Assing an interface to that bridge (in my case bridge1) under Interfaces/Assingments
  5. Enable the new interface under Interfaces/NameOfInterface
  6. After enabling, stay on that UI page and configure here PPPoE dial-in
  7. Press "apply" --> PPPoE dials in, WAN available
  8. Reboot
  9. The WAN interface is not listed under "Interfaces/Overview" and "Interfaces/Assignments" anymore. The PPPoE is not dialed in (WAN is down).
  10. Log in on console as root, perform "11 - restart all services" --> The WAN Interface reappears, PPPoE dials in, WAN is up

Expected behavior

  1. Web Gui starts up properly after reboot
  2. WAN interface is listed under Interfaces/Overview and Interfaces/Assignments
  3. PPPoE dial-in is performed automatically and WAN is up

Describe alternatives you considered

I removed the bridge from the config, and then it worked well. So the problem appears only when PPPoE is configured on a bridge.

Screenshots

image

Relevant log files

2024-03-29T00:07:46 Error opnsense /usr/local/etc/rc.bootup: The command '/usr/local/bin/flock -ne /var/run/lighty-webConfigurator.pid /usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf' returned exit code '255', the output was '2024-03-29 00:07:46: (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.74/src/network.c.588) bind() [fe80::227c:14ff:fea0:122e]:443: Can't assign requested address'
2024-03-29T00:07:45 Error opnsense /usr/local/etc/rc.bootup: Unable to configure nonexistent interface wan (bridge1)

Additional context

  • Although I'm using lagg and vlans (it's a productive device and this is the simplest config I can do with that environment), I'd expect this to be reproducible also directly on a physical port: port --> pppoe0 vs. port --> bridge0 --> pppoe0
  • As this is a productive device, I have the four additional plug-ins installed, but they are all not yet configured and therefore disabled. I mentioned them for completeness.

Source Code of changes:

  <interfaces>
    <opt3>
      <if>lagg0_vlan37</if>
      <descr>LAGG0_VLAN37</descr>
      <enable>1</enable>
      <spoofmac/>
    </opt3>
  </interfaces>
  <bridges>
    <bridged>
      <descr>WAN_DNSNet</descr>
      <maxaddr/>
      <timeout/>
      <bridgeif>bridge1</bridgeif>
      <maxage/>
      <fwdelay/>
      <hellotime/>
      <priority/>
      <proto>rstp</proto>
      <holdcnt/>
      <members>opt3</members>
      <ifpriority/>
      <ifpathcost/>
    </bridged>
  </bridges>
   <ppps>
    <ppp>
      <ptpid>0</ptpid>
      <type>pppoe</type>
      <if>pppoe0</if>
      <ports>bridge1</ports>

Environment

OPNsense 24.1.4-amd64. Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz (2 cores, 4 threads)

Sumpfdotter avatar Mar 29 '24 01:03 Sumpfdotter

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.

OPNsense-bot avatar Sep 25 '24 00:09 OPNsense-bot

The bot says: Closed for inactivity. Why there is no interest?

To be clear again: This issue is a bug report of a regression. The feature "PPPoE over Bridge" worked with 23.7 and does not work in 24. The bug is easily reproducible and description is very detailed. So I can understand deprioritizing the corresponding feature, but closing the issue without any comment is a little bit annoying after doing all the analysis stuff.

How to proceed?

Sumpfdotter avatar Sep 25 '24 00:09 Sumpfdotter

If someone plans to work on a ticket like this, we can always reopen, for now there doesn't seem to be enough interest (in which case keeping it open wouldn't help either). Quite some work has been done in the PPPoE area, maybe your case will be covered at some point as well. Community support just has its boundaries.

AdSchellevis avatar Sep 25 '24 07:09 AdSchellevis

To be frank I don't understand the premise of this bug report. It starts with

the WAN interface disappears from GUI pages "Interfaces/Overview" and "Interfaces/Assignments"

Which doesn't make sense and is irrelevant to the actual problem. Then

Web Gui starts up properly after reboot

This is certainly a good idea but has little to do with PPPoE and bridges.

Unable to configure nonexistent interface wan (bridge1)

That's true. Gone from the config why should it work? I don't know why it's gone and why it's not a configuration issue and therefore easily fixed.

<members>opt3</members>

I don't know why we need a bridge for a single member...

WAN interface is listed under Interfaces/Overview and Interfaces/Assignments

I agree, but nobody can do anything about it but the administrator.

PPPoE dial-in is performed automatically and WAN is up

Which is true if it's configured correctly?

My recommendation would be to raise a very precise and unburdened report about the operational issue you are seeing.

Cheers, Franco

fichtner avatar Sep 25 '24 07:09 fichtner