Internet Engineering Task Force                 Jun-ichiro itojun Hagino
INTERNET-DRAFT                                   IIJ Research Laboratory
Expires: January 12, 2002                                     K. Ettikan
                                                     Intel ASG, Malaysia
                                                           July 12, 2001

                      An analysis of IPv6 anycast

Status of this Memo

This document is an Internet-Draft and is in full conformance with all
provisions of Section 10 of RFC2026.

Internet-Drafts are working documents of the Internet Engineering Task
Force (IETF), its areas, and its working groups.  Note that other groups
may also distribute working documents as Internet-Drafts.

Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time.  It is inappropriate to use Internet-Drafts as reference material
or to cite them other than as ``work in progress.''

To view the list Internet-Draft Shadow Directories, see

Distribution of this memo is unlimited.

The internet-draft will expire in 6 months.  The date of expiration will
be January 12, 2002.


The memo tries to identify the problems and issues in the use of IPv6
anycast [Hinden, 1998] defined as of today.  The goals of the draft are
(1) to understand the currently-defined IPv6 anycast better, (2) to
provide guidelines for people trying to deploy anycast services, and (3)
to suggest updates to IPv6 anycast protocol specification.

The document was made possible by input from ipngwg DNS discovery design

1.  IPv6 anycast

"Anycast" is a communication model for IP, just like unicast and
multicast are.

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 1]

DRAFT                   Analysis of IPv6 anycast               July 2001

Anycast can be understood best by comparing with unicast and multicast.
IP unicast allows a source node to transmit IP datagrams to a single
destination node.  The destination node is identified by an unicast
address.  IP multicast allows a source node to transmit IP datagrams to
a group of destination nodes.  The destination nodes are identfied by a
multicast group, and we use a multicast address to identify the
multicast group.

IP anycast allows a source node to transmit IP datagrams to a single
destination node, out of a group of destination nodes.  IP datagram will
reach the closest destination node in the set of destination nodes,
based on routing measure of distance.  The source node does not need to
care about how to pick the closest destination node, as the routing
system will figure it out (in other words, the source node has no
control over the selection).  The set of destionation nodes is
identified by an anycast address.

There are two kind of "anycast" proposed and operated for IPv4 - One is
RFC1546 [Partridge, 1993] anycast.  Another is what we call "BGP
anycast" in this document; this is for replicating unicast servers by
BGP trick.  We concentrate into the former in this document.

Anycast was adopted by IPv6 specification suite.  RFC2373 [Hinden, 1998]
defines the IPv6 anycast address, and its constraints in the usage.
RFC2373 IPv6 anycast is very similar to RFC1546 IPv4 anycast.  The
following sections try to analyze RFC2373 rules, and understand
limitations with them.  At the end of the draft we compile a couple of
suggestions to exisitng proposals, for extending the usage of the IPv6

1.1.  BGP anycast

Today, there are so-called "anycast" operated mostly for critical
servers including DNS servers and web servers (like those for Olympic
games) [Hardie, 2001; Ohta, 2000] .  We call the technique "BGP anycast"
for clarity.  The BGP anycast works as follows:

o A provider-independent IPv4 address prefix is allocated from an RIR.

o The address prefix is configured at multiple distant locations on the

o BGP routes are advertised from all of the locations.

o Clients will reach the nearest location based on the BGP routes.

BGP anycast must not be confused with the one we discuss in the document
(RFC2373 anycast), as the problem domain is different.

BGP anycast tries to replicate unicast servers in distant domains.  The
distribution of servers is worldwide.  BGP anycast is being used for
specific upper-layer protocols only, like DNS and HTTP.  There is no

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 2]

DRAFT                   Analysis of IPv6 anycast               July 2001

consideration given for the cases when a client contacts multiple
servers by chance (transport layer protocol will get confused), since it
is unlikely to see BGP route changes during the short lifetime of the
transport layer protocols being used.

RFC2373 anycast is defined in more generic manner, and does not limit
the routing infrastructure nor upper-layer protocol, Therefore, RFC2373
imposes certain limitation to the packet header contents (like IPv6
source address), to prevent confusions due to routing changes during the
lifetime of a transport-layer connection.

The document tries to analyze RFC2373 anycast to understand if we can
use it for site-scoped server replication, upper-layer protocols other
than DNS or HTTP, and such.  Still, it is possible to apply BGP anycast
to IPv6.  Issues with BGP anycast on IPv6 is outside of the scope of the

2.  Limitations/properties in the current proposals

2.1.  Identifying anycast destination

For anycast addresses, RFC2373 uses the same address format as unicast
addresses.  Therefore, without other specific configurations, a sender
cannot usually identify if the node is sending a packet to anycast
destination, or unicast destination.  This is different from RFC1546
IPv4 anycast, where anycast address is distinguishable from unicast

