[Solved] IPv6 PPPoE not working in WAN & LAN

Hello,

I tried following the userguide to configure IPv6 connectivity. I get an IPv6 assigned by ISP. But I am unable to ping either from LAN or router.

Here is my config.

{
        "kernel": "5.10.103",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "TP-Link Archer C6 v3",
        "board_name": "tplink,archer-c6-v3",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r19065-c45b5abf6f",
                "target": "ramips/mt7621",
                "description": "OpenWrt SNAPSHOT r19065-c45b5abf6f"
        }
}
package network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd29:8a6b:8cfc::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '64'

config interface 'wan'
        option proto 'pppoe'
        option username 'username'
        option password 'password'
        option service 'ISP'
        option device 'wan.2507'
        option ipv6 '1'

config interface 'wan6'
        option proto 'dhcpv6'
        option ip6assign '64'
        option reqaddress 'force'
        option reqprefix '64'
        option device '@wan'

config route6
        option target '::/0'
        option gateway 'fe80::9c56:583f:c4cc:80b2'
        option metric '512'

config device
        option type '8021q'
        option ifname 'wan'
        option vid '2507'
        option name 'wan.2507'
        option macaddr '10:20:30:40:50:60'

package dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option confdir '/tmp/dnsmasq.d'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option ra 'server'
        list ra_flags 'none'
        option dhcpv6 'server'

config dhcp 'wan'
        option interface 'wan'
        option master '1'
        list ra_flags 'none'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config dhcp 'wan6'
        option interface 'wan6'
        list ra_flags 'none'

package firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option src_ip 'fc00::/6'
        option dest_ip 'fc00::/6'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

config rule
        option name 'Allow DHCPv6 (546-to-547)'
        option family 'ipv6'
        list proto 'udp'
        option src 'wan'
        option src_port '546'
        option dest_port '547'
        option target 'ACCEPT'

config rule
        option name 'Allow DHCPv6 (547-to-546)'
        option family 'ipv6'
        list proto 'udp'
        option src 'wan'
        option src_port '547'
        option dest_port '546'
        option target 'ACCEPT'

head: /etc/firewall.user: No such file or directory
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 9267,
        "l3_device": "br-lan",
        "proto": "static",
        "device": "br-lan",
        "updated": [
                "addresses"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.1.1",
                        "mask": 24
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [
                {
                        "address": "2406:a340:4:bb18::",
                        "mask": 64,
                        "preferred": 604128,
                        "valid": 2591328,
                        "local-address": {
                                "address": "2406:a340:4:bb18::1",
                                "mask": 64
                        }
                },
                {
                        "address": "fd29:8a6b:8cfc::",
                        "mask": 64,
                        "local-address": {
                                "address": "fd29:8a6b:8cfc::1",
                                "mask": 64
                        }
                }
        ],
        "route": [

        ],
        "dns-server": [

        ],
        "dns-search": [

        ],
        "neighbors": [

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

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {

        }
}
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 662,
        "l3_device": "pppoe-wan",
        "proto": "dhcpv6",
        "device": "pppoe-wan",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [
                {
                        "address": "2406:a340:1:3:7490:bf75:3029:51a1",
                        "mask": 128,
                        "preferred": 604128,
                        "valid": 2591328
                },
                {
                        "address": "2406:a340:3:c9e3:d8e0:9b6d:2a5d:9e48",
                        "mask": 64,
                        "preferred": 604703,
                        "valid": 2591903
                }
        ],
        "ipv6-prefix": [
                {
                        "address": "2406:a340:4:bb18::",
                        "mask": 64,
                        "preferred": 604128,
                        "valid": 2591328,
                        "class": "wan6",
                        "assigned": {
                                "lan": {
                                        "address": "2406:a340:4:bb18::",
                                        "mask": 64
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [
                {
                        "address": "fd29:8a6b:8cfc:1::",
                        "mask": 64,
                        "local-address": {
                                "address": "fd29:8a6b:8cfc:1::1",
                                "mask": 64
                        }
                }
        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::c19:ea6a:482b:1f74",
                        "metric": 512,
                        "valid": 1703,
                        "source": "2406:a340:3:c9e3:d8e0:9b6d:2a5d:9e48/64"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::c19:ea6a:482b:1f74",
                        "metric": 512,
                        "valid": 1703,
                        "source": "2406:a340:4:bb18::/64"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::c19:ea6a:482b:1f74",
                        "metric": 512,
                        "valid": 1703,
                        "source": "2406:a340:1:3:7490:bf75:3029:51a1/128"
                }
        ],
        "dns-server": [
                "2001:4860:4860::8888",
                "2001:4860:4860::8844"
        ],
        "dns-search": [
                "ipv6.therouter.net"
        ],
        "neighbors": [

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

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "passthru": "00180014046970763609746865726f75746572036e657400001700202001486048600000000000000000888820014860486000000000000000008844"
        }
}
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 674,
        "l3_device": "pppoe-wan",
        "proto": "pppoe",
        "device": "wan.2507",
        "updated": [
                "addresses",
                "routes"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "100.64.11.227",
                        "mask": 32,
                        "ptpaddress": "100.63.0.1"
                }
        ],
        "ipv6-address": [
                {
                        "address": "fe80::d8e0:9b6d:2a5d:9e48",
                        "mask": 128
                }
        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "100.63.0.1",
                        "source": "0.0.0.0/0"
                }
        ],
        "dns-server": [
                "103.194.69.18",
                "1.1.1.1"
        ],
        "dns-search": [

        ],
        "neighbors": [

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

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {

        }
}

I am not sure if the problem is at my end, or at the ISP end. On the LAN side, none of the devices get global IPv6 address. All devices have a link local address only.

Any help will be appreciated. Thank you,

uci del dhcp.lan.ra_flags; uci add_list dhcp.lan.ra_flags='managed-config'; uci add_list dhcp.lan.ra_flags='other-config'; uci commit dhcp; service odhcpd restart

1 Like

I added these changes, but still it does not work, even with a reboot.

~# ping google.com
PING google.com (2404:6800:4009:82d::200e): 56 data bytes
^C
--- google.com ping statistics ---
9 packets transmitted, 0 packets received, 100% packet loss

With traceroute, it gives the following message:

:~# traceroute google.com
traceroute to google.com (2404:6800:4009:82d::200e), 30 hops max, 72 byte packets
 1  fe80::bdbd:202d:3b42:771d%pppoe-wan (fe80::bdbd:202d:3b42:771d%14)  2.147 ms !N  1.411 ms !N  1.982 ms !N

Did the lan hosts get an ULA and GUA address now?
Remove the static route you have added for the ::/0

The LAN hosts get ULA and GUA address now. Even after removing the static route for ::/0, I can't ping any IPv6 destinations.

First fix a bit your wan6 interface:

uci delete network.wan6.ip6assign
uci set network.wan6.reqprefix='auto'
uci commit network
ifup wan6

Then please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have

uci export network; uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user; \
ip6tables-save -c; \
ip -6 addr ; ip -6 ro li tab all ; ip -6 ru; \
ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; \
ifstatus wan6; ifstatus lan

The WAN issue turned out to be an issue at the ISP end. They fixed the issue at the ISP end and now I have end to end connectivity on IPv6. Thank you @trendy for the support!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.