8

I searched the Internet and unable to find an answer. Anyone can help?

John Wong
  • 91
  • 1
  • 1
  • 5
  • Where would you have to be determining whether it is one or another? – NickW Feb 20 '14 at 12:40
  • 1
    I ask where you need to determine it because context is everything in this case. From a residential ADSL line, there would be no way to really tell, from an ISP edge/core router, you could probably see it being advertised in multiple prefixes. – NickW Feb 20 '14 at 12:57
  • One of the IP address of cdnjs.cloudflare.com is 198.41.212.162 When I ping 98.41.212.162 from Hong Kong, I got ~8ms. But I found that the IP should be allocated in United States Chicago. If the machine of that IP is in US, the ping should be far more higher than 8ms. So I want a better way to know whether the IP is unicast or anycast instead of traceroute or ping. – John Wong Feb 20 '14 at 12:58
  • That would actually be a fairly accurate way of guessing, though actual confirmation would be still be difficult. – NickW Feb 20 '14 at 13:00
  • Maybe you could run traceroutes from multiple geographic locations, and make comparisons between them, though again, I don't think you could make a 100% confident declaration either way. – NickW Feb 20 '14 at 13:02
  • I agree with you. – John Wong Feb 20 '14 at 13:04
  • Nick, I agree with you, too; any chance you could write that up as an answer, so the questioner can accept it? – MadHatter Feb 20 '14 at 13:14

2 Answers2

9

Determining if an address is either unicast or anycast with full confidence is not easy if you do not have access to routing tables on machines running EBGP (for example an ISP's edge router). From an end user standpoint, the decision to use a specific route to the address, or even the possibility of understanding if there are multiple routes cannot be determined with normal networking tools.

However, with connections in multiple geographic locations, you could run traceroutes to the IP address(es) in question, and make comparisons between them to determine if they are passing through completely different destinations near the end of the lookups. This could just be down to multihoming, so it is not a method which can provide complete confidence.

NickW
  • 10,183
  • 1
  • 18
  • 26
7

Addresses between 0.0.0.0 and 223.255.255.255 are unicast. Addresses between 224.0.0.0 and 239.255.255.255 are multicast. Addresses from 240.0.0.0 and up are reserved.

Anycasting is done with Unicast addresses in the routing tables of multiple addresses. It appears to be much easier to implement than multicast. Without looking at these routing tables, there is no way to differentiate an anycast address from a unicast address. This is inherent in the design. Anycasting relies strictly on the the routing tables and does not require special address ranges as multicasting does. RFC 4768 which covert the Operation of Anycast Services may help you understand how it works.

As the comment thread on the questions notes pings and traceroutes, can be indicative that and address is being anycasted locally. Now the IPv4 address range has been fully allocated anycasting is likley to become more popular for organizations providing content to geographically spread clients. At that scale it requires cooperation with ISPs and network providers.

Checking the address on netblock assignment hints at the location of the IP, but really just tells you where to contact the organization to which the address has been assigned. The IANA IPv4 Address Space Registry or other GeoIP address databases indicate the continent or country to which the IP address is expected to be routed. If it appears to be routed within a different continent, then it is likely anycasted there.

IANA maintain the Multicast Address Space Registry along with several other important Internet number registries. RFC 6890 contains the specification for the Special-Purpose IP Adresses.

BillThor
  • 27,354
  • 3
  • 35
  • 69