as far as i understand, anycast network i.e a /24 block is announced by a BGP with the same ASN from multiple regions. anycast networks such as 1.1.1.1 and 1.0.0.1 are largely used for DNS services or CDN. But one thing i'm confused about is, let's say i own a 1.1.1.0/24 block but i want only 2 addresses to be available over multiple regions but others to be routed to a single region i.e unicast. but then again BGP must announce a /24 block, then how will i route unicast addresses to the region where my service is hosted ? how do you even deploy anycast network ? i saw graphene os talking about getting their own /24 and i got curious.
1 Answer
but i want only 2 addresses to be available over multiple regions but others to be routed to a single region i.e unicast
That's not possible. You cannot announce longer prefixes than /24 over public BGP. Accordingly, the whole /24 block (or larger) is either anycast or unicast.
how do you even deploy anycast network ?
Pretty much like unicast, just in several regions simultaneously, as you've described.
-
Okay so if i want just two addresses to be anycast , i cannot ? and the whole subnet must be anycast ? So if i want other unicast address , i must get another block from RIR and possibly another AS ?siri.m– siri.m2025-11-14 15:28:31 +00:00Commented Nov 14 at 15:28
-
You cannot announce a /30 or /29 via BGP, so what you want isn't possible. If you want unicast, use another block.2025-11-14 15:41:06 +00:00Commented Nov 14 at 15:41