OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 19.1 Legacy Series »
  • [solved] No IPv6 after upgrading
« previous next »
  • Print
Pages: 1 [2]

Author Topic: [solved] No IPv6 after upgrading  (Read 12049 times)

iam

  • Full Member
  • ***
  • Posts: 105
  • Karma: 1
    • View Profile
Re: No IPv6 after upgrading
« Reply #15 on: February 04, 2019, 07:34:11 pm »
There isn't such file.
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 1701
  • Karma: 179
    • View Profile
Re: No IPv6 after upgrading
« Reply #16 on: February 04, 2019, 09:54:54 pm »
Hmm, begins to sound like something is missing or corrupted. Have a look in System:Routes:Log Files, you should see entries for rtsold, do you see them?


It's looking like something has gone wrong with the update, and I would now consider a clean install. Note there are a couple of issues that are being corrected in 19.1.1 which is due in a couple of days. There's also likely to be a new installation archive at the same time if you wait, otherwise it would be clean install 19.1 then update to 19.1.1.


I cannot think of anything else that would stop dhcp6 from running, especially when directly send solicit is used as that forces dhcp6c to launch and once it runs it stays running unless the interface is taken down.
Logged
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

iam

  • Full Member
  • ***
  • Posts: 105
  • Karma: 1
    • View Profile
Re: No IPv6 after upgrading
« Reply #17 on: February 04, 2019, 10:00:34 pm »
Quote from: marjohn56 on February 04, 2019, 09:54:54 pm
Hmm, begins to sound like something is missing or corrupted. Have a look in System:Routes:Log Files, you should see entries for rtsold, do you see them?

Yes, but the last entry is dated to July.
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 1701
  • Karma: 179
    • View Profile
Re: No IPv6 after upgrading
« Reply #18 on: February 04, 2019, 10:07:13 pm »
I'm surprised it's been working at all then.
Logged
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

iam

  • Full Member
  • ***
  • Posts: 105
  • Karma: 1
    • View Profile
Re: No IPv6 after upgrading
« Reply #19 on: February 04, 2019, 11:05:07 pm »
I'll test it again with the next releases.

By the way, do you have configured static IPv4 and OpenVPN servers? This is maybe relevant for finding the error cause.
Logged

iam

  • Full Member
  • ***
  • Posts: 105
  • Karma: 1
    • View Profile
Re: No IPv6 after upgrading
« Reply #20 on: February 05, 2019, 11:34:54 am »
Hi,

do you have some more hints? At which point the dhcpv6 should be started normally?

Reinstalling might be a solution, but I prefer understanding and solving the problem instead of applying the sledgehammer method only.

Best,
iam
« Last Edit: February 05, 2019, 11:37:14 am by iam »
Logged

iam

  • Full Member
  • ***
  • Posts: 105
  • Karma: 1
    • View Profile
Re: No IPv6 after upgrading
« Reply #21 on: February 05, 2019, 12:42:44 pm »
Ok I see. /var/etc/rtsold_re0_script.sh should call the dhcpv6. This works if I run the script without parameters manually:
Code: [Select]
#!/bin/sh
# this file was auto-generated, do not edit
if [ -n "${2}" ]; then
        echo ${2} > /tmp/re0_routerv6
        echo ${2} > /tmp/re0_defaultgwv6
fi
if [ -f /var/run/dhcp6c_re0.pid ]; then
        /usr/bin/logger -t dhcpd "RTSOLD script - Sending SIGHUP to dhcp6c for interface wan(re0)"
        /bin/pkill -HUP -F /var/run/dhcp6c_re0.pid
else
        /usr/bin/logger -t dhcpd "RTSOLD script - Starting dhcp6 client for interface wan(re0)"
        /usr/local/sbin/dhcp6c '-d' -c '/var/etc/dhcp6c_wan.conf' -p '/var/run/dhcp6c_re0.pid' 're0'
fi

But where should be called this script?
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 1701
  • Karma: 179
    • View Profile
Re: No IPv6 after upgrading
« Reply #22 on: February 05, 2019, 01:21:39 pm »
That script is called by RTSOLD when it receives an RA in response to its RS solicit.


An RS is generally the start of all IPv6 communications, the routers automatically find neighbours and create routes, this is why routing in IPv6 can be handled automatically.


If RTSOLD does not receive an RA then it will not run the script and dhcp6c will not run. However, if you have ticked 'Directly send solicit' ithen dhcp6c gets launched irrespective of whether or not an RA has been received. This is done because some ISPs deliberately require that a dhcp6 request is sent as well as the RS before they send an RA response.


