1832645 Members
3072 Online
110043 Solutions
New Discussion

Ping command

 
Manuales
Super Advisor

Ping command

Hi, how can i know if command ping is available for everybody?

what is the port used for that?
how can i review that?

how is related netstat -a with ping command?

please let me know.
Thanks.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Ping command

Hi Manuaales:

The 'ping' command resides in '/usr/sbin' which is standardly in the user's default PATH.

Ping operates at the network layer of the OSI model so there is no port involved.

http://en.wikipedia.org/wiki/OSI_layer

The 'netstat' command returns information much higher up in the layers.

Genearally you do not encourage normal users to use 'ping'. It can be disruptive to a network and has been exploited in DOS (Denial of Service) attacks.

Regards!

...JRF...
spex
Honored Contributor

Re: Ping command

Hello Manuales,

> Hi, how can i know if command ping is
> available for everybody?

$ ls -l /usr/sbin/ping | awk '{print $1}'
-r-sr-xr-x

By default, any user can execute the ping command. However, most users will need to provide the absolute path to the command, as '/usr/sbin' is not in a typical user's PATH.

> what is the port used for that?

'ping' sends ICMP echo request packets, which function at the network, not transport, OSI layer. Hence, there is no notion of a "port".

> how is related netstat -a with ping command?

Invocations of 'ping' will not appear.

PCS
Ernesto Cappello
Trusted Contributor

Re: Ping command

Hi Manuales,

"ping" command normally is available for everybody.

If you don't want you can change the permission:

chmod 770 /usr/sbin/ping

Best regards
Ernesto
James George_1
Trusted Contributor

Re: Ping command

ping command also has a link in /etc/ping .

Any one can use this , either with /usr/sbin/ping or /etc/ping .

Rgds / james
forum is for techies .....heaven is for those who are born again !!