It is my understanding that public IP blocks are assigned from IANA, which assigns sub-blocks to RIRs, which assigns sub-blocks to ISPs, which assigns sub-blocks to individual ASs as outlined in this question: How are IP addresses actually assigned?
This (and resources like this page) seems to imply a mapping of 1 public IP to 1 AS.
However, anycast seems to work by advertising the same public ip address from multiple locations, providing different paths to that IP. For example:
- https://stackoverflow.com/questions/210901/how-do-you-scale-http-server-like-google
- https://umbrella.cisco.com/blog/blog/2013/01/10/high-availability-with-anycast-routing/
- https://blog.cloudflare.com/cloudflares-architecture-eliminating-single-p/
If public ips are supposed to resolve to a single AS, how does anycast work?
- Is it a hack whereby you pretend to be doing BGP multi-homing / multi-pathing and just grab the traffic as it passes through an AS (as seems to be implied here: https://serverfault.com/a/728609/148476)?
- Is is just an exception to the "rule" of 1 IP per AS?
- Or maybe I'm just missing something...