What happens in the interfaces.inc script is shown below in a code snippet from interfaces.inc


Code: [Select]
mwexecf(
        '/usr/sbin/rtsold -p %s -O %s -R %s %s %s',
        array(
            "/var/run/rtsold_{$wanif}.pid",
            "/var/etc/rtsold_{$wanif}_script.sh",
            '/usr/bin/true', /* XXX missing proper script to refresh resolv.conf */
            empty($wancfg['adv_dhcp6_debug']) ? '-d' : '-D',
            $wanif
        )
    );


    if (isset($wancfg['dhcp6sendsolicit'])) {
        mwexec("/var/etc/rtsold_{$wanif}_script.sh");
    }

What you see above is the launch of rtsold, which will wait for the RA response to its solicit - then it will launch the rtsold script.

The second part says if 'Directly send solicit' is set ( dhcp6sendsolicit ) then run the rtsold script anyway.

In the RTSOLD script itself are two parts, you can ignore the first 'if' statement, that is setting up routes automatically, it's important, but not for what I am about to say. The second 'if / else' looks at whether dhcp6c is running or not, if it is then it sends it a SIGHUP to re-initialise it, if it is not running, and that's detected by looking for the pid file then it will start it up.

Make sense?
Logged
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

iam

  • Full Member
  • ***
  • Posts: 105
  • Karma: 1
    • View Profile
Re: No IPv6 after upgrading
« Reply #23 on: February 05, 2019, 01:51:56 pm »
Hi,

many thanks for your explanations.

Running rtsold manually with
Code: [Select]
/usr/sbin/rtsold -p /var/run/rtsold_re0.pid -O /var/etc/rtsold_re0_script.sh -R /usr/bin/true -D re0
causes an working IPv6 connection. But this don't seems repeatable at least without a reboot.

So I guess that rtsold isn't starting automatically for some reason. Where I can found interfaces.inc on the file system?

Best,
iam

EDIT: I've found out the path myself: /usr/local/etc/inc/interfaces.inc
« Last Edit: February 05, 2019, 01:58:40 pm by iam »
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 1701
  • Karma: 179
    • View Profile
Re: No IPv6 after upgrading
« Reply #24 on: February 05, 2019, 01:58:28 pm »
if you go to the shell:


> ps -auxw | grep rtsold


You should get something like what is shown below... do you?


Code: [Select]

root@OPNsense:~ # ps -auxw | grep rtsold
root    10626   0.0  0.0 1057660  2616  -  Ss   12:01     0:00.03 /usr/sbin/rtsold -p /var/run/rtsold_igb0.pid -O /var/etc/rtsold_igb0_script.sh -R /usr/bin/true -D igb0
root    65097   0.0  0.0 1058012  2840  0  S+   12:57     0:00.00 grep rtsold





Logged
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

iam

  • Full Member
  • ***
  • Posts: 105
  • Karma: 1
    • View Profile
Re: No IPv6 after upgrading
« Reply #25 on: February 05, 2019, 02:00:09 pm »
Only if I start rtsold it manually.
Logged

iam

  • Full Member
  • ***
  • Posts: 105
  • Karma: 1
    • View Profile
Re: No IPv6 after upgrading
« Reply #26 on: February 05, 2019, 02:10:56 pm »
Finally I've solved this issue. Many thanks for your help :)

I've checked the code and found this part:
Code: [Select]
    if (!is_array($wancfg)) {
        return;
    }

Then I've read the description of the property "Use IPv4 connectivity": "Request the IPv6 information through the IPv4 PPP connectivity link."

There is no PPP connection controlled by OPNsense, so it don't make sense to activate it. So I've deactivated it and voilà, IPv6 is working.
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 1701
  • Karma: 179
    • View Profile
Re: No IPv6 after upgrading
« Reply #27 on: February 05, 2019, 02:14:43 pm »
Well that bit of code checks to see if there is a valid wan configuration array, the one the caused the bailout was this:


Code: [Select]
if (isset($wancfg['ipaddrv6'])) {
        switch ($wancfg['ipaddrv6']) {
            case 'slaac':
            case 'dhcp6':
                /* XXX why not tell the function... */
                if (isset($wancfg['dhcp6usev4iface'])) {
                    break;
                }
                interface_dhcpv6_prepare($interface, $wancfg);
                interface_dhcpv6_configure($interface, $wancfg);
                break;



Anyway, glad its fixed. Marked it [SOLVED] ..
« Last Edit: February 05, 2019, 02:18:27 pm by marjohn56 »
Logged
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

  • Print
Pages: 1 [2]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 19.1 Legacy Series »
  • [solved] No IPv6 after upgrading
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2