Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It was either just the way someone did it or an issue with how ping worked and they said, Oh snap, just make a new app for it since we don't want to break ping.
Might have to email the ping6 creators for the real answer. http://www.kame.net/ may know the answer.
D'oh! I found the answer at the bottom of an online man page (though not in the man page included in Ubuntu). I don't agree with it, but there it is. For one thing, I don't understand how the socket API differs for raw sockets between IPv4 and IPv6 (when it should just be raw, anything goes).
As an alternative, I think they should have renamed ping to ping4, and make a new program called ping be a front end to the others, based on either the -4 or -6 option, or when an IP address is given, the format of the IP address. This tiny front end could then invoke the others. I guess I have another project to do.
The ping6 utility is intentionally separate from ping(8).
There have been many discussions on why we separate ping6 and ping(8).
Some people argued that it would be more convenient to uniform the ping
command for both IPv4 and IPv6. The followings are an answer to the
request.
From a developer's point of view: since the underling raw sockets API is
totally different between IPv4 and IPv6, we would end up having two types
of code base. There would actually be less benefit to uniform the two
commands into a single command from the developer's standpoint.
From an operator's point of view: unlike ordinary network applications
like remote login tools, we are usually aware of address family when
using network management tools. We do not just want to know the reacha-
bility to the host, but want to know the reachability to the host via a
particular network protocol such as IPv6. Thus, even if we had a unified
ping(8) command for both IPv4 and IPv6, we would usually type a -6 or -4
option (or something like those) to specify the particular address fam-
ily. This essentially means that we have two different commands.
I think the answer from that page is a bit of bloated puffery and officiousness. But that is just my own humble opinion.
They are incorrect in their statement in the end that they are two totally different commands?
Has no one noticed that if you type ping6 ipv6.google.com that the very first part of the returned printout whether the ping was successful or unsuccessful is "ping"?
I've tested and from linux and windows both i've pinged googles ipv6 url and ip address by both ping and ping6 and get the same results with both commands.
brad@ftbseo-Linux:~$ ping ipv6.google.com
PING ipv6.google.com(lax17s15-in-x0e.1e100.net (2607:f8b0:4007:80c::200e)) 56 data bytes
64 bytes from lax17s15-in-x0e.1e100.net (2607:f8b0:4007:80c::200e): icmp_seq=1 ttl=52 time=59.4 ms
64 bytes from lax17s15-in-x0e.1e100.net (2607:f8b0:4007:80c::200e): icmp_seq=2 ttl=52 time=53.3 ms
64 bytes from lax17s15-in-x0e.1e100.net (2607:f8b0:4007:80c::200e): icmp_seq=3 ttl=52 time=41.4 ms
brad@ftbseo-Linux:~$ ping 2600:3c01::f03c:91ff:fee7:5272 -c 1
PING 2600:3c01::f03c:91ff:fee7:5272(2600:3c01::f03c:91ff:fee7:5272) 56 data bytes
64 bytes from 2600:3c01::f03c:91ff:fee7:5272: icmp_seq=1 ttl=51 time=37.9 ms
I can't believe I'm the only person who has ever thought outside the box andtried this and gotten a positive result.
The only thing I can imagine (and I'm at least honest enough to admit I don't know why it was originally thought that ping6 was required to ping ipv6 addresses.) is there was a network protocol need to ping6 in the beginning before there was more structure in the networking world that required a ping6 but it's pretty obvious with the above printout that they are not two separate commands nor two separate protocols. It could have been a Linux issue originally too because I've always just done a straight ping for ipv6 addresses in Windows. Ipv6 has been out for 11 years now but because I've only recently been heavily involved in Linux servers did I ever hear that you were supposedly required to ping6.
I accidentally forgot one day and just did a regular ping command and got a result so I've never looked back.
"From an operator's point of view: unlike ordinary network applications
like remote login tools, we are usually aware of address family when
using network management tools. We do not just want to know the reacha-
bility to the host, but want to know the reachability to the host via a
particular network protocol such as IPv6. Thus, even if we had a unified
ping(8) command for both IPv4 and IPv6, we would usually type a -6 or -4
option (or something like those) to specify the particular address fam-
ily. This essentially means that we have two different commands."
OK I don't know if I want to shake my head or laugh...
Seriously? This person takes themselves way to seriously.
"Thusly"?
"We do not just want to know the reacha-
bility to the host, but want to know the reachability to the host via a
particular network protocol such as IPv6. Thus, even if we had a unified
ping(8) command for both IPv4 and IPv6, we would usually type a -6 or -4
option (or something like those) to specify the particular address family. This essentially means that we have two different commands."
Seriously? You don't think there is an obvious difference between a 4 digit octet of base10 numbers separated by periods and base16 hexadecimals seperated by :?
Ok I'm going to just walk away and shut up before I get censored or banned by a moderator or admin.
We should name *which* ping we're talking about. My ping won't do ipv6 addresses:
Code:
ping --version
ping (GNU inetutils) 1.9.4
...
ping ipv6.google.com
ping: unknown host
Exit 1
ping6 ipv6.google.com
PING ipv6.l.google.com (2607:f8b0:4009:80d::200e): 56 data bytes
64 bytes from ord36s02-in-x0e.1e100.net: icmp_seq=0 ttl=55 time=26.706 ms
64 bytes from ord36s02-in-x0e.1e100.net: icmp_seq=1 ttl=55 time=27.174 ms
...
The seperate ping6 will. I think it was because ping ipv4 was around way earlier. Then they added another utility rather than rebuild the old. Notice nmap's "nping" can do both, via a switch, from the same binary.
The seperate ping6 will. I think it was because ping ipv4 was around way earlier. Then they added another utility rather than rebuild the old. Notice nmap's "nping" can do both, via a switch, from the same binary.
i'm using Ubuntu 16.04.3 LTS and it still has separate ping commands which each cannot do the other. i frontended both to detect the family of a given address and run the appropriate command. i usually ping addresses rather than hostnames, so it is generally adequate for me. still, i'd rather have a command that can ping either way. thinking about hostnames, lots of them will, if not now, have both IPv4 and IPv6. so how will we ping for availability? often, apps try all the addresses they get from DNS. shouldn't ping do the same? this could get messy. a command that more quietly and more smartly evaluates availability might be a good tool. an answer might be: "DNS CNAME 1 A 1 AAAA 2 ICMP ip4 0 /10 ip6 0 /10 TCP ip4 0 /5 ip6 5 /5" ... where it tries to ping (may be blocked) and connect all combinations. it should do a thorough DNS trace, too, including report slow DNS responses.
anyone have a package suggestion for Ubuntu 16.04.3 LTS for a dual-family ping command?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.