Router Advertisements require manual restart after every reboot

Started by sarkyscouser, September 15, 2023, 09:16:55 AM

Previous topic - Next topic
Is anyone else still having this issue? I'm on 23.7.4 and it was an issue with 23.7.3 as well.

My WAN is pppoe and I get a /56 off my ISP via DHCPv6. I hand out ipv6 to my LAN via RA unmanaged (SLAAC - no DHCPv6).  On a reboot my network clients don't get anything ipv6 related.  Log in, restart RA and straight away they get what they need and everything works.

How best to diagnose this?  My gut feel is that RA is trying to start too early and perhaps it needs to wait until the WAN has ipv6 details from ISP?

Can you post contents of /var/etc/radvd.conf after boot?

It doesn't appear to be a general issue anymore.


Cheers,
Franco

Here you go, I've redacted some of the addresses, definitely an issue for me

# Automatically generated, do not edit
# Generated RADVD config for manual assignment on lan
interface igc1 {
        AdvSendAdvert on;
        MinRtrAdvInterval 200;
        MaxRtrAdvInterval 600;
        AdvLinkMTU 1492;
        AdvDefaultPreference medium;
        prefix 2a00:<redacted>::/64 {
                DeprecatePrefix on;
                AdvOnLink on;
                AdvAutonomous on;
        };
        RDNSS 2a07:<redacted> {
        };
        DNSSL home.arpa {
        };
};
# Generated RADVD config for manual assignment on opt1
interface vlan01 {
        AdvSendAdvert on;
        MinRtrAdvInterval 200;
        MaxRtrAdvInterval 600;
        AdvLinkMTU 1492;
        AdvDefaultPreference medium;
        prefix 2a00:<redacted>/64 {
                DeprecatePrefix on;
                AdvOnLink on;
                AdvAutonomous on;
        };
        RDNSS 2620:fe::fe 2606:4700:4700::1112 {
        };
        DNSSL home.arpa {
        };
};

This is right after reboot when the service is stopped?

If yes when you restart the service the config doesn't change and it's up and running?

# pluginctl -s radvd start

(check config for differences)


Cheers,
Franco

Ah no sorry that's when I've restarted it.  I'll repost shortly

This is straight after a reboot, before I manually restart RA.  There's no prefix section?:

# Automatically generated, do not edit
# Generated RADVD config for manual assignment on lan
interface igc1 {
        AdvSendAdvert on;
        MinRtrAdvInterval 200;
        MaxRtrAdvInterval 600;
        AdvLinkMTU 1500;
        AdvDefaultPreference medium;
        RDNSS 2a07<redacted> 2a07<redacted> {
        };
        DNSSL home.arpa {
        };
};
# Generated RADVD config for manual assignment on opt1
interface vlan01 {
        AdvSendAdvert on;
        MinRtrAdvInterval 200;
        MaxRtrAdvInterval 600;
        AdvLinkMTU 1500;
        AdvDefaultPreference medium;
        RDNSS 2620:fe::fe 2606:4700:4700::1112 {
        };
        DNSSL home.arpa {
        };
};

The fun part is radvd should restart when the prefix is available. :)

System log may give more clues.


Cheers,
Franco

OK here you go, it looks to me like RA is starting too early and not waiting for WAN to be fully configured by ISP?

2023-09-15T09:27:50   Notice   configctl    event @ 1694766469.65 exec: system event config_changed
2023-09-15T09:27:50   Notice   configctl    event @ 1694766469.65 msg: Sep 15 09:27:49 OPNsense.home.arpa config[62224]: config-event: new_config /conf/backup/config-1694766469.6436.xml
2023-09-15T08:53:23   Notice   kernel    <7>cannot forward src fe80:2::<redacted>, dst 2a03<redacted>, nxt 58, rcvif igc1, outif pppoe0
2023-09-15T08:53:12   Notice   kernel    <7>cannot forward src fe80:2::<redacted>, dst 2600<redacted>, nxt 58, rcvif igc1, outif pppoe0
2023-09-15T08:53:07   Notice   kernel    <7>cannot forward src fe80:2::<redacted>, dst 2a00:<redacted>, nxt 17, rcvif igc1, outif pppoe0
2023-09-15T08:52:31   Notice   opnsense    /usr/local/etc/rc.newwanipv6: Failed to detect IP for interface wan
2023-09-15T08:52:29   Notice   opnsense    /usr/local/etc/rc.newwanipv6: Failed to detect IP for interface wan
2023-09-15T08:52:28   Notice   dhcp6c    dhcp6c_script: REQUEST on pppoe0 renewal
2023-09-15T08:52:28   Notice   dhcp6c    dhcp6c_script: REQUEST on pppoe0 executing
2023-09-15T08:52:27   Notice   dhcp6c    RTSOLD script - Sending SIGHUP to dhcp6c
2023-09-15T08:52:27   Notice   dhcp6c    dhcp6c_script: REQUEST on pppoe0 renewal
2023-09-15T08:52:27   Notice   dhcp6c    dhcp6c_script: REQUEST on pppoe0 executing
2023-09-15T08:52:26   Notice   opnsense    /usr/local/etc/rc.newwanipv6: Failed to detect IP for interface wan
2023-09-15T08:52:24   Error   dhcp6c    transmit failed: Network is down
2023-09-15T08:52:23   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : webgui_configure_do(,wan))
2023-09-15T08:52:23   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : vxlan_configure_do())
2023-09-15T08:52:23   Error   dhcp6c    transmit failed: Permission denied

2023-09-15T08:52:23   Notice   kernel    <118> iot (vlan01)    -> v4: 192.168.5.1/24
2023-09-15T08:52:23   Notice   kernel    <118> WAN (pppoe0)    -> v4/PPPoE: 86.<redacted>/32
2023-09-15T08:52:23   Notice   kernel    <118> LAN (igc1)      -> v4: 192.168.1.1/24
2023-09-15T08:52:23   Notice   kernel    <118>
2023-09-15T08:52:23   Notice   kernel    <118>*** OPNsense.home.arpa: OPNsense 23.7.4 ***
2023-09-15T08:52:23   Notice   kernel    <118>
2023-09-15T08:52:23   Notice   kernel    <118>Fri Sep 15 08:52:22 BST 2023
2023-09-15T08:52:23   Notice   kernel    <118>Root file system: /dev/gpt/rootfs
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : unbound_configure_do(,wan))
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : openssh_configure_do(,wan))
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : opendns_configure_do())
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : ntpd_configure_do())
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure newwanip (,wan)
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface WAN.
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : openvpn_configure_do(,wan))
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : ipsec_configure_do(,wan))
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure vpn (,wan)
2023-09-15T08:52:22   Notice   kernel    [fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to radix4_lockless
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_PPPOE))
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_PPPOE)
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: ROUTING: keeping current inet default gateway '172.<redacted>'
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: ROUTING: configuring inet default gateway on wan
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'wan'
2023-09-15T08:52:22   Notice   dhcp6c    RTSOLD script - Starting dhcp6c daemon
2023-09-15T08:52:22   Notice   opnsense    /usr/local/etc/rc.newwanip: IP renewal starting (new: 86.<redacted>, old: , interface: wan, device: pppoe0, force: yes)

2023-09-15T08:52:20   Notice   kernel    ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default to accept, logging disabled

2023-09-15T08:52:17   Notice   kernel    <118>Starting router advertisement service...done.

2023-09-15T08:52:17   Error   opnsense    /usr/local/etc/rc.bootup: ROUTING: not a valid default gateway address: ''
2023-09-15T08:52:17   Notice   opnsense    /usr/local/etc/rc.bootup: ROUTING: configuring inet6 default gateway on wan


Oh great, it's PPPoE. I missed this earlier. Can you try to set a new GUI tunable "net.inet6.ip6.dad_count" with value "10" and see if that helps with the reboot behaviour?


Cheers,
Franco

No, still getting:

Error   dhcp6c    transmit failed: Can't assign requested address
Notice   dhcp6c    RTSOLD script - Sending SIGHUP to dhcp6c
Notice   dhcp6c    dhcp6c_script: REQUEST on pppoe0 executing
Notice   dhcp6c    dhcp6c_script: REQUEST on pppoe0 renewal
Notice   opnsense    /usr/local/etc/rc.newwanipv6: Failed to detect IP for interface wan

And then if I manually restart RA I don't get anything to begin with, then maybe 30-60s later it works, not sure if that's a coincidence or not.

What is that parameter designed to do, and is the "10" a delay of some kind?

Tried rebooting again, and not manually restarting RA so soon.  Still nothing after 5 min, last 2 lines in log:

2023-09-15T10:04:01 Notice   opnsense   /usr/local/etc/rc.newwanipv6: Failed to detect IP for interface wan
2023-09-15T10:04:05 Notice   kernel   <7>cannot forward src fe80:2::<redacted>, dst 2a00:<redacted>, nxt 6, rcvif igc1, outif pppoe0

Only get ipv6 on LAN after manually restarting RA.

Yes it's broken. I have not found out why yet.

> /usr/local/etc/rc.newwanipv6: Failed to detect IP for interface wan

PPPoE restarts right after acquiring the IPv6 address leaving IPv6 stranded.


Cheers,
Franco

OK let me know if I can be of any help in debugging this.  pppoe is still very popular in the UK and Europe (unfortunately) so there must be many people with this problem.  I've seen a few posts on reddit over the last few months.

I also raised a github issue yesterday (is that appropriate?) here: https://github.com/opnsense/core/issues/6850 but it's not been picked up yet.


I reckon you have "Use IPv4 connectivity" set for your DHCPv6 mode in WAN interface?


Cheers,
Franco