Recent

Author Topic: Synapse Ping bad responses  (Read 908 times)

peardox

  • Jr. Member
  • **
  • Posts: 61
Synapse Ping bad responses
« on: January 15, 2020, 04:35:10 pm »
My Internet is playing up so I decided to write a quick little utility to record Internet outages

I cribbed the basics from https://forum.lazarus.freepascal.org/index.php?topic=39409.0 - the quick little app uses that at its heart on a timer.

After some issues getting Synapse to (not) install I just dumped the entire source tree in my project - well, at least it works this way...

Anyway, I've gone through several iterations of the app in the last day. It seems a little "sensitive" - that or my Internet is really bad.

I've got it running on a 1 second timer pinging 1.1.1.1 which usually does a 15 ms ping. The ping has a 750ms timeout setting so everything should be completed within the second.

If a ping results in a timeout I count it as a bad ping, if the ping fails for 10 secs I call it a disconnect.

The current run has been going for about 7.5 hours and I've recorded 873 failed pings (out of c 26,800 total) with 11 cases lasting > 10 seconds (142 secs for the 11 triggers)

As I see it there are two possible issues...

1) My Internet is really crap
2) The timer is being re-entered before the last one finished (I'll try checking that later)

Anyone got any bright ideas?


lucamar

  • Hero Member
  • *****
  • Posts: 3025
Re: Synapse Ping bad responses
« Reply #1 on: January 15, 2020, 04:51:56 pm »
Anyone got any bright ideas?

One question comes to mind: are you sure the server is not just locking you out? Pinging a server continuousy might be considered a DoS trial attack. Just saying :-X
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

peardox

  • Jr. Member
  • **
  • Posts: 61
Re: Synapse Ping bad responses
« Reply #2 on: January 15, 2020, 05:04:18 pm »
I chose 1.1.1.1 specifically for that reason - it's CloudFlare's DNS

https://en.wikipedia.org/wiki/1.1.1.1

MarkMLl

  • Hero Member
  • *****
  • Posts: 1226
Re: Synapse Ping bad responses
« Reply #3 on: January 15, 2020, 05:09:53 pm »
Speaking as somebody who has spent far too much time messing around with this sort of thing: what results do you get if you run ping from a shell with the equivalent parameters?

Is the far end somebody with whom you have any sort of commercial relationship? If not then they're be entirely justified in ignoring you if they've got better use for their bandwidth.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

MarkMLl

  • Hero Member
  • *****
  • Posts: 1226
Re: Synapse Ping bad responses
« Reply #4 on: January 15, 2020, 05:11:52 pm »
I chose 1.1.1.1 specifically for that reason - it's CloudFlare's DNS

Have they explicitly said that they don't mind people pinging it? Just because somebody's putting up one particular service doesn't mean they accept a different one: one of the ISPs we use has a dedicated server for pings which also captures various metrics.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

peardox

  • Jr. Member
  • **
  • Posts: 61
Re: Synapse Ping bad responses
« Reply #5 on: January 15, 2020, 05:38:33 pm »
I don't see CloudFlare having any issues with me pinging them once a second, in fact the same should hold true for ny number of open systems e.g. Google DNS, OpenDNS etc

Pinging a server ain't a DDos, in fact CloudFlare claim to be able to adapt to DDos attacks which is why I specifically chose that server

Just to rule any ownership issues out I'm now pinging my AWS server - I give myself permission to do so...:)


Thaddy

  • Hero Member
  • *****
  • Posts: 10469
Re: Synapse Ping bad responses
« Reply #6 on: January 15, 2020, 06:12:15 pm »
On - some of - my servers I drop ping requests. I suppose CloudFlare does the same.

And, btw, ping flooding is a ddos attack! So many well behaved servers ignore ping requests. So ignore that response.

Instead of sending to /dev/null, the latter can also be mitigated by timed response based on single connection registration that allows only a finite amount of pings from the same IP. That's probably what happens here. Try 500 ms instead of 15 ms. Your 750 in between seems ok to me.
« Last Edit: January 15, 2020, 06:29:31 pm by Thaddy »
When you ask a question that is actually answered in the documentation, you are either lazy or a moron.

winni

  • Hero Member
  • *****
  • Posts: 1806
Re: Synapse Ping bad responses
« Reply #7 on: January 15, 2020, 06:17:18 pm »
Hi!

Open a terminal and ping your favourite address.
Do the same with your own synapse app.

Now you can compare the two response times.

Afterwards you know, if you got a lousy provider or if the problem is synapse-based.

Winni

Thaddy

  • Hero Member
  • *****
  • Posts: 10469
Re: Synapse Ping bad responses
« Reply #8 on: January 15, 2020, 06:22:35 pm »
Hi!

Open a terminal and ping your favourite address.
Do the same with your own synapse app.
Good idea. I bet that they behave the same (exactly the same). Note the ping utilities on all platforms have a much larger time value than 15 ms in between pings (about 250 ms).
Quote
Now you can compare the two response times.

Afterwards you know, if you got a lousy provider or if the problem is synapse-based.
That is nonsense, as I explained. It is controlled server side.
« Last Edit: January 15, 2020, 06:24:59 pm by Thaddy »
When you ask a question that is actually answered in the documentation, you are either lazy or a moron.

winni

  • Hero Member
  • *****
  • Posts: 1806
Re: Synapse Ping bad responses
« Reply #9 on: January 15, 2020, 06:29:06 pm »
God knows everything.
Thaddy knows everything better.

There  are enough public servers which don't drop pings - 1.1.1.1 is one of them.
Another bullet proof server is  104.18.55.162 (https://sportzonline.to).

Winni

Thaddy

  • Hero Member
  • *****
  • Posts: 10469
Re: Synapse Ping bad responses
« Reply #10 on: January 15, 2020, 06:31:18 pm »
@winni
There are just as many servers that drop pings by any of the means I described.
I supposed he pings a particular server over which he does not have control.
When you ask a question that is actually answered in the documentation, you are either lazy or a moron.

peardox

  • Jr. Member
  • **
  • Posts: 61
Re: Synapse Ping bad responses
« Reply #11 on: January 15, 2020, 06:31:55 pm »
1) Cloudflare have an article on ping flood - https://www.cloudflare.com/learning/ddos/ping-icmp-flood-ddos-attack/

I'm not doing anything that could be interpreted as such...

Think I'll email CloudFlare and ask them where best to ping, the app is useful and I couldn't find a free one that did even close what I want.

2) Did the comparison on a local Linux box

Got similar results for timeouts (one extra for my app)

Interestingly the Linux ping reported zero losses as it found the ones that got missed - they took > 1s by the look of it to Google + back. The 571/572 bit will be me killing the ping...

simon@Ubu:~/git/utils/mtg/Logs$ ping -O -q 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
no answer yet for icmp_seq=4
no answer yet for icmp_seq=486
^C
--- 8.8.8.8 ping statistics ---
572 packets transmitted, 571 received, 0% packet loss, time 571943ms
rtt min/avg/max/mdev = 11.473/16.813/1027.469/43.493 ms, pipe 2

3) Guess I need to read the Synapse docs to see if there's an event or something for pings that take a long time...

Thaddy

  • Hero Member
  • *****
  • Posts: 10469
Re: Synapse Ping bad responses
« Reply #12 on: January 15, 2020, 06:34:31 pm »
3) Guess I need to read the Synapse docs to see if there's an event or something for pings that take a long time...
That's easy. The time out is set on the socket. Will add link later.
When you ask a question that is actually answered in the documentation, you are either lazy or a moron.

peardox

  • Jr. Member
  • **
  • Posts: 61
Re: Synapse Ping bad responses
« Reply #13 on: January 15, 2020, 06:35:43 pm »
God knows everything.
Thaddy knows everything better.

There  are enough public servers which don't drop pings - 1.1.1.1 is one of them.
Another bullet proof server is  104.18.55.162 (https://sportzonline.to).

Winni

Yeah, switching from 1.1.1.1 to my own server had precisely one effect... The ping times went from 15ms to 90+ms :(

Changing back to a nice fast one...


Thaddy

  • Hero Member
  • *****
  • Posts: 10469
Re: Synapse Ping bad responses
« Reply #14 on: January 15, 2020, 06:37:00 pm »
Synapse time out link: http://synapse.ararat.cz/doc/help/ and click class Tblocksocket, scroll down.
(Note I have a public server dedicated to check internet connection and client IP: http://ip.thaddy.com That server has been up since 2004 apart from planned maintenance. It returns a static string)
« Last Edit: January 15, 2020, 06:45:16 pm by Thaddy »
When you ask a question that is actually answered in the documentation, you are either lazy or a moron.

 

TinyPortal © 2005-2018