Router internet slow with IPv6 enabled - works fine from clients

Hi!

I’m on TOS 4.0.1 and have been having this strange problem when I enable IPv6 on my router. Basically it works perfectly fine from all clients - even LXC containers on the router, but is extremely slow on the router itself.

A simple opkg update with IPv6 enabled takes around 50 minutes, as opposed to 5 seconds without it.

I tried time curl -6 https://openstreetmap.cz >/dev/null and it timed out after around 2min, but from my workstation it works in under 0.02s.

A few details of my configuration:

  • ISP is Hyperoptic in the UK
  • Fiber to the Premises
  • Direct ethernet connection via DHCP and DHCPv6
  • /56 address space reserved for my devices

The way I configured IPv6 was by creating a new interface called wan6 bridged to eth2:

config interface 'wan6'
	option proto 'dhcpv6'
	option ifname 'eth2'
	option reqaddress 'try'
	option reqprefix 'auto'

eth2 gets its public IPv6 address just fine:

root@turris:/# ip a show dev eth2
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc cake state UP group default qlen 532
    link/ether d8:58:d7:00:9e:6e brd ff:ff:ff:ff:ff:ff
    inet 100.64.171.115/24 brd 100.64.171.255 scope global eth2
       valid_lft forever preferred_lft forever
    inet6 2a01:4b00:5321:37b8:9006:88ba:c27e:b7d0/128 scope global dynamic noprefixroute
       valid_lft 81964sec preferred_lft 67564sec
    inet6 fe80::da58:d7ff:fe00:9e6e/64 scope link
       valid_lft forever preferred_lft forever

And I get the following PD on the wan6 interface:

IPv6-PD: 2a01:4b00:9d42:9600::/56

I’m not sure where else I can look as I’m relatively new to IPv6. IPv4 works as expected.

Little bit more context, it doesn’t seem to be DNS related as that’s snappy:

root@turris:~# time dig -6 repo.turris.cz

; <<>> DiG 9.11.10 <<>> -6 repo.turris.cz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59990
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;repo.turris.cz.			IN	A

;; ANSWER SECTION:
repo.turris.cz.		1730	IN	CNAME	proxy.turris.cz.
proxy.turris.cz.	92	IN	A	217.31.192.69

;; Query time: 0 msec
;; SERVER: ::1#53(::1)
;; WHEN: Fri Oct 11 23:15:43 BST 2019
;; MSG SIZE  rcvd: 79

real	0m 0.01s
user	0m 0.00s
sys	0m 0.01s

hi there. Not sure if this helps, but my ipv6 approach is different & working?
I just created a WAN ( ip4) and set the ipv6 conf on auto. ( advanced>obtain ipv6 adress>auto )
Basically the ipv6 is then made by the OS, and all is running smooth?

I repeated your tests, and all is fine here?

best, Dikke

@turrisMOX:~# time dig -6 repo.turris.cz

; <<>> DiG 9.11.10 <<>> -6 repo.turris.cz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47362
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;repo.turris.cz. IN A

;; ANSWER SECTION:
repo.turris.cz. 244 IN CNAME proxy.turris.cz.
proxy.turris.cz. 300 IN A 217.31.192.69

;; Query time: 71 msec
;; SERVER: ::1#53(::1)
;; WHEN: Sat Oct 12 08:51:05 CEST 2019
;; MSG SIZE rcvd: 79

real 0m 0.28s
user 0m 0.02s
sys 0m 0.00s

@turrisMOX:~# time curl -6 https://openstreetmap.cz >/dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36680 0 36680 0 0 62064 0 --:–:-- --:–:-- --:–:-- 80262
real 0m 0.62s
user 0m 0.09s
sys 0m 0.01s

Thanks for your reply but I have no such option when DHCP is selected as the protocol. It is there for PPPoE but not for DHCP and other protocols.

Hello,

this looks like your ISP is applying some traffic control to the IPv6 address of your router – maybe to protect their infrastructure. Since IPv6 works properly for connected devices, which use prefix 2a01:4b00:9d42:9600::/56, you may try to disable the global address 2a01:4b00:5321:37b8:9006:88ba:c27e:b7d0/128 on the WAN interface by setting:

option reqaddress 'none'

This would make your WAN link unnumbered and force your router to use the LAN adddres for its own communication with the Internet.

Thank you for your suggestion.

Gladly, I didn’t have to do anything and the issue sorted itself out without intervention on my part, so I guess it really was something on the ISP side.

If it happens again, feel free to write us for re-open.