1

I have a ping spike problem and according to some topics, I write on Terminal:

ping 8.8.8.8 -i 0.1

And I see some spikes on this screen like this:

64 bytes from 8.8.8.8: icmp_seq=5283 ttl=52 time=18.724 ms
64 bytes from 8.8.8.8: icmp_seq=5284 ttl=52 time=120.788 ms
64 bytes from 8.8.8.8: icmp_seq=5285 ttl=52 time=43.184 ms
64 bytes from 8.8.8.8: icmp_seq=5286 ttl=52 time=48.199 ms
64 bytes from 8.8.8.8: icmp_seq=5287 ttl=52 time=25.121 ms

My question is, how can I trace icmp_seq=5284? How can I know which request does that?

nohillside
  • 100,768
Wokers
  • 43
  • 2
  • 1
    This would be buffering on the network. Who manages your switch / router / network connection? ICMP echo is the least urgent traffic - so you can have this and your network can be running amazingly fast - it’s actually a sign the router is prioritizing actual traffic and not a disposable echo packet. – bmike May 26 '20 at 17:12

2 Answers2

3

There's a couple of problems here...

how can I trace icmp_seq=5284

That's not how it works. That seq or sequence number is just a two byte field (16 bits) that's used the match the packet that you sent out with the reply. Your request doesn't create a spike. However, technically, it's already been traced - that packet went out, was replied to and the time it took to return was x milliseconds.

I have ping spike problem and according to some topics, I write on terminal:

ping 8.8.8.8 -i 0.1

The problem here is that your pinging a public (in this case Google's) DNS server. For me, there's 11 separate hops between my personal network and that DNS server; there's probably a similar amount for you. The point is, anything on any of those points can contribute to a latency and a ping spike.

If you're trying to gauge your bandwidth from your ISP, you need something like http://speedtest.net (there's a CLI version available). If you looking to check the speed transfer between two different services across ISPs, then you need iperf3.

Finally, pinging Google is an excellent way to check to see if your Internet is up. It's not a good site to check for latency and/or bandwidth throughput. These are heavily taxed servers subject to varying traffic at any point during the day.

Allan
  • 101,432
  • I ve checked ISP and there is no problem from them. The problem is my computer apparently. My ping is 10-15 normally during an online game for example, for a few seconds it raises to 200ms and get back to normal. I want to understand what the problem is for my mac. Do you have any advise? – Wokers May 26 '20 at 13:35
  • @wokers As Allan explained: ping just sends packets out and collects the results, the time you see is basically the time the packet needs to get to 8.8.8.8 and the time the answer needs to get back to your computer. I get 3-4ms usually, with some 15-20ms peaks inbetween, so some variability is too be expected. There is nothing wrong with your Mac. – nohillside May 26 '20 at 13:48
  • @nohillside I am sorry but it is not normal to have 200ms ping when you have 15ms normally. – Wokers May 26 '20 at 13:58
  • @Wokers I don't know what's considered to be normal for pings (i've seen far worse than 200ms), but it can be anything between your computer and the target system (try 1.1.1.1 maybe to compare, or www.facebook.com). It could be another process on your computer sending network data, another device in your LAN, the router being under load, a system or network segment on the "Internet", basically anything. – nohillside May 26 '20 at 14:12
  • 1
    Unless you have evidence of a network issue, your ISP will always say "there's no problem from them." Seeing a latency in a ping does not mean there's an issue with your Mac; there's very little chance of that. There are a ton of things that contribute to latency (i.e. wireless network issues, router issues, ISP issues, network congestion issues across the Internet, delays in the server responding, etc.). You're making a rather large jump to assume whatever latency you've discovered is somehow the fault of your Mac. – Allan May 26 '20 at 15:01
2

If you wanted to capture the exact packet trace - here is how Apple recommends it.

The steps vary based on OS and if you are on Wireless or Ethernet. All this will show is more detail on what ping reported, but you’ll have actual traffic to then hand to your router manufacturer / ISP if you go to the mat on this one. You probably want to profile some traffic more prioritized than an ICMP echo packet, though.

Or do a ICMP ping to your router if you think the problem / congestion is on your side where you have the chance to control. Once the traffic leaves your premises - good luck getting control of it without paying for a lot of service and becoming a network engineer. It’s possible, but lots of cost and time.

bmike
  • 235,889