2.2.  Nondeterministic packet delivery

If multiple packets carry an anycast address in IPv6 destionation
address header, these packets may not reach the same destination node,
depending on stability of the routing table.  The property leads to a
couple of interesting symptoms.

If we can assume that the routing table is stable enough during a
protocol exchange, multiple packets (with anycast address in
destination) will reach the same destination node just fine.  However,
there is no guarantee.

If routing table is not stable enough, or you would like to take a more
strict approach, a client can only send one packet with anycast address
in the destination address field.  For example, consider the following
packet exchange.  The following exchange can lead us to failure, as we
are not sure if the 1st and 2nd anycast packet have reached the same

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 3]

DRAFT                   Analysis of IPv6 anycast               July 2001

     query: client unicast (Cu) -> server anycast (Sa)
     reply: server unicast (Su) -> client unicast (Cu)
     query: client unicast (Cu) -> server anycast (Sa)
              It may reach a different server!
     reply: server unicast (Su) -> client unicast (Cu)

Because of the non-determinism, if we take a strict approach, we can use
no more than 1 packet with anycast destination address, in a set of
protocol exchange.  If we use more than 2 packets, 1st and 2nd packet
may reach different server and may cause unexpected results.  If the
protocol is completely stateless, and we can consider the first
roundtrip and second roundtrip separate, it is okay.  For stateful
protocols, it is suggested to use anycast for the first packet in the
exchange, to discover unicast address of the (nearest) server.  After we
have discovered the unicast address of the server, we should use the
server's unicast address for the protocol exchange.

Also because of non-determinism, if we are to assign an IPv6 anycast
address to servers, those servers must provide uniform services.  For
example, if server A and server B provide different quality of service,
and people wants to differentiate between A and B, we cannot use single
IPv6 anycast address to identify both A and B.

Note that, the property is not a bad thing; the property lets us use
anycast addresses for load balancing.  Also, packets will automatically
be delivered to the nearest node with anycast address assigned.

Here are situations where multiple packets with anycast destination
address can lead us to problems:

o Fragmented IPv6 packets.  Fragments may reach multiple different
  destinations, and will prevent reassembly.

Because the sending node cannot differentiate between anycast addresses
and unicast addresses, it is hard for the sending node to control the
use of fragmentation.

2.3.  Anycast address assignment to hosts

RFC2373 suggests to assign anycast addresses to a node, only when the
node is a router.  This is because there was no standard way for hosts
to announce their intention to accept packets toward anycast addresses.
If no hosts have anycast address on them, it is easier for us to route
an IP datagram to anycast destination.  We just need to follow existing
routing entries, and we will eventually hit a router that has the
anycast address.  If we follow RFC2373 restriction strictly, we could
only assign anycast addresses onto routers.

2.4.  Anycast address in source address

Under RFC2373, IPv6 anycast address can not be put into IPv6 source
address.  This is basically because an IPv6 anycast address does not

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 4]

DRAFT                   Analysis of IPv6 anycast               July 2001

identify a single source node.

2.5.  IPsec

IPsec and IKE identify nodes by using source/destination address pairs.
Due to the combination of issues presented above, it is very hard to use
IPsec on packets with anycast address in source address, destination
address, or both.

Even with manual keying, IPsec trust model with anycast address is
confusing.  As IPsec uses IPv6 destination address to identify which
IPsec key to be used, we need to use the same IPsec key for all of the
anycast destinations that share an anycast address.

Dynamic IPsec key exchange (like IKE) is almost impossible.  First of
all, to run IKE session between two nodes, the two nodes need to be able
to communicate with each other.  With nondeterministic packet delivery
provided by anycast, it is not quite easy.  Even if we could circumvent
the issue with IKE, we have exactly the same problem as manual keying
case for actual communication.

3.  Possible improvements and protocol changes

3.1.  Assigning anycast address to hosts (non-router nodes)

Under RFC2373 rule, we can only assign anycast addresses to routers, not
to hosts.  The restriction was put into the RFC because it was felt
insecure to permit hosts to inject host routes to anycast address.

If we try to ease the restriction and assign anycast addresses to IPv6
hosts (non-routers), we would need to inject host routes for the anycast
addresses, with prefix length set to /128, into the IPv6 routing system.
We will inject host routes from each of the nodes with anycast
addresses, to make packets routed to a topologically-closest node.  Or,
we may be able to inject host routes from routers adjacent to the
servers (not from the servers themselvers).

