0
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.

0

1 Answer 1

1

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 www.google.com

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.

7
  • ping with IPv4 uses same TTL as set by sysctl. I confirmed this with Arch GNU/Linux and Gentoo GNU/Linux for IPv4, and confirmed this with Gentoo GNU/Linux for IPv6. With Gentoo GNU/Linux, changing IPv6's hop limit sysctl works as expected, but I don't know Arsch GNU/Linux does not behave so. Both of them (Gentoo GNU/Linux and Arch GNU/Linux) are with using systemd. (I put an up vote because I liked that you reminded to manually set the TTL for ping for my troubleshooting, thanks a lot!)
    – caveman
    Aug 11, 2020 at 3:16
  • @caveman I suppose it depends on the version of ping your Linux distribution is using. I used ping from iputils which is the version installed on Red Hat based systems. Neither Arch nor Gentoo are common around here as this site is focused on professional IT operations. In any case, if you want to be 100% sure about the hop limit, send some real traffic. Aug 11, 2020 at 3:20
  • My Arch also uses core/iputils 20190709-2. I suspect your RedHat is using old versions, which is typical of RedHat, Debian, etc. Arch and Gentoo are often on the bleeding edge.
    – caveman
    Aug 11, 2020 at 18:44
  • Um, it's 20190515, so I guess that's old :) Of course, being bleeding edge is one of several reasons Arch and Gentoo are not commonly used. Aug 11, 2020 at 18:48
  • Gentoo GNU/Linux is commonly used. It's just that it is used by the few elites of the interwebs who choose USE flags and regularly apply custom patches. We're so elite we don't eve like the latest upstream packages, so we keep adding our custom patches to it, effectively we're actually living in about 2025 right now. At least me.
    – caveman
    Aug 11, 2020 at 23:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .