OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: open on September 07, 2023, 06:26:59 PM

Title: RADVD Problem
Post by: open on September 07, 2023, 06:26:59 PM
since the update to 23.7 my RADVD does not run anymore.
I get the message "The command '/usr/local/sbin/radvd -p /var/run/radvd.pid -C /var/etc/radvd.conf -m syslog' returned exit code '1', the output was '/var/etc/radvd.conf:39 error: syntax error'"

The  Row 39 inside the radvd.conf :
RDNSS fe80::xxxx:xx:xxxx:b9b6%em1_vlan1230 {

em1_vlan1230 is the name of the interface.

Where is the source of this error?
Title: Re: RADVD Problem
Post by: franco on September 07, 2023, 06:35:31 PM
Same as https://github.com/opnsense/core/issues/6819 it seems. Is this on 23.7.3?


Cheers,
Franco
Title: Re: RADVD Problem
Post by: franco on September 07, 2023, 06:43:44 PM
What sort of interface is em1_vlan1230? The system thinks it's a WAN interface for one reason or another.


Cheers,
Franco
Title: Re: RADVD Problem
Post by: open on September 07, 2023, 06:44:09 PM
yes, is on 23.7.3

and yes, the GitHub issue looks like the same
Title: Re: RADVD Problem
Post by: open on September 07, 2023, 06:45:56 PM
that is the interface towards the wan - that is right
I get my dyn ipv6 over this interface and use it for my internal ipv6 clients
Title: Re: RADVD Problem
Post by: franco on September 07, 2023, 08:37:35 PM
https://github.com/opnsense/core/issues/6819#issuecomment-1710609267
Title: Re: RADVD Problem
Post by: open on September 24, 2023, 01:51:12 PM
Is there any news about this problem?
The GitHub link shows a solution that doesn't work for me.
I think the problem is the entry like this "RDNSS fe80::62be:b4ff:fe05:4774%igc0_vlan100"

In the problem discussed on Github, the entry was for the WAN interface. The entire segment was deleted and the problem disappeared.
In my problem, the issue is a similar entry but I need dhcpv6 on WAN (DMZ) interface. This interface gets the IPv6 from WAN side, calls a prefix and deliver the external ipv6 with local extend on the local clients.
Until update to 23.7. it was working as expected.

RADVD is running when I remove the DHCPV6 on settings for WAN Interface but this no resolution for me.

Or is the definition of WAN interface changed with 23.7? Should this interface no more the "WAN" interface?

Any hints?

Regards
Title: Re: RADVD Problem
Post by: franco on September 24, 2023, 08:44:07 PM
The issue is more or less the same: the interface was at one time a WAN interface and the request prefix only property was set for it.

# grep dhcp6prefixonly /conf/config.xml

That setting needs to be removed manually in order for the non-WAN interface to work properly.


Cheers,
Franco
Title: Re: RADVD Problem
Post by: franco on September 24, 2023, 08:57:13 PM
Perhaps this works then... https://github.com/opnsense/core/commit/0bd1280a456

# opnsense-patch 0bd1280a456

But it's all config garbage we're dealing with here.


Cheers,
Franco
Title: Re: RADVD Problem
Post by: open on September 24, 2023, 09:56:34 PM

Thank you Franco for your support

the interface is still a wan interface, i think. DHCPv6 and Ipv6 Prefix only ist still active on this interface, but i need this. I can switch off dhcpv6 and/or IPv6 Prefix only on this interface and RADVD will work then. But i need this configuration on this interface. And, it was working fine and it is still working. Only raidvd is not working is this configuration active.

can you tell me which settings i have to remove in /conf/config.xml?
And what can i do with your github link?

Sorry, I'm not a developer. You must those things declare in detail for me.
Title: Re: RADVD Problem
Post by: newsense on September 24, 2023, 10:17:03 PM
What Franco meant in the post above was for you to ssh into the FW, run the opnsense patch comand (without # ) and then try again.

This is what you need to see in the terminal:

root@OPNsense:~ # opnsense-patch 0bd1280a456
Fetched 0bd1280a456 via https://github.com/opnsense/core
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 0bd1280a456a5f95b15cd397e65ab03d95b79245 Mon Sep 17 00:00:00 2001
|From: Franco Fichtner <franco@opnsense.org>
|Date: Sun, 24 Sep 2023 20:54:31 +0200
|Subject: [PATCH] interfaces: prevent reading config.xml garbage
|
|The no prefix is only applicable when 'dhcp6' IPv6 mode is set.
|
|PR: https://forum.opnsense.org/index.php?topic=35848.0
|---
| src/etc/inc/interfaces.inc | 17 +++++++++++++----
| 1 file changed, 13 insertions(+), 4 deletions(-)
|
|diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
|index 5010d76ee2..4a2b0e622d 100644
|--- a/src/etc/inc/interfaces.inc
|+++ b/src/etc/inc/interfaces.inc
--------------------------
Patching file etc/inc/interfaces.inc using Plan A...
Hunk #1 succeeded at 4352 (offset -17 lines).
done
All patches have been applied successfully.  Have a nice day.
root@OPNsense:~ #


A reboot should not be needed but it won't hurt either.

Title: Re: RADVD Problem
Post by: franco on September 25, 2023, 08:43:15 AM
Okay, I misread then. The better solution as in the ticket is to delete the faulty DHCPv6 server settings from the WAN interface, but I can also add a patch to not allow running a DHCPv6 server when the mode is not "track6" with "dhcpd6track6allowoverride" or not "staticv6". It won't make the code prettier but safer at least.


Cheers,
Franco
Title: Re: RADVD Problem
Post by: open on September 26, 2023, 09:53:18 AM
Thank you newsense for the hint - I will try this

Franco, which server settings are faulty?

The WAN (DMZ) Interface is set to:

-  IPv6 Configuration Type.  DHCPV6
-  DHCPv6 client configuration
    Configuration Mode basic
    Request only an IPv6 prefix
    Prefix delegation size 57
    Send IPv6 prefix hint

The LAN interface, and each other that should get IPv6, is set to:

- IPv6 Configuration Type Track Interface
- Track IPv6 Interface:
   IPv6 Interface DMZ
   IPv6 Prefix ID. 0x 1
   Manual configuration


Under services - DHCPV6 I see only LAN, Relay and leases - no DMZ or other interface

Or do you mean that config.xml contains some settings that are not visible in the user interface?

it is not necessary to include more controls than are mandatory, but it would sometimes be better if users understood what is wrong and what is right. It is sometimes difficult to understand where the error is. Sometimes this also changes due to an update, what worked before is then suddenly seen as an error.
Example: I have changed the language from German to English to be able to enter the correct field name here. The settings there I have made ages ago and no longer changed. When I changed the language to English, I could not confirm it, because suddenly the DNS servers and the gateways were displayed as wrong. I had to change that before I could change the language. If this now makes a problem elsewhere, I would never think to look for the error there, because I have not changed anything there for ages.

Thank you again for your support
Title: Re: RADVD Problem
Post by: franco on September 26, 2023, 10:04:43 AM
At some point in time there was a DHCPv6 server configured on the current WAN interface in your install. It's not a problem, but something changed on your interface configuration and now it's not showing the server anymore but it also didn't delete it when that was necessary. So now that bug happens...

In the /conf/config.xml you can see a "dhcpdv6" section:

# pluginctl -g dhcpdv6

It will list your current DHCPv6 servers and the old one on the wrong interface. It's unclear which is which so it's hard to figure this out after the fact both in trying to help you with the issue and in the system itself trying to cope with the problematic configuration by itself.


Cheesrs,
Franco
Title: Re: RADVD Problem
Post by: open on September 26, 2023, 12:05:10 PM
@newsense i was trying this call - something was changed. I'm not sure which changes on detail but I was getting a new interface Opt4 - I don't know why - I habe deleted this interface

@franco

Output of pluginctl -g dhcpdv6.wan:

pluginctl -g dhcpdv6.wan
{"ddnsdomainalgorithm":"hmac-md5","range":{"from":"","to":""},"prefixrange":{"from":"","to":"","prefixlength":"48"},"dnsserver":[],"ntpserver":[],"numberoptions":{"item":[]},"ramode":"assist","rapriority":"medium","ramininterval":"200","ramaxinterval":"600","ranodefault":"1","radomainsearchlist":"","radnsserver":[],"rasamednsasdhcp6":"1","raroutes":"fd09:xx:xx:xx:xx::\/80"}

So I opened the config.xml and was looking for the dhcpdv6 section.
Here was LAN, WAN und sections from other interfaces. I was deleting the eintire WAN section.

After that the RADVD Service was able to start. After a reboot the dhcpv4, dhcpv6 and radvd service are up and running. The clients getting again a IPv6 with the prefix from provider. It looks fine...

Thank you für your support
Title: Re: RADVD Problem
Post by: franco on September 26, 2023, 12:58:56 PM
yep, sounds good :)


Cheers,
Franco