Here are possible ways to allow anycast addresses to be assigned to
hosts.  We would need to diagnose each of the following proposals
carefully, as they have different pros and cons.  The most serious issue
would be the security issue with service blackhole attack (malicious
party can blackhole packets toward anycast addresses, by making false

o Let the host with anycast address to participate into routing
  information exchange.  The host does not need to fully participate; it
  only needs to announce the anycast address to the routing system.  To
  secure routing exchange, administrators need to configure secret
  information that protects the routing exchange to the host, as well as
  other routers.

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 5]

DRAFT                   Analysis of IPv6 anycast               July 2001

o Develop a protocol for a router, to discover hosts with anycast
  address on the same link.  The router will then advertise the anycast
  address to the routing system.  This could be done by an extension to
  IPv6 Neighbor Discovery or an extension to IPv6 Multicast Listener
  Discovery [Haberman, 2001] .

The impact of host routes depends on the scope of the anycast address
usage.  For example, if we use site-local anycast address to identify a
set of servers, the propagation of host route is limited inside the
site.  If the site administration policy permits it, and the site
routers can handle the additional routing entries, the additional host
routes are okay.  So, we can safely assign anycast address to non-router
nodes (hosts), and inject host route for the anycast address, into the
site IPv6 routing system.  It is still questionable to inject host
routes into worldwide IPv6 routing system, as it has problems in terms
of scalability.  Also, because of IPv6 route aggregation rules [Rockell,
2000] it is normally impossible to propagate IPv6 host routes worldwide.

3.2.  Anycast address in destination address

By using anycast in IPv6 layer, upper-layer protocols may be able to
enjoy redundancy and higher availability of servers.  However, for
stateful upper-layer protocols, a client may need to specify a single
node out of nodes that share an anycast address.  Suppose a client C
would like to communicate a specific server with anycast address, Si.
Si shares the same anyast address with other servers, S1 to Sn.  It is
hard for C to selectively communicate with Si.

One possible workaround is to use IPv6 routing header.  By specifying an
unicast address of Si as an intermediate hop, C can deliver the packet
to Si, not to other Sn.

Note that, however, by specifying Si explicitly, C now have lost the
server redundancy provided by the use of anycast address in IPv6 layer.
If Si goes down, the communication between C and Si will be lost.  C
cannot enjoy the failure resistance provided by redundant servers, S1 to
Sn.  Protocol designers should carefully diagnose if any state is
managed by C and/or Si, and decide how the protocol should take
advantage of anycast addresses and their characteristics.

3.3.  Anycast address in source address

Under RFC2373 rule, anycast address cannot be put into source address.
Here is a possible workaround, however, it could not win a consensus in
the past ipngwg meetings:

o When we try to use anycast address in the source address, use a (non-
  anycast) unicast address as the IPv6 source address, and attach home
  address option with anycast address.  In ipngwg discussions, however,
  there seem to be a consensus that the home address option should have
  the same semantics as the source address in the IPv6 header, so we
  cannot put anycast address into the home address option.

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 6]

DRAFT                   Analysis of IPv6 anycast               July 2001

3.4.  IPsec with static key configuration


3.5.  IPsec with dynamic key exchange


4.  Upper layer protocol issues

4.1.  Use of UDP with anycast

Many of the UDP-based protocols use source and destination address pair
to identify the traffic.  One example would be DNS over UDP; most of the
DNS client implementation checks if the source address of the reply is
the same as the destination address of the query, in the fear of the
fabricated reply from a bad guy.

     query: client unicast (Cu) -> server unicast (Su*)
     reply: server unicast (Su*) -> client unicast (Cu)

     addresses marked with (*) must be equal.

If we use server's anycast address as the destination of the query, we
cannot meet the requirement due to RFC2373 restriction (anycast address
cannot be used as the source address of packets).  Effectively, client
will consider the reply is fabricated (hijack attempt), and drops the

     query: client unicast (Cu) -> server anycast (Sa)
     reply: server unicast (Su) -> client unicast (Cu)

Note that, however, bad guys can still inject fabricated results to the
client, even if the client checks the source address of the reply.  The
check does not improve security of the exchange at all.

If we check the existing protocol descriptions, in many cases, it is not
possible to perform sanity checks against IP source address for UDP
exchanges.  Either they are not specified on the protocol documents, or
it is an implementation mistake to check the IP source address.  For
example, from RFC2181 [Elz, 1997] section 4.1, we cannot check IP source
address matches for UDP DNS packets (client shouldn't be checking this).
There is no wording available on the selection of source address, in
TFTP protocol specification [Sollins, 1992] .

So, regarding to this issue, we conclude as follows:

o To use anycast address on the UDP protocol exchange, client side
  should not check the source address of the incoming packet.  Packet
  pairs must be identified by using UDP port numbers or upper-layer
  protocol mechanisms (like cookies).  The source address check itself

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 7]

DRAFT                   Analysis of IPv6 anycast               July 2001

  has no real protection.

