0

I was wondering if someone could explain to me why when I ping 8.8.8.8 there are several results such as:

64 bytes from 8.8.8.8: icmp_seq=1 ttl 42 time=37.8 ms

This goes on and on well into the hundreds. I am assuming this just shows I have a connection to my server. If so how do I get a public IP instead of on a private network? Any help would be greatly appreciated. I'm new at ubuntu server so any help is appreciated.

I am connected via a cisco router/modem at home but with a static ip. I'm using a business account however.

Kevin
  • 1

1 Answers1

2

By default, ping doesn't stop sending packets until you hit Ctrl+C to send the KeyboardInterrupt signal (which tells the program to stop pinging and generate statistics). As such, you get hundreds of those lines, indicating the round-trip time, which ping packet you're getting echoed back to you (as you get them sent in sequence of 1, 2, 3, ...), and what the time it took to echo back to you was.

If you only want to send, say, 5 packets with each ping, you would use the -c flag and put 5 there, which instructs the system to send 5 packets and wait for 5 responses (or for the responses to time out). The command would then be ping -c 5 8.8.8.8, using the default timeout settings embedded into the program.

Thomas Ward
  • 78,878