How to change hop limit of IPv6 in Linux?

caveman asked:

net.ipv6.conf.all.accept_ra_min_hop_limit = 1
net.ipv6.conf.all.hop_limit = 65
net.ipv6.conf.default.accept_ra_min_hop_limit = 1
net.ipv6.conf.default.hop_limit = 65
net.ipv6.conf.enp0s25.accept_ra_min_hop_limit = 1
net.ipv6.conf.enp0s25.hop_limit = 65
net.ipv6.conf.lo.accept_ra_min_hop_limit = 1
net.ipv6.conf.lo.hop_limit = 65
net.ipv6.conf.wlp7s0.accept_ra_min_hop_limit = 1
net.ipv6.conf.wlp7s0.hop_limit = 65

But when I ping, wireshark shows me hop limit is still 64. What is going on?

Using Arch Linux.

My answer:

The ping utility creates raw packets with their own hop limit set. By default ping uses a hop limit of 64, but you can change it with the -t option.

ping -6 -c1 -t128

Wireshark packet capture showing Hop limit: 128

If you mean to check whether outgoing traffic has the hop limit set correctly as in your sysctl, you should create some real traffic using something like your actual workload.

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.