IPv6 and PPPoE - router cannot ping IPv6

Hello,

I am using following system and OpenWrt version

Model: TP-Link Archer C7 v5
Architecture: Qualcomm Atheros QCA956X ver 1 rev 0
Firmware Version: OpenWrt 19.07.2 r10947-65030d81f3 / LuCI openwrt-19.07 branch git-20.064.69776-e8c638c
Kernel Version: 4.14.171

When I try to ping ipv6 address on router I get error

root@OpenWrt:~# ping ipv6.google.com
PING ipv6.google.com (2a00:1450:4017:804::200e): 56 data bytes
ping: sendto: Permission denied
root@OpenWrt:~#

It is same if I use ping6

root@OpenWrt:~# ping6 ipv6.google.com
PING ipv6.google.com (2a00:1450:4017:804::200e): 56 data bytes
ping6: sendto: Permission denied
root@OpenWrt:~#

On some other threads, it is asked to see output of

uci export network; uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user; \
ip -6 addr ; ip -6 ro ls tab all ; ip -6 ru; \
ifstatus wan6; ifstatus lan

Below you can find it. Just for the record, my wan6 interface is down and not starting with boot. I do have wan interface drops about every 1.5 minute if it is up. It has no effect on ping result when I test with wan6 up etiher.

root@OpenWrt:~# uci export network; uci export dhcp; uci export firewall; \
> head -n -0 /etc/firewall.user; \
> ip -6 addr ; ip -6 ro ls tab all ; ip -6 ru; \
> ifstatus wan6; ifstatus lan
package network

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

config globals 'globals'
        option ula_prefix 'fd91:8a85:4db7::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.8.1'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'pppoe'
        option username 'username'
        option password 'password'
        option ipv6 'auto'
        option keepalive '6 10'
        option mtu '1492'
        option force_link '1'

config interface 'wan6'
        option proto 'pppoe'
        option username 'username'
        option password 'password'
        option ipv6 'auto'
        option auto '0'
        option ifname 'eth0.2'
        option mtu '1492'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 3 4 5 0t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '1 0t'

config interface 'eth0_2'
        option ifname 'eth0.2'
        option proto 'dhcp'
        option mtu '1500'
        option force_link '1'

package dhcp

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option nonwildcard '1'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'
        option leasetime '48h'
        option force '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

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

config host
        option name 'RaspberryPi3'
        option dns '1'
        option mac 'B8:27:EB:AF:5F:31'
        option ip '192.168.8.91'

config host
        option name 'RaspberryPi4'
        option dns '1'
        option mac 'DC:A6:32:02:59:DC'
        option ip '192.168.8.90'

config host
        option name 'RaspberryPi4_LAN'
        option dns '1'
        option ip '192.168.8.92'
        option mac 'DC:A6:32:02:59:DB'

config host
        option mac '2C:4D:54:56:C9:F9'
        option name 'ErtanPC'
        option dns '1'
        option ip '192.168.1.99'

config host
        option mac '70:85:C2:7B:26:24'
        option name 'FreeNAS'
        option dns '1'
        option ip '192.168.8.2'

package firewall

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

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

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

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 include
        option path '/etc/firewall.user'

# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.

# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::ae84:c6ff:fe8d:fe3f/64 scope link 
       valid_lft forever preferred_lft forever
13: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fd91:8a85:4db7::1/60 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::ae84:c6ff:fe8d:fe3f/64 scope link 
       valid_lft forever preferred_lft forever
16: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::ae84:c6ff:fe8d:fe3f/64 scope link 
       valid_lft forever preferred_lft forever
1115: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 state UP qlen 1000
    inet6 fe80::ae84:c6ff:fe8d:fe3f/64 scope link 
       valid_lft forever preferred_lft forever
ip: invalid argument 'ls' to 'ip'
0:      from all lookup local 
32766:  from all lookup main 
4200000001:     from all iif lo lookup unspec 12
4200000013:     from all iif br-lan lookup unspec 12
4200001119:     from all iif pppoe-wan lookup unspec 12
{
        "up": false,
        "pending": false,
        "available": true,
        "autostart": false,
        "dynamic": false,
        "proto": "pppoe",
        "device": "eth0.2",
        "data": {

        },
        "errors": [
                {
                        "subsystem": "pppoe",
                        "code": "USER_REQUEST"
                }
        ]
}
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 1438370,
        "l3_device": "br-lan",
        "proto": "static",
        "device": "br-lan",
        "updated": [
                "addresses"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.8.1",
                        "mask": 24
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [
                {
                        "address": "fd91:8a85:4db7::",
                        "mask": 60,
                        "local-address": {
                                "address": "fd91:8a85:4db7::1",
                                "mask": 60
                        }
                }
        ],
        "route": [

        ],
        "dns-server": [

        ],
        "dns-search": [

        ],
        "neighbors": [

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

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {

        }
}
root@OpenWrt:~#

With option ipv6 auto another interface wan_6 will be automatically spawned. So you can delete the wan6 interface. Or if you want to control the wan6 options, in wan interface make option ipv6 1 (or manual).
Remove option mtu '1492' from wan interface, it is already applied and now you have 1484 MTU.

I have removed WAN6, ETH0_2 interfaces.
Above also deleted eth0.2 interface. So, I had to reboot device to get back that eth0.2 interface back.

My current config is as following:

root@OpenWrt:~# ifconfig 
br-lan    Link encap:Ethernet  HWaddr AC:84:C6:8D:FE:3F  
          inet addr:192.168.8.1  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: fd91:8a85:4db7::1/60 Scope:Global
          inet6 addr: fe80::ae84:c6ff:fe8d:fe3f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8162 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6409 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2040149 (1.9 MiB)  TX bytes:2059466 (1.9 MiB)

eth0      Link encap:Ethernet  HWaddr AC:84:C6:8D:FE:3F  
          inet6 addr: fe80::ae84:c6ff:fe8d:fe3f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20613 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5840794 (5.5 MiB)  TX bytes:3538050 (3.3 MiB)
          Interrupt:4 

eth0.1    Link encap:Ethernet  HWaddr AC:84:C6:8D:FE:3F  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6837 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5710 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1804606 (1.7 MiB)  TX bytes:1697486 (1.6 MiB)

eth0.2    Link encap:Ethernet  HWaddr AC:84:C6:8D:FE:3F  
          inet6 addr: fe80::ae84:c6ff:fe8d:fe3f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13728 errors:0 dropped:110 overruns:0 frame:0
          TX packets:6393 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3653985 (3.4 MiB)  TX bytes:1790180 (1.7 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:532 errors:0 dropped:0 overruns:0 frame:0
          TX packets:532 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:54357 (53.0 KiB)  TX bytes:54357 (53.0 KiB)

pppoe-wan Link encap:Point-to-Point Protocol  
          inet addr:10.40.0.199  P-t-P:10.40.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1480  Metric:1
          RX packets:5492 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6376 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:1541365 (1.4 MiB)  TX bytes:1648597 (1.5 MiB)

wlan1     Link encap:Ethernet  HWaddr AC:84:C6:8D:FE:3F  
          inet6 addr: fe80::ae84:c6ff:fe8d:fe3f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1435 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1861 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:265460 (259.2 KiB)  TX bytes:694590 (678.3 KiB)

root@OpenWrt:~# cat /etc/config/network 

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

config globals 'globals'
        option ula_prefix 'fd91:8a85:4db7::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.8.1'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'pppoe'
        option username 'username'
        option password 'password'
        option ipv6 'auto'
        option keepalive '6 10'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 3 4 5 0t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '1 0t'

Unfortunately, I still cannot ping IPv6

root@OpenWrt:~# ping6 ipv6.google.com
PING ipv6.google.com (2a00:1450:4017:804::200e): 56 data bytes
ping6: sendto: Permission denied
root@OpenWrt:~# 

You were not supposed to delete eth0.2, it is essential for the wan.

What is the output of ifstatus wan; ifstatus wan_6 ?

1 Like

There is no WAN_6 anymore as I removed it.

root@OpenWrt:~# ifstatus wan; ifstatus wan_6 
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 28942,
        "l3_device": "pppoe-wan",
        "proto": "pppoe",
        "device": "eth0.2",
        "updated": [
                "addresses",
                "routes"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "10.40.0.199",
                        "mask": 32,
                        "ptpaddress": "10.40.0.1"
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "10.40.0.1",
                        "source": "0.0.0.0/0"
                }
        ],
        "dns-server": [
                "213.194.110.17",
                "8.8.8.8"
        ],
        "dns-search": [

        ],
        "neighbors": [

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

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {

        }
}
Interface wan_6 not found
root@OpenWrt:~# 

wan_6 is not the same with wan6.
wan_6 is automatically created when option ipv6 auto is set in wan interface.
However I don't see any ipv6 address in wan, not even link local.
Have you completely disabled ipv6 in wan?
Have you confirmed with your ISP that they offer IPv6 and the method that they are using?

2 Likes

For example, my ISP offered an experimental IPV6 support which I ended up not using that was only turned on when a specific username / password combo was used

I did not disable ipv6 in wan settings. They are set as below

I will see if I can get a firm answer from my ISP. I probably will not be able to but I will try.

BTW, I do not have good enough knowledge about ipv6. I thought I could ping an ipv6 address from an ipv4 address. So I started this thread.

That is not possible.

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