<s>
Anycast	B-Protocol
is	O
a	O
network	O
addressing	O
and	O
routing	B-Protocol
methodology	O
in	O
which	O
a	O
single	O
destination	O
IP	B-Protocol
address	I-Protocol
is	O
shared	O
by	O
devices	O
(	O
generally	O
servers	O
)	O
in	O
multiple	O
locations	O
.	O
</s>
<s>
Routers	B-Protocol
direct	O
packets	O
addressed	O
to	O
this	O
destination	O
to	O
the	O
location	O
nearest	O
the	O
sender	O
,	O
using	O
their	O
normal	O
decision-making	O
algorithms	O
,	O
typically	O
the	O
lowest	O
number	O
of	O
BGP	B-Protocol
network	B-Protocol
hops	I-Protocol
.	O
</s>
<s>
Anycast	B-Protocol
routing	B-Protocol
is	O
widely	O
used	O
by	O
content	B-Operating_System
delivery	I-Operating_System
networks	I-Operating_System
such	O
as	B-Architecture
web	O
and	O
DNS	B-Protocol
hosts	O
,	O
to	O
bring	O
their	O
content	O
closer	O
to	O
end	O
users	O
.	O
</s>
<s>
There	O
are	O
four	O
principal	O
addressing	O
methods	O
in	O
the	O
Internet	B-Protocol
Protocol	I-Protocol
:	O
</s>
<s>
The	O
first	O
documented	O
use	O
of	O
anycast	B-Protocol
routing	B-Protocol
for	O
topological	O
load-balancing	O
of	O
Internet-connected	O
services	O
was	O
in	O
1989	O
,	O
the	O
technique	O
was	O
first	O
formally	O
documented	O
in	O
the	O
IETF	O
four	O
years	O
later	O
.	O
</s>
<s>
It	O
was	O
first	O
applied	O
to	O
critical	O
infrastructure	O
in	O
2001	O
with	O
the	O
anycasting	O
of	O
the	O
I-root	B-Application
nameserver	O
.	O
</s>
<s>
Early	O
objections	O
to	O
the	O
deployment	O
of	O
anycast	B-Protocol
routing	B-Protocol
centered	O
on	O
the	O
perceived	O
conflict	O
between	O
long-lived	O
TCP	B-Protocol
connections	O
and	O
the	O
volatility	O
of	O
the	O
Internet	O
's	O
routed	B-Protocol
topology	O
.	O
</s>
<s>
In	O
concept	O
,	O
a	O
long-lived	O
connection	O
,	O
such	O
as	B-Architecture
an	O
FTP	O
file	O
transfer	O
(	O
which	O
can	O
take	O
hours	O
to	O
complete	O
for	O
large	O
files	O
)	O
might	O
be	O
re-routed	O
to	O
a	O
different	O
anycast	B-Protocol
instance	O
in	O
mid-connection	O
due	O
to	O
changes	O
in	O
network	O
topology	O
or	O
routing	B-Protocol
,	O
with	O
the	O
result	O
that	O
the	O
server	O
changes	O
mid-connection	O
,	O
and	O
the	O
new	O
server	O
is	O
not	O
aware	O
of	O
the	O
connection	O
and	O
does	O
not	O
possess	O
the	O
TCP	B-Protocol
connection	O
state	O
of	O
the	O
previous	O
anycast	B-Protocol
instance	O
.	O
</s>
<s>
Many	O
initial	O
anycast	B-Protocol
deployments	O
consisted	O
of	O
DNS	B-Protocol
servers	O
,	O
using	O
principally	O
UDP	O
transport	O
.	O
</s>
<s>
Measurements	O
of	O
long-term	O
anycast	B-Protocol
flows	O
revealed	O
very	O
few	O
failures	O
due	O
to	O
mid-connection	O
instance	O
switches	O
,	O
far	O
fewer	O
(	O
less	O
than	O
0.017	O
%	O
or	O
"	O
less	O
than	O
one	O
flow	O
per	O
ten	O
thousand	O
per	O
hour	O
of	O
duration	O
"	O
according	O
to	O
various	O
sources	O
)	O
than	O
were	O
attributed	O
to	O
other	O
causes	O
of	O
failure	O
.	O
</s>
<s>
Numerous	O
mechanisms	O
were	O
developed	O
to	O
efficiently	O
share	O
state	O
between	O
anycast	B-Protocol
instances	O
.	O
</s>
<s>
And	O
some	O
TCP-based	O
protocols	O
,	O
notably	O
HTTP	B-Protocol
,	O
incorporated	O
"	O
redirect	O
"	O
mechanisms	O
,	O
whereby	O
anycast	B-Protocol
service	O
addresses	O
could	O
be	O
used	O
to	O
locate	O
the	O
nearest	O
instance	O
of	O
a	O
service	O
,	O
whereupon	O
a	O
user	O
would	O
be	O
redirected	O
to	O
that	O
specific	O
instance	O
prior	O
to	O
the	O
initiation	O
of	O
any	O
long-lived	O
stateful	O
transaction	O
.	O
</s>
<s>
Anycast	B-Protocol
can	O
be	O
implemented	O
via	O
Border	B-Protocol
Gateway	I-Protocol
Protocol	I-Protocol
(	O
BGP	B-Protocol
)	O
.	O
</s>
<s>
Multiple	O
hosts	O
(	O
usually	O
in	O
different	O
geographic	O
areas	O
)	O
are	O
given	O
the	O
same	O
unicast	O
IP	B-Protocol
address	I-Protocol
and	O
different	O
routes	O
to	O
the	O
address	O
are	O
announced	O
through	O
BGP	B-Protocol
.	O
</s>
<s>
Routers	B-Protocol
consider	O
these	O
to	O
be	O
alternative	O
routes	O
to	O
the	O
same	O
destination	O
,	O
even	O
though	O
they	O
are	O
actually	O
routes	O
to	O
different	O
destinations	O
with	O
the	O
same	O
address	O
.	O
</s>
<s>
As	B-Architecture
usual	O
,	O
routers	B-Protocol
select	O
a	O
route	O
by	O
whatever	O
distance	O
metric	O
is	O
in	O
use	O
(	O
the	O
least	O
cost	O
,	O
least	O
congested	O
,	O
shortest	O
)	O
.	O
</s>
<s>
Anycast	B-Protocol
is	O
supported	O
explicitly	O
in	O
the	O
IPv6	O
addressing	O
architecture	O
.	O
</s>
<s>
The	O
lowest	O
address	O
within	O
an	O
IPv6	O
subnet	B-Protocol
(	O
interface	O
identifier	O
0	O
)	O
is	O
reserved	O
as	B-Architecture
the	O
"	O
Subnet	B-Protocol
Router	B-Protocol
"	O
anycast	B-Protocol
address	O
.	O
</s>
<s>
In	O
addition	O
,	O
the	O
highest	O
128	O
interface	O
identifiers	O
within	O
a	O
subnet	B-Protocol
are	O
also	O
reserved	O
as	B-Architecture
anycast	B-Protocol
addresses	O
.	O
</s>
<s>
Most	O
IPv6	O
routers	B-Protocol
on	O
the	O
path	O
of	O
an	O
anycast	B-Protocol
packet	O
through	O
the	O
network	O
will	O
not	O
distinguish	O
it	O
from	O
a	O
unicast	O
packet	O
,	O
but	O
special	O
handling	O
is	O
required	O
from	O
the	O
routers	B-Protocol
near	O
the	O
destination	O
(	O
that	O
is	O
,	O
within	O
the	O
scope	O
of	O
the	O
anycast	B-Protocol
address	O
)	O
as	B-Architecture
they	O
are	O
required	O
to	O
route	O
an	O
anycast	B-Protocol
packet	O
to	O
the	O
"	O
nearest	O
"	O
interface	O
within	O
that	O
scope	O
which	O
has	O
the	O
proper	O
anycast	B-Protocol
address	O
,	O
according	O
to	O
whatever	O
measure	O
of	O
distance	O
(	O
hops	B-Protocol
,	O
cost	O
,	O
etc	O
.	O
)	O
</s>
<s>
The	O
method	O
used	O
in	O
IPv4	O
of	O
advertising	O
multiple	O
routes	O
in	O
BGP	B-Protocol
to	O
multiply-assigned	O
unicast	O
addresses	O
also	O
still	O
works	O
in	O
IPv6	O
,	O
and	O
can	O
be	O
used	O
to	O
route	O
packets	O
to	O
the	O
nearest	O
of	O
several	O
geographically	O
dispersed	O
hosts	O
with	O
the	O
same	O
address	O
.	O
</s>
<s>
This	O
approach	O
,	O
which	O
does	O
not	O
depend	O
on	O
anycast-aware	O
routers	B-Protocol
,	O
has	O
the	O
same	O
use	O
cases	O
together	O
with	O
the	O
same	O
problems	O
and	O
limitations	O
as	B-Architecture
in	O
IPv4	O
.	O
</s>
<s>
As	B-Architecture
a	O
result	O
,	O
operation	O
of	O
anycast	B-Protocol
services	O
has	O
grown	O
in	O
popularity	O
among	O
network	O
operators	O
.	O
</s>
<s>
All	O
Internet	O
root	B-Application
nameservers	I-Application
are	O
implemented	O
as	B-Architecture
clusters	O
of	O
hosts	O
using	O
anycast	B-Protocol
addressing	O
.	O
</s>
<s>
All	O
13	O
root	B-Application
servers	I-Application
A	O
–	O
M	O
exist	O
in	O
multiple	O
locations	O
,	O
with	O
11	O
on	O
multiple	O
continents	O
.	O
</s>
<s>
(	O
Root	B-Application
servers	I-Application
B	O
and	O
H	O
exist	O
in	O
two	O
U.S.	O
</s>
<s>
The	O
servers	O
use	O
anycast	B-Protocol
address	O
announcements	O
to	O
provide	O
a	O
decentralized	O
service	O
.	O
</s>
<s>
This	O
has	O
accelerated	O
the	O
deployment	O
of	O
physical	O
(	O
rather	O
than	O
logical	O
)	O
root	B-Application
servers	I-Application
outside	O
the	O
United	O
States	O
.	O
</s>
<s>
Many	O
commercial	O
DNS	B-Protocol
providers	O
have	O
switched	O
to	O
an	O
IP	O
anycast	B-Protocol
environment	O
to	O
increase	O
query	O
performance	O
and	O
redundancy	O
,	O
and	O
to	O
implement	O
load	O
balancing	O
.	O
</s>
<s>
In	O
IPv4	B-Protocol
to	I-Protocol
IPv6	I-Protocol
transitioning	I-Protocol
,	O
anycast	B-Protocol
addressing	O
may	O
be	O
deployed	O
to	O
provide	O
IPv6	O
compatibility	O
to	O
IPv4	O
hosts	O
.	O
</s>
<s>
This	O
method	O
,	O
6to4	B-Protocol
,	O
uses	O
a	O
default	O
gateway	O
with	O
the	O
IP	B-Protocol
address	I-Protocol
.	O
</s>
<s>
This	O
allows	O
multiple	O
providers	O
to	O
implement	O
6to4	B-Protocol
gateways	O
without	O
hosts	O
having	O
to	O
know	O
each	O
individual	O
provider	O
's	O
gateway	O
addresses	O
.	O
</s>
<s>
6to4	B-Protocol
has	O
been	O
deprecated	O
in	O
response	O
to	O
native	O
IPv6	O
becoming	O
more	O
prevalent	O
.	O
</s>
<s>
Content	B-Operating_System
delivery	I-Operating_System
networks	I-Operating_System
may	O
use	O
anycast	B-Protocol
for	O
actual	O
HTTP	B-Protocol
connections	O
to	O
their	O
distribution	O
centers	O
,	O
or	O
for	O
DNS	B-Protocol
.	O
</s>
<s>
Because	O
most	O
HTTP	B-Protocol
connections	O
to	O
such	O
networks	O
request	O
static	O
content	O
such	O
as	B-Architecture
images	O
and	O
style	O
sheets	O
,	O
they	O
are	O
generally	O
short-lived	O
and	O
stateless	O
across	O
subsequent	O
TCP	B-Protocol
sessions	O
.	O
</s>
<s>
The	O
general	O
stability	O
of	O
routes	O
and	O
statelessness	O
of	O
connections	O
makes	O
anycast	B-Protocol
suitable	O
for	O
this	O
application	O
,	O
even	O
though	O
it	O
uses	O
TCP	B-Protocol
.	O
</s>
<s>
Anycast	B-Protocol
rendezvous	O
point	O
can	O
be	O
used	O
in	O
Multicast	O
Source	O
Discovery	O
Protocol	O
(	O
MSDP	O
)	O
and	O
its	O
advantageous	O
application	O
as	B-Architecture
Anycast	B-Protocol
RP	O
is	O
an	O
intra-domain	O
feature	O
that	O
provides	O
redundancy	O
and	O
load-sharing	O
capabilities	O
.	O
</s>
<s>
If	O
the	O
multiple	O
anycast	B-Protocol
rendezvous	O
point	O
is	O
used	O
,	O
IP	O
routing	B-Protocol
automatically	O
will	O
select	O
the	O
topologically	O
closest	O
rendezvous	O
point	O
for	O
each	O
source	O
and	O
receiver	O
.	O
</s>
<s>
Anycast	B-Protocol
allows	O
any	O
operator	O
whose	O
routing	B-Protocol
information	I-Protocol
is	O
accepted	O
by	O
an	O
intermediate	O
router	B-Protocol
to	O
hijack	O
any	O
packets	O
intended	O
for	O
the	O
anycast	B-Protocol
address	O
.	O
</s>
<s>
While	O
this	O
at	O
first	O
sight	O
appears	O
insecure	O
,	O
it	O
is	O
no	O
different	O
from	O
the	O
routing	B-Protocol
of	O
ordinary	O
IP	B-Protocol
packets	I-Protocol
,	O
and	O
no	O
more	O
or	O
less	O
secure	O
.	O
</s>
<s>
As	B-Architecture
with	O
conventional	O
IP	O
routing	B-Protocol
,	O
careful	O
filtering	O
of	O
who	O
is	O
and	O
is	O
not	O
allowed	O
to	O
propagate	O
route	O
announcements	O
is	O
crucial	O
to	O
prevent	O
man-in-the-middle	O
or	O
blackhole	B-Protocol
attacks	I-Protocol
.	O
</s>
<s>
The	O
former	O
can	O
also	O
be	O
prevented	O
by	O
encrypting	O
and	O
authenticating	O
messages	O
,	O
such	O
as	B-Architecture
using	O
Transport	B-Protocol
Layer	I-Protocol
Security	I-Protocol
,	O
while	O
the	O
latter	O
can	O
be	O
frustrated	O
by	O
onion	B-Protocol
routing	I-Protocol
.	O
</s>
<s>
Anycast	B-Protocol
is	O
normally	O
highly	O
reliable	O
,	O
as	B-Architecture
it	O
can	O
provide	O
automatic	O
failover	B-General_Concept
without	O
adding	O
complexity	O
or	O
new	O
potential	O
points	O
of	O
failure	O
.	O
</s>
<s>
Anycast	B-Protocol
applications	O
typically	O
feature	O
external	O
"	O
heartbeat	O
"	O
monitoring	O
of	O
the	O
server	O
's	O
function	O
,	O
and	O
withdraw	O
the	O
route	O
announcement	O
if	O
the	O
server	O
fails	O
.	O
</s>
<s>
In	O
some	O
cases	O
this	O
is	O
done	O
by	O
the	O
actual	O
servers	O
announcing	O
the	O
anycast	B-Protocol
prefix	O
to	O
the	O
router	B-Protocol
over	O
OSPF	B-Protocol
or	O
another	O
IGP	B-Protocol
.	O
</s>
<s>
If	O
the	O
servers	O
die	O
,	O
the	O
router	B-Protocol
will	O
automatically	O
withdraw	O
the	O
announcement	O
.	O
</s>
<s>
"	O
Heartbeat	O
"	O
functionality	O
is	O
important	O
because	O
,	O
if	O
the	O
announcement	O
continues	O
for	O
a	O
failed	O
server	O
,	O
the	O
server	O
will	O
act	O
as	B-Architecture
a	O
"	O
black	O
hole	O
"	O
for	O
nearby	O
clients	O
;	O
this	O
is	O
the	O
most	O
serious	O
mode	O
of	O
failure	O
for	O
an	O
anycast	B-Protocol
system	O
.	O
</s>
<s>
However	O
,	O
even	O
the	O
automation	O
necessary	O
to	O
implement	O
"	O
heartbeat	O
"	O
routing	B-Protocol
withdrawal	O
can	O
itself	O
add	O
a	O
potential	O
point	O
of	O
failure	O
,	O
as	B-Architecture
seen	O
in	O
the	O
2021	O
Facebook	O
outage	O
.	O
</s>
<s>
In	O
denial-of-service	O
attacks	O
,	O
a	O
rogue	O
network	O
host	O
may	O
advertise	O
itself	O
as	B-Architecture
an	O
anycast	B-Protocol
server	O
for	O
a	O
vital	O
network	O
service	O
,	O
to	O
provide	O
false	O
information	O
or	O
simply	O
block	O
service	O
.	O
</s>
<s>
Anycast	B-Protocol
methodologies	O
on	O
the	O
Internet	O
may	O
be	O
exploited	O
to	O
distribute	O
DDoS	O
attacks	O
and	O
reduce	O
their	O
effectiveness	O
:	O
As	B-Architecture
traffic	O
is	O
routed	B-Protocol
to	O
the	O
closest	O
node	O
,	O
a	O
process	O
over	O
which	O
the	O
attacker	O
has	O
no	O
control	O
,	O
the	O
DDoS	O
traffic	O
flow	O
will	O
be	O
distributed	O
amongst	O
the	O
closest	O
nodes	O
.	O
</s>
<s>
This	O
may	O
be	O
a	O
reason	O
to	O
deploy	O
anycast	B-Protocol
addressing	O
.	O
</s>
<s>
The	O
effectiveness	O
of	O
this	O
technique	O
depends	O
upon	O
maintaining	O
the	O
secrecy	O
of	O
any	O
unicast	O
addresses	O
associated	O
with	O
anycast	B-Protocol
service	O
nodes	O
,	O
however	O
,	O
since	O
an	O
attacker	O
in	O
possession	O
of	O
the	O
unicast	O
addresses	O
of	O
individual	O
nodes	O
can	O
attack	O
them	O
from	O
any	O
location	O
,	O
bypassing	O
anycast	B-Protocol
addressing	O
methods	O
.	O
</s>
<s>
Some	O
anycast	B-Protocol
deployments	O
on	O
the	O
Internet	O
distinguish	O
between	O
local	O
and	O
global	O
nodes	O
to	O
benefit	O
the	O
local	O
community	O
,	O
by	O
addressing	O
local	O
nodes	O
preferentially	O
.	O
</s>
<s>
An	O
example	O
is	O
the	O
Domain	B-Protocol
Name	I-Protocol
System	I-Protocol
.	O
</s>
<s>
Local	O
nodes	O
are	O
often	O
announced	O
with	O
the	O
no-export	O
BGP	B-Protocol
community	O
to	O
prevent	O
hosts	O
from	O
announcing	O
them	O
to	O
their	O
peers	O
,	O
i.e.	O
</s>
<s>
Where	O
both	O
local	O
and	O
global	O
nodes	O
are	O
deployed	O
,	O
the	O
announcements	O
from	O
global	O
nodes	O
are	O
often	O
AS	B-Architecture
prepended	O
(	O
i.e.	O
</s>
<s>
the	O
AS	B-Architecture
is	O
added	O
a	O
few	O
more	O
times	O
)	O
to	O
make	O
the	O
path	O
longer	O
so	O
that	O
a	O
local	O
node	O
announcement	O
is	O
preferred	O
over	O
a	O
global	O
node	O
announcement	O
.	O
</s>
