Linux set min_rto on IPv6 device

user3870920 asked:

I came across which pretty much does exactly what I want, but I need to do it with an IPv6 tunnel.

$ sudo ip -6 route
aaaa::/64 dev tun0  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256
fe80::/64 dev wlan0  proto kernel  metric 256
fe80::/64 dev tun0  proto kernel  metric 256

Then, if I look at my active connections we see:

$ ss -i
tcp   ESTAB      0      0                                                                                             aaaa::1:51692

         cubic rto:360 rtt:157.424/6.438 ato:40 mss:64 cwnd:10 send 32.5Kbps pacing_rate 65.0Kbps rcv_space:28800

It currently has an rto of 360. This device only deals withs super low bandwidth, high latency, lossy networks (i.e. 6LoWPaN) so I want to increase the min_rto to at least several seconds.

I have disabled frto:

$ sudo cat /proc/sys/net/ipv4/tcp_frto

Now I want to set min_rto, as shown in the linked question.

$ sudo ip -6 route change aaaa:: dev tun0 rto_min 2000
RTNETLINK answers: No such file or directory

Why do I get this error and how can I fix it?

It’s worth noting that if I do 2000ms (or 5ms, as in the linked answer), it tells me it’s an invalid value, hence why I dropped off the ms part. In case it matters, my Linux info is below:

Linux 4.4.13-v7+ #894 SMP Mon Jun 13 13:13:27 BST 2016 armv7l GNU/Linux

My answer:

The tcp_* settings listed under IPv4 also apply to IPv6, according to the documentation.

IPv6 has no global variables such as tcp_*.  tcp_* settings under ipv4/ also
apply to IPv6 [XXX?].

Given the question in the documentation there, it would be wise to verify this applies to your specific (older) kernel before proceeding.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.