# Gentoo Guys, Are Your ping and ping6 the Same?

## wswartzendruber

I've been irritated for years that ping and ping6 were two separate utilities.  Well, I'm back with Linux now (Ubuntu) and I randomly decided to ping www.google.com.  It returned a v6 address.  Further investigation has revealed:

```
wswartzendruber@wswartzendruber-System-Product-Name:/bin$ ls -l /bin/ping*

-rwsr-xr-x 1 root root 60288 Jun 15  2016 /bin/ping

lrwxrwxrwx 1 root root     4 Dec 19 21:17 /bin/ping4 -> ping

lrwxrwxrwx 1 root root     4 Dec 19 21:17 /bin/ping6 -> ping

wswartzendruber@wswartzendruber-System-Product-Name:/bin$ 
```

...and...

```
wswartzendruber@wswartzendruber-System-Product-Name:/bin$ ping -h

Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]

            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]

            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]

            [-w deadline] [-W timeout] [hop1 ...] destination

Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]

             [-l preload] [-m mark] [-M pmtudisc_option]

             [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]

             [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]

             [-W timeout] destination

wswartzendruber@wswartzendruber-System-Product-Name:/bin$ 
```

Is it the same for you guys?

----------

## khayyam

wswartzendruber ... this would depend on useflags:

```
# equery belongs -e /bin/ping

 * Searching for /bin/ping ... 

net-misc/iputils-20151218 (/bin/ping)

# equery -NC u net-misc/iputils | grep ipv6

 - - ipv6  : Add support for IP version 6

# ls -l /bin/ping*

-rwx--x--x 1 root root 42996 2016-05-27 14:10 /bin/ping
```

best ... khay

----------

## krinn

it will answer you  :Smile: 

http://www.portagefilelist.de/site/query/listPackageFiles/?category=net-misc&package=iputils&version=20160308&do#result

----------

## wswartzendruber

It looks like this happened last March.  Good.  I was wondering when iputils would join the modern world.

----------

## NeddySeagoon

Team,

```
$ ls -l /bin/ping* 

-rws--x--x 1 root root 39800 May  7  2016 /bin/ping

-rws--x--x 1 root root 44344 May  7  2016 /bin/ping6
```

It looks like another learning opportunity for me.

----------

## Ant P.

```
 ~ $ ls /bin/ping*

-rwx--x--x 1 root root   45728 Apr 27  2016 ping

-rwx--x--x 1 root root   46112 Apr 27  2016 ping6

 ~ $ /sbin/getcap /bin/ping*

/bin/ping = cap_net_raw+ep

/bin/ping6 = cap_net_raw+ep

 ~ $ emerge --info iputils | sed -n '/iputils/,$ p'

net-misc/iputils-20151218::gentoo was built with the following:

USE="caps filecaps ipv6 -SECURITY_HAZARD -arping -clockdiff -doc -gcrypt -idn -libressl -rarpd -rdisc -ssl -static -tftpd -tracepath -traceroute" ABI_X86="64"
```

I prefer them being separate binaries myself, but then I'm also one of those weirdos that does `sysctl net.ipv6.bindv6only=1` for security.

----------

