How to determine IP address is unicast or anycast? [closed]

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


Solution 1:

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.

Solution 2:

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.