Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm a newbie and I'd like to know about the Ping command on Linux (I'm using Ubuntu 11.04).

After pinging a PC on my network, how can I make the target PC respond to my ping calls? I can see that the bytes are transmitted to the target but how do I ensure the target responds to the calls?

share|improve this question

migrated from stackoverflow.com Oct 10 '11 at 10:20

This question came from our site for professional and enthusiast programmers.

    
Am I right in thinking you want the target PC to react/respond when it receives a ping? Example, alert the user? When you ping the target PC it should automatically reply and you should receive output detailing the latency between the two machines. In this sense it is already responding. Are you receiving time-out messages? –  Ionis Oct 10 '11 at 9:49
add comment

2 Answers

Target PC responds to ping when it is configured in that way. By default, most servers ignore ping requests.

Try ping google.com and ping localhost. You will see the difference.

share|improve this answer
    
i wouldnt say most are configured to ignore ping, including google.com which pings just fine here. icmp is likely discarded at your network perimeter. –  Sirex Oct 10 '11 at 11:24
add comment

Most PCs should respond to ping

$ ping -c 5 black
PING black.example.com (10.0.0.8) from 10.0.0.9 : 56(84) bytes of data.
64 bytes from black.example.com (10.0.0.8): icmp_seq=1 ttl=128 time=0.231 ms
64 bytes from black.example.com (10.0.0.8): icmp_seq=2 ttl=128 time=0.209 ms
64 bytes from black.example.com (10.0.0.8): icmp_seq=3 ttl=128 time=0.210 ms
64 bytes from black.example.com (10.0.0.8): icmp_seq=4 ttl=128 time=0.211 ms
64 bytes from black.example.com (10.0.0.8): icmp_seq=5 ttl=128 time=0.210 ms

--- black.example.com ping statistics ---
5 packets transmitted, 5 received, 0% loss, time 3999ms
rtt min/avg/max/mdev = 0.209/0.214/0.231/0.012 ms

If they don't respond, I'd check any "firewall" configuration on the target PC.

Firewall, Advanced, ICMP, "allow incoming icmp request"

or command line

netsh firewall set icmpsetting 8 enable

(Assuming the target PC is running Windows (specifically XP)).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.