-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support IPv6 in the ping plugin #2159
Comments
We need to gather ping6 examples for Linux, BSD, Windows. Also interesting, on Debian ping6 is a symlink to ping which has a |
That assumption is wrong, or better, it has been invalidated by pragmatic needs of users, and by time. A monitoring application or a user may not know the address family of the target address, it/he is often just interested in reachability of a target host. Even when one does indeed care about a specific address family, it is as easy as specifying a -4 or -6 option in a rare case where a target is specified as a DNS name (as opposed to an IP address) and has both an A as well as an AAAA address record. Now consider the opposite: when a monitoring application is given a host name of a target (not its IP address). In order to determine whether to call ping or ping6, the application (or a script) has to perform a DNS lookup to collect addresses, and has to be aware of the connectivity capabilities of the monitoring host, to be able to find Even though icmp and icmp6 protocols use a different protocol number and differ in details, their purpose and functionality is pretty much the same (with icmp6 providing more functions, but keeping basic functions very close to icmp). To summarize the choices of a protocol to use:
The world has moved on. Producers of network equipment have chosen a pragmatic approach years ago by providing a unified ping (and traceroute) in their gear, with options to override the automatic choice. This holds true for players like Cisco, Extreme Networks, MikroTik RouterOS, I believe also Juniper, and more. Similarly, Microsoft did the same, the ping command in Windows 7/8/10 is a unified ping, with optional protocol override. (also the unified traceroute) Luckily Linux has followed the lead, so in CentOS 7 / RHEL 7, Fedora 25 (probably in 24 as well), there is a unified ping with options -4 and -6, and for compatibility the ping6 is a link to it. In OpenBSD 6.1 the ping and ping6 are the same file (hard link), although unfortunately it does not automatically chose the protocol by itself. Similarly in Ubuntu 16.10 the ping4 and ping6 are soft links to the same program. Sorry about the rambling, I had to let it out. Now to the topic of options compatibility. I tried a couple of platforms, considering that the ping plugin to telegraf only cares about options -I, -i, -c, -s, -n, and -W, so here are my findings. I tried: FreeBSD 11 (and 10, should be the same as MacOS), NetBSD 7.1, OpenBSD 6.1 (devel), Debian 8, Ubuntu 16.10, Fedora 25, CentOS 7, and Windows 10. Interface to send ping from:
Interval at which to ping:
Number of pings to send:
Packet size (in bytes):
Numeric only:
The troublesome option is a ping timeout, which varies wildly:
As for the IPv4 vs. IPv6 override options on platforms which provide a unified ping: Cisco IOS:
Summit ExtremeXOS:
MikroTik RouterOS:
Windows 10:
Fedora 25:
CentOS 7:
|
Obviously this is tricky since ping is many different programs. I think we could get closer if we allow the path to ping to be configured as well as letting the user pass a list of args. It would be similar to the proposal in #2505 |
Feature Request: Support IPv6 ping by adding a configuration option in the plugin to switch to using the ping6 tool instead of ping.
IPv6 ICMP is not supported by the ping tool.
Reference:
source
The text was updated successfully, but these errors were encountered: