4 ms·
> [The Fine Article / OP] may have some funky network setup It is very common (or perhaps almost ubiquitous since most routers will respond, idk) to get respon
by lucb1e 2y ago
> [The Fine Article / OP] may have some funky network setup
It is very common (or perhaps almost ubiquitous since most routers will respond, idk) to get responses and works by default for most devices. It will not work if you:
- Have no IPv6 devices on your network
- The hosts on your network have a firewall that filters the packets or configuration that disables pinging (I think Windows disabled ping by default since Vista)
- You have some fancy network with host isolation (trading usability for security), often seen with enterprise vendors
- It autodetected the wrong interface to send the packets out on. I don't know how ping does this, perhaps it tries to just send it everywhere. Can't quickly find it but the Arch wiki says you have to specify the interface (for me it works without, so clearly that's not exactly accurate, but I imagine it may not do what you want)
- Latty 2y agoOn Arch, I get "ping: Warning: IPv6 link-local address on ICMP datagram socket may require ifname or scope-id => use: address%<ifname|scope-id>", and it doesn't work unless I do so.
- lucb1e 2y agoOh, interesting! Which ping have you got? Mine comes from the iputils-ping Debian package, which the man page confirms it's part of some broader iputils set of tools. I see there is also inetutils-ping which provides the same /bin/ping and /bin/ping6 commands, is that perhaps the one you've got? For anyone wanting to replicate this "provides" query on Debian, I use `apt-file search /bin/ping` to list what packages have a file with that name -- this will also match `/usr/bin/ping6` (both prefixes and suffixes will match) but that was fine in this case. (If you just do `apt search ping` or something, you get a huge list of any package mentioning the word ping, which may be what you want when searching for something more broadly; and if you use `apt search /bin/ping` it comes up empty because it doesn't have file path data.) Edit: now that I had looked up which utility it is, I figured I'd check the "is documentation enough" on how it finds which interface to use. It looks to me like it is `getaddrinfo` that decides it: https://github.com/iputils/iputils/blob/master/ping/ping.c#L648-L681 https://github.com/iputils/iputils/blob/master/ping/ping.c#L...
- Latty 2y agoYeah, I'm just using Arch's default iputils: > pkgfile $(which ping) core/iputils That doesn't provide a `ping6`, presumably as `ping -6` is the preferred solution.
- aftbit 2y agoI tried this on Arch and it didn't work at all. $ ping -6 ff02::1%eth2 Did I miss some kernel tunable or nftables setting? Unicast ping works fine.
- Latty 2y agoDo you have a link-local v6 address on that device? My first attempt `ping ff02::1%enp9s0` didn't work because I use VLANs and don't actually get addresses on the base device, using the VLAN virtual device (in my case `ping ff02::1%lan`) worked for me. You shouldn't need `-6`, given it's a v6 address.
- aftbit 2y agoYea I figured -6 was superfluous but I put it in because another commenter made a big deal out of ping vs ping6 (a distinction that's been gone in Arch for a while). I do have a link local address directly on that NIC. I also use VLANs sometimes, but none are configured right now on this link. Slightly edited below to hide my MAC but: $ ip -6 address show dev eth2 | grep link inet6 fe80::aef0:b837:fafa:fefe/64 scope link noprefixroute The same command works fine on my Debian and OpenWRT boxes, but not on my Arch desktop.
- cchance 2y agoon osx it's .... ping6 -I en0 ff02::1 maybe different way to specify the interface