0

When on windows 10 in cmd.exe a ping is made to cryptopia.co.nz, I get one of the following results:

Pinging cryptopia.co.nz [45.60.13.241] with 32 bytes of data:
Reply from 45.60.13.241: bytes=32 time=7ms TTL=54
Reply from 45.60.13.241: bytes=32 time=12ms TTL=54
Reply from 45.60.13.241: bytes=32 time=12ms TTL=54
Reply from 45.60.13.241: bytes=32 time=10ms TTL=54

Ping statistics for 45.60.13.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 7ms, Maximum = 12ms, Average = 10ms

or

Pinging cryptopia.co.nz [45.60.11.241] with 32 bytes of data:
Reply from 45.60.11.241: bytes=32 time=111ms TTL=55
Reply from 45.60.11.241: bytes=32 time=110ms TTL=55
Reply from 45.60.11.241: bytes=32 time=114ms TTL=55
Reply from 45.60.11.241: bytes=32 time=111ms TTL=55

Ping statistics for 45.60.11.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 110ms, Maximum = 114ms, Average = 111ms

These two pings were carried out with 1 second inbetween. I thought my computers DNS cache would keep the adress resolved the first time, why isn´t it? Is there a way I can force the system to use the IP with 13 in it for all operations? It´s got a much better ping time.

4
  • Sounds like a case of a load balancer. What do you find unusual? Google does the same thing
    – Ramhound
    Apr 11, 2018 at 11:15
  • 1
    “Is there a way I can force the system to use the IP with 13 in it for all operations?” - You can’t
    – Ramhound
    Apr 11, 2018 at 11:16
  • But if this domain is in my DNS cache, why is it not picking the IP it was first resolved to the next time?
    – Corey Hart
    Apr 11, 2018 at 13:45
  • The two A records you received are probably both cached for exactly the same amount of time, and your local resolver arbitrarily picks one. There are other scenarios but in this case, the server returned two A records at the same time, at least for me.
    – tripleee
    Apr 11, 2018 at 14:02

1 Answer 1

1

Take note of the IP address on your first query, then ping the IP address explicitly.

A:\> nslookup cryptiopia.co.nz
Server:     10.9.8.7
Address:    10.9.8.7#53

Non-authoritative answer:
Name:   cryptopia.co.nz
Address: 45.60.11.241
Name:   cryptopia.co.nz
Address: 45.60.13.241

A:\> ping 45.60.11.241
Pinging 45.60.11.241 [45.60.11.241] with 32 bytes of data:
Reply from 45.60.11.241: bytes=32 time=111ms TTL=55
Reply from 45.60.11.241: bytes=32 time=110ms TTL=55
Reply from 45.60.11.241: bytes=32 time=114ms TTL=55
Reply from 45.60.11.241: bytes=32 time=111ms TTL=55

Ping statistics for 45.60.11.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 110ms, Maximum = 114ms, Average = 111ms

Of course, without prior knowledge, you don't know which of the IP addresses will be faster, or whether choosing a different one will in fact make any difference at all, or whether asking again would produce yet another set of IP addresses.

6
  • Thank you, so what does that tell me? That they´re both used by cryptopia, but can I choose which one my requests should go to? I´m a noob on this exact field...
    – Corey Hart
    Apr 11, 2018 at 13:40
  • Like I said, you can pick one IP address and then it's out of your resolver's hands. They gave you two addresses, for reasons of load balancing or redundancy, and your resolver is behaving responsibly by doing the balancing part.
    – tripleee
    Apr 11, 2018 at 14:04
  • Ah got you now, I think. So you mean I should manually replace the hostname with the IP address of my choice? Unfortunately that doesn´t work. For instance, in the browser, 45.60.13.241/api/GetMarketHistory/ETH_BTC, gives me a proxy error from the host. This would work with the hostname replacing the IP.
    – Corey Hart
    Apr 11, 2018 at 14:55
  • Indeed, HTTP 1.1 requires the host name to be transmitted in many cases. This is quite different from your question about ping. A browser plug-in may give you more control over this, but again, that should really be a new question if you need more help.
    – tripleee
    Apr 11, 2018 at 15:00
  • In fact it´s a httpjob library within b4j (programming language) where the request needs to be sent from. I was thinking that the scenario is the same whether if using ping or through a http request, that I would need to set the IP address somewhere in the local DNS cache. Sorry if I´m wrong about that.
    – Corey Hart
    Apr 11, 2018 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .