[FS#856] ip6gw ignored for static IPv6 wan6

LEDE Bugs lede-bugs at lists.infradead.org
Mon Jun 19 04:21:41 PDT 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - David Billinghurst (billingd) 

Attached to Project - LEDE Project
Summary - ip6gw ignored for static IPv6 wan6
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - lede-17.01
Due in Version - Undecided
Due Date - Undecided
Details - NETGEAR WNDR3800 running LEDE 17.01.2

My service provider has recently enabled IPv6 dual stack. There are not yet auto-provisioning.

I was given the following information:
IPv6 range: 2400:4dc0:XXXX:YY00::1/56
IPv6 Default Gateway: 2400:4dc0::7
IPv6 DNS Server 1: 2001:df5:3c00:100::1:67
IPv6 DNS Server 2: 2001:df5:3c00:100::1:68

Following the "Static IPv6 Connection" docs at https://lede-project.org/docs/user-guide/basic-ipv6-configuration#static_ipv6_connection I configured the system with the following stanzas in /etc/config/network

Further discussion at https://forum.lede-project.org/t/lede-17-01-2-no-default-route-with-static-ipv6/4441

########################################################
config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '64'
option ip6hint '4'

config interface 'wan'
option ifname 'eth1'
option proto 'pppoe'
option keepalive '5 5'
option username 'USERNAME'
option password 'PASSWORD'

config interface 'wan6'
option ifname '@wan'
option proto 'static'
option ip6prefix '2400:4dc0:0:2000::/56'
option ip6gw '2400:4dc0::7'
option ip6assign '64'
option ip6hint '0'
option ip6ifaceid '::1'
option dns '2001:df5:3c00:100::1:67 2001:df5:3c00:100::1:68'
 /etc/config/network

config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '64'
option ip6hint '4'

config interface 'wan'
option ifname 'eth1'
option proto 'pppoe'
option keepalive '5 5'
option username 'USERNAME'
option password 'PASSWORD'

config interface 'wan6'
option ifname '@wan'
option proto 'static'
option ip6prefix '2400:4dc0:0:2000::/56'
option ip6gw '2400:4dc0::7'
option ip6assign '64'
option ip6hint '0'
option ip6ifaceid '::1'
option dns '2001:df5:3c00:100::1:67 2001:df5:3c00:100::1:68'

########################################################

This did not work, as there was no default route configured.  As expected, the pppoe-wan and lan interfaces were assigned IPv6 /64 subnets and clients received IPv6 addresses.

root at OpenWrt:/etc/config# ifstatus wan6
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 132806,
        "l3_device": "pppoe-wan",
        "proto": "static",
        "device": "pppoe-wan",
        "updated": [
                "prefixes"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
    "ipv6-address": [

    ],
    "ipv6-prefix": [
            {
                    "address": "2400:4dc0:0:YY00::",
                    "mask": 56,
                    "class": "wan6",
                    "assigned": {
                            "wan6": {
                                    "address": "2400:4dc0:0:YY00::",
                                    "mask": 64
                            },
                            "lan": {
                                    "address": "2400:4dc0:0:YY04::",
                                    "mask": 64
                            }
                    }
            }
    ],
    "ipv6-prefix-assignment": [
            {
                    "address": "2400:4dc0:0:YY00::",
                    "mask": 64,
                    "local-address": {
                            "address": "2400:4dc0:0:YY00::1",
                            "mask": 64
                    }
            }
    ],
    "route": [

    ],
    "dns-server": [

    ],
    "dns-search": [

    ],
    "inactive": {
            "ipv4-address": [

            ],
            "ipv6-address": [

            ],
            "route": [

            ],
            "dns-server": [

            ],
            "dns-search": [

            ]
    },
    "data": {

    }
}

**************** Workaround *************************
Defining a default route in /etc/config/network with 

config route6
        option interface wan6
        option target 2400:4dc0::7/128

config route6
        option interface wan6
        option gateway 2400:4dc0::7
        option target ::/0

works for me. It adds the following lines to ifstatus wan6

        "route": [
                {
                        "target": "2400:4dc0::7",
                        "mask": 128,
                        "nexthop": "::",
                        "source": "::\/0"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "2400:4dc0::7",
                        "source": "::\/0"
                }
        ],

*****************************************************

This is what I expected the ip6gw line to do.

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=856



More information about the lede-bugs mailing list