o If you need to secure UDP protocol exchange, it is suggested to verify
  the authenticity of the reply, by using upper-layer security
  mechanisms like DNSSEC (note that we cannot use IPsec with anycast).

o For many of the existing protocols, we cannot perform sanity checks
  using IP source address address.  More specifically, for UDP DNS
  replies against queries to anycast address, it is not recommended to
  check source address, based on RFC2181 section 4.1.  TFTP

4.2.  Use of TCP with anycast

We cannot simply use anycast for TCP exchanges, as we identify a TCP
connection by using address/port pair for the source/destination node.
It is desired to implement some of the following, to enable the use of
IPv6 anycast in TCP.  Note, however, security requirement is rather
complicated for the following protocol modifications.

o Define a TCP option which lets us to switch peer's address from IPv6
  anycast address, to IPv6 unicast address.  There are couple of
  proposals in the past.

o Define an additional connection setup protocol that resolves IPv6
  unicast address from IPv6 anycast address.  We first resolve IPv6
  unicast address using the new protocol, and then, make a TCP
  connection using the IPv6 unicast address.  IPv6 node information
  query/reply [Crawford, 2000] could be used for this.

5.  Summary

The draft tried to diagnose the limitation in currntly-specified IPv6
anycast, and explored couple of ways to extend its use.  Some of the
proposed changes affects IPv6 anycast in general, some are useful in
certain use of IPv6 anycast.  To take advantage of anycast addresses,
protocol designers would need to diagnose their requirements to anycast
address, and introduce some of the tricks described in the draft.

Use of IPsec with anycast address still needs a great amount of

6.  Security consideration

The document should introduce no new security issues.

For secure anycast operation, we may need to enable security mechanisms
in other protocols.  For example, if we were to inject /128 routes from
end hosts by using a routing protocol, we may need to configure the
routing protocol to exchange routes securely, to prevent malicious

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 8]

DRAFT                   Analysis of IPv6 anycast               July 2001

parties from injecting bogus routes.


Hinden, 1998.
R. Hinden and S. Deering, "IP Version 6 Addressing Architecture" in
RFC2373 (July 1998).

Partridge, 1993.
C. Partridge, T. Mendez, and W. Milliken, "Host Anycasting Service" in
RFC1546 (November 1993).

Hardie, 2001.
T. Hardie, "Distributing Authoritative Name Servers via Shared Unicast
Addresses" in draft-ietf-dnsop-hardie-shared-root-server-03.txt (January
2001). work in progress material.

Ohta, 2000.
Masataka Ohta, "Root Name Servers with Inter Domain Anycast Addresses"
in draft-ietf-dnsop-ohta-shared-root-server-00.txt (July 2000). work in
progress material.

Haberman, 2001.
B. Haberman and D. Thaler, "Host-based Anycast using MLD" in draft-
haberman-ipngwg-host-anycast-00.txt (February 2001). work in progress

Rockell, 2000.
Rob Rockell and Bob Fink, "6Bone Backbone Routing Guidelines" in RFC2772
(February 2000).

Elz, 1997.
R. Elz and R. Bush, "Clarifications to the DNS Specification" in RFC2181
(July 1997).

Sollins, 1992.
K. Sollins, "The TFTP Protocol (Revision 2)" in RFC1350 (July 1992).

Crawford, 2000.
Matt Crawford, "IPv6 Node Information Queries" in draft-ietf-ipngwg-
icmp-name-lookups-07.txt (August 2000). work in progress material.

Change history

individual submission, 00 -> 01
     Improve security considerations section.  Remove an invalid use of
     home address option from UDP section.  Improve wording on IPsec.

HAGINO, ETTIKAN         Expires: January 12, 2002               [Page 9]

DRAFT                   Analysis of IPv6 anycast               July 2001

individual submission, 01 -> 02
     Split sections for current status analysis, and future protocol
     design suggestions.

02 -> 00
     Distinguish RFC2373 anycast and BGP anycast.  Ettikan's new

Authors' addresses

     Jun-ichiro itojun HAGINO
     Research Laboratory, Internet Initiative Japan Inc.
     Takebashi Yasuda Bldg.,
     3-13 Kanda Nishiki-cho,
     Chiyoda-ku,Tokyo 101-0054, JAPAN
     Tel: +81-3-5259-6350
     Fax: +81-3-5259-6351

     Ettikan Kandasamy Karupiah
     ASG Penang & Shannon Operations,
     Intel Microelectronis (M) Sdn. Bhd.,
     Bayan Lepas Free Trade Zone III,
     Penang, Malaysia.
     Tel: +60-4-859-2591
     Fax: +60-4-859-7899

HAGINO, ETTIKAN         Expires: January 12, 2002              [Page 10]