home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc1546 < prev    next >
Text File  |  1993-11-12  |  22KB  |  508 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                       C. Partridge
  8. Request for Comments: 1546                                     T. Mendez
  9. Category: Informational                                      W. Milliken
  10.                                                                      BBN
  11.                                                            November 1993
  12.  
  13.  
  14.                         Host Anycasting Service
  15.  
  16.  
  17. Status of this Memo
  18.  
  19.    This memo provides information for the Internet community.  This memo
  20.    does not specify an Internet standard of any kind.  Distribution of
  21.    this memo is unlimited.
  22.  
  23. Abstract
  24.  
  25.    This RFC describes an internet anycasting service for IP.  The
  26.    primary purpose of this memo is to establish the semantics of an
  27.    anycasting service within an IP internet.  Insofar as is possible,
  28.    this memo tries to be agnostic about how the service is actually
  29.    provided by the internetwork.  This memo describes an experimental
  30.    service and does not propose a protocol.  This memo is produced by
  31.    the Internet Research Task Force (IRTF).
  32.  
  33. Motivation
  34.  
  35.    There are a number of situations in networking where a host,
  36.    application, or user wishes to locate a host which supports a
  37.    particular service but, if several servers support the service, does
  38.    not particularly care which server is used.  Anycasting is a
  39.    internetwork service which meets this need.  A host transmits a
  40.    datagram to an anycast address and the internetwork is responsible
  41.    for providing best effort delivery of the datagram to at least one,
  42.    and preferably only one, of the servers that accept datagrams for the
  43.    anycast address.
  44.  
  45.    The motivation for anycasting is that it considerably simplifies the
  46.    task of finding an appropriate server.  For example, users, instead
  47.    of consulting a list of archie servers and choosing the closest
  48.    server, could simply type:
  49.  
  50.                              telnet archie.net
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Partridge, Mendez & Milliken                                    [Page 1]
  59.  
  60. RFC 1546                Host Anycasting Service            November 1993
  61.  
  62.  
  63.    and be connected to the nearest archie server.  DNS resolvers would
  64.    no longer have to be configured with the IP addresses of their
  65.    servers, but rather could send a query to a well-known DNS anycast
  66.    address.  Mirrored FTP sites could similarly share a single anycast
  67.    address, and users could simply FTP to the anycast address to reach
  68.    the nearest server.
  69.  
  70. Architectural Issues
  71.  
  72.    Adding anycasting to the repertoire of IP services requires some
  73.    decisions to be made about how to balance the architectural
  74.    requirements of IP with those of anycasting.  This section discusses
  75.    these architectural issues.
  76.  
  77.    The first and most critical architectural issue is how to balance
  78.    IP's stateless service with the desire to have an anycast address
  79.    represent a single virtual host.  The best way to illustrate this
  80.    problem is with a couple of examples.  In both of these examples, two
  81.    hosts (X and Y) are serving an anycast address and another host (Z)
  82.    is using the anycast address to contact a service.
  83.  
  84.    In the first example, suppose that Z sends a UDP datagram addressed
  85.    to the anycast address.  Now, given that an anycast address is
  86.    logically considered the address of a single virtual host, should it
  87.    be possible for the datagram to be delivered to both X and Y?  The
  88.    answer to this question clearly has to be yes, delivery to both X and
  89.    Y is permissible.  IP is allowed to duplicate and misroute datagrams
  90.    so there clearly are scenarios in which a single datagram could be
  91.    delivered to both X and Y.  The implication of this conclusion is
  92.    that the definition of anycasting in an IP environment is that IP
  93.    anycasting provides best effort delivery of an anycast datagram to
  94.    one, but possibly more than one, of the hosts that serve the
  95.    destination anycast address.
  96.  
  97.    In the second example, suppose that Z sends two datagrams addressed
  98.    to the anycast address.  The first datagram gets delivered to X.  To
  99.    which host (X or Y) does the second datagram get delivered?  It would
  100.    be convenient for stateful protocols like TCP if all of a
  101.    connection's datagrams were delivered to the same anycast address.
  102.    However, because IP is stateless (and thus cannot keep track of where
  103.    earlier datagrams were delivered) and because one of the goals of
  104.    anycasting is to support replicated services, it seems clear that the
  105.    second datagram can be delivered to either X or Y.  Stateful
  106.    protocols will have to employ some additional mechanism to ensure
  107.    that later datagrams are sent to the same host.  Suggestions for how
  108.    to accomplish this for TCP are discussed below.
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Partridge, Mendez & Milliken                                    [Page 2]
  115.  
  116. RFC 1546                Host Anycasting Service            November 1993
  117.  
  118.  
  119.    After considering the two examples, it seems clear that the correct
  120.    definition of IP anycasting is a service which provides a stateless
  121.    best effort delivery of an anycast datagram to at least one host, and
  122.    preferably only one host, which serves the anycast address.  This
  123.    definition makes clear that anycast datagrams receive the same basic
  124.    type of service as IP datagrams.  And while the definition permits
  125.    delivery to multiple hosts, it makes clear that the goal is delivery
  126.    to just one host.
  127.  
  128. Anycast Addresses
  129.  
  130.    There appear to be a number of ways to support anycast addresses,
  131.    some of which use small pieces of the existing address space, others
  132.    of which require that a special class of IP addresses be assigned.
  133.  
  134.    The major advantage of using the existing address space is that it
  135.    may make routing easier.  As an example, consider a situation where a
  136.    portion of each IP network number can be used for anycasting.  I.e.,
  137.    a site, if it desires, could assign a set of its subnet addresses to
  138.    be anycast addresses.  If, as some experts expect, anycast routes are
  139.    treated just like host routes by the routing protocols, the anycast
  140.    addresses would not require special advertisement outside the site --
  141.    the host routes could be folded in with the net route.  (If the
  142.    anycast addresses is supported by hosts outside the network, then
  143.    those hosts would still have be advertised using host routes).  The
  144.    major disadvantages of this approach are (1) that there is no easy
  145.    way for stateful protocols like TCP to discover that an address is an
  146.    anycast address, and (2) it is more difficult to support internet-
  147.    wide well-known anycast address.  The reasons TCP needs to know that
  148.    an address is an anycast address is discussed in more detail below.
  149.    The concern about well-known anycast addresses requires a bit of
  150.    explanation.  The idea is that the Internet might establish that a
  151.    particular anycast address is the logical address of the DNS server.
  152.    Then host software could be configured at the manufacturer to always
  153.    send DNS queries to the DNS anycast address.  In other words,
  154.    anycasting could be used to support autoconfiguration of DNS
  155.    resolvers.
  156.  
  157.    The major advantages of using a separate class of addresses are that
  158.    it is easy to determine if an address is an anycast address and
  159.    well-known anycast addresses are easier to support.  The key
  160.    disadvantage is that routing may be more painful, because the routing
  161.    protocols may have to keep track of more anycast routes.
  162.  
  163.    An intermediate approach is to take part of the current address space
  164.    (say 256 Class C addresses) and make the network addresses into
  165.    anycast addresses (and ignore the host part of the class C address).
  166.    The advantage of this approach is that it makes anycast routes look
  167.  
  168.  
  169.  
  170. Partridge, Mendez & Milliken                                    [Page 3]
  171.  
  172. RFC 1546                Host Anycasting Service            November 1993
  173.  
  174.  
  175.    like network routes (which are easier for some routing protocols to
  176.    handle).  The disadvantages are that it uses the address space
  177.    inefficiently and so more severely limits the number of anycast
  178.    addresses that can be supported.
  179.  
  180.    In the balance it seems wiser to use a separate class of addresses.
  181.    Carving anycast addresses from the existing address space seems more
  182.    likely to cause problems in situations in which either applications
  183.    mistakenly fail to recognize anycast addresses (if anycasts are part
  184.    of each site's address space) or use the address space inefficiently
  185.    (if network addresses are used as anycast addresses).  And the
  186.    advantages of using anycast addresses for autoconfiguration seem
  187.    compelling.  So this memo assumes that anycast addresses will be a
  188.    separate class of IP addresses (not yet assigned).  Since each
  189.    anycast address is a virtual host address and the number of
  190.    anycasting hosts seems unlikely to be larger than the number of
  191.    services offered by protocols like TCP and UDP, the address space
  192.    could be quite small, perhaps supporting as little as 2**16 different
  193.    addresses.
  194.  
  195. Transmission and Reception of Anycast Datagrams
  196.  
  197.    Historically, IP services have been designed to work even if routers
  198.    are not present (e.g., on LANs without routers).  Furthermore, many
  199.    in the Internet community have historically felt that hosts should
  200.    not have to participate in routing protocols to operate.  (See, for
  201.    instance, page 7 of STD 3, RFC 1122). To provide an anycasting
  202.    service that is consistent with these traditions, the handling of
  203.    anycast addresses varies slightly depending on the type of network on
  204.    which datagrams with anycast addresses are sent.
  205.  
  206.    On a shared media network, such as an Ethernet and or Token Ring, it
  207.    must be possible to transmit an anycast datagram to a server also on
  208.    the same network without consulting a (possibly non-existent) router.
  209.    There are at least two ways this can be done.
  210.  
  211.    One approach is to ARP for the anycast address.  Servers which
  212.    support the anycast address can reply to the ARP request, and the
  213.    sending host can transmit to the first server that responds.  This
  214.    approach is reminiscent of the ARP hack (RFC 1027) and like the ARP
  215.    hack, requires ARP cache timeouts for the anycast addresses be kept
  216.    small (around 1 minute), so that if an anycast server goes down,
  217.    hosts will promptly flush the ARP entry and query for other servers
  218.    supporting the anycast address.
  219.  
  220.    Another approach is for hosts to transmit anycast datagrams on a
  221.    link-level multicast address.  Hosts which serve an anycast address
  222.    would be expected to listen to the link-level multicast address for
  223.  
  224.  
  225.  
  226. Partridge, Mendez & Milliken                                    [Page 4]
  227.  
  228. RFC 1546                Host Anycasting Service            November 1993
  229.  
  230.  
  231.    datagrams destined for their anycast address.  By multicasting on the
  232.    local network, there is no need for a router to route the anycast
  233.    datagrams.  One merit of this approach is that if there are multiple
  234.    servers and one goes down, the others will still receive any
  235.    requests.  Another possible advantage is that, because anycast ARP
  236.    entries must be quickly timed out, the multicasting approach may be
  237.    less traffic intensive than the ARP approach because in the ARP
  238.    approach, transmissions to an anycast address are likely to cause a
  239.    broadcast ARP, while in the multicast approach, transmissions are
  240.    only to a select multicast group.  An obvious disadvantage is that if
  241.    there are multiple servers on a network, they will all receive the
  242.    anycast message, when delivery to only one server was desired.
  243.  
  244.    On point-to-point links, anycast support is simpler.  A single copy
  245.    of the anycast datagram is forwarded along the appropriate link
  246.    towards the anycast destination.
  247.  
  248.    When a router receives an anycast datagram, the router must decide if
  249.    it should forward the datagram, and if so, transmits one copy of the
  250.    datagram to the next hop on the route.  Note that while we may hope
  251.    that a router will always know the correct next hop for an anycast
  252.    datagram and will not have to multicast anycast datagrams on a local
  253.    network, there are probably situations in which there are multiple
  254.    servers on a local network, and to avoid sending to one that has
  255.    recently crashed, routers may wish to send anycast datagrams on a
  256.    link-level multicast address.  Because hosts may multicast any
  257.    datagrams, routers should take care not to forward a datagram if they
  258.    believe that another router will also be forwarding it.
  259.  
  260.    Hosts which wish to receive datagrams for a particular anycast
  261.    address will have to advertise to routers that they have joined the
  262.    anycast address.  On shared media networks, the best mechanism is
  263.    probably for a host to periodically multicast information about the
  264.    anycast addresses it supports (possibly using an enhanced version of
  265.    IGMP).  The multicast messages ensure that any routers on the network
  266.    hear that the anycast address is supported on the local subnet and
  267.    can advertise that fact (if appropriate) to neighboring routers.
  268.    Note that if there are no routers on the subnet, the multicast
  269.    messages would simply simply ignored.  (The multicasting approach is
  270.    suggested because it seems likely to be simpler and more reliable
  271.    than developing a registration protocol, in which an anycast server
  272.    must register itself with each router on its local network).
  273.  
  274.    On point-to-point links, a host can simply advertise its anycast
  275.    addresses to the router on the other end of the link.
  276.  
  277.    Observe that the advertisement protocols are a form of routing
  278.    protocol and that it may make sense to simply require anycast servers
  279.  
  280.  
  281.  
  282. Partridge, Mendez & Milliken                                    [Page 5]
  283.  
  284. RFC 1546                Host Anycasting Service            November 1993
  285.  
  286.  
  287.    to participate (at least partly) in exchanges of regular routing
  288.    messages.
  289.  
  290.    When a host receives an IP datagram destined for an anycast address
  291.    it supports, the host should treat the IP datagram just as if it was
  292.    destined for one of the host's non-anycast IP addresses.  If the host
  293.    does not support the anycast address, it should silently discard the
  294.    datagram.
  295.  
  296.    Hosts should accept datagrams with an anycast source address,
  297.    although some transport protocols (see below) may refuse to accept
  298.    them.
  299.  
  300. How UDP and TCP Use Anycasting
  301.  
  302.    It is important to remember that anycasting is a stateless service.
  303.    An internetwork has no obligation to deliver two successive packets
  304.    sent to the same anycast address to the same host.
  305.  
  306.    Because UDP is stateless and anycasting is a stateless service, UDP
  307.    can treat anycast addresses like regular IP addresses.  A UDP
  308.    datagram sent to an anycast address is just like a unicast UDP
  309.    datagram from the perspective of UDP and its application.  A UDP
  310.    datagram from an anycast address is like a datagram from a unicast
  311.    address.  Furthermore, a datagram from an anycast address to an
  312.    anycast address can be treated by UDP as just like a unicast datagram
  313.    (although the application semantics of such a datagram are a bit
  314.    unclear).
  315.  
  316.    TCP's use of anycasting is less straightforward because TCP is
  317.    stateful.  It is hard to envision how one would maintain TCP state
  318.    with an anycast peer when two successive TCP segments sent to the
  319.    anycast peer might be delivered to completely different hosts.
  320.  
  321.    The solution to this problem is to only permit anycast addresses as
  322.    the remote address of a TCP SYN segment (without the ACK bit set).  A
  323.    TCP can then initiate a connection to an anycast address.  When the
  324.    SYN-ACK is sent back by the host that received the anycast segment,
  325.    the initiating TCP should replace the anycast address of its peer,
  326.    with the address of the host returning the SYN-ACK.  (The initiating
  327.    TCP can recognize the connection for which the SYN-ACK is destined by
  328.    treating the anycast address as a wildcard address, which matches any
  329.    incoming SYN-ACK segment with the correct destination port and
  330.    address and source port, provided the SYN-ACK's full address,
  331.    including source address, does not match another connection and the
  332.    sequence numbers in the SYN-ACK are correct.)  This approach ensures
  333.    that a TCP, after receiving the SYN-ACK is always communicating with
  334.    only one host.
  335.  
  336.  
  337.  
  338. Partridge, Mendez & Milliken                                    [Page 6]
  339.  
  340. RFC 1546                Host Anycasting Service            November 1993
  341.  
  342.  
  343. Applications and Anycasting
  344.  
  345.    In general, applications use anycast addresses like any other IP
  346.    address.  The only worrisome application use of anycasting is
  347.    applications which try to maintain stateful connections over UDP and
  348.    applications which try to maintain state across multiple TCP
  349.    connections.  Because anycasting is stateless and does not guarantee
  350.    delivery of multiple anycast datagrams to the same system, an
  351.    application cannot be sure that it is communicating with the same
  352.    peer in two successive UDP transmissions or in two successive TCP
  353.    connections to the same anycast address.
  354.  
  355.    The obvious solutions to these issues are to require applications
  356.    which wish to maintain state to learn the unicast address of their
  357.    peer on the first exchange of UDP datagrams or during the first TCP
  358.    connection and use the unicast address in future conversations.
  359.  
  360. Anycasting and Multicasting
  361.  
  362.    It has often been suggested that IP multicasting can be used for
  363.    resource location, so it is useful to compare the services offered by
  364.    IP multicasting and IP anycasting.
  365.  
  366.    Semantically, the difference between the two services is that an
  367.    anycast address is the address of a single (virtual) host and that
  368.    the internetwork will make an effort to deliver anycast datagrams to
  369.    a single host.  There are two implications of this difference.
  370.    First, applications sending to anycast addresses need not worry about
  371.    managing the TTLs of their IP datagrams.  Applications using
  372.    multicast to find a service must balance their TTLs to maximize the
  373.    chance of finding a server while minimizing the chance of sending
  374.    datagrams to a large number of servers it does not care about.
  375.    Second, making a TCP connection to an anycast address makes perfectly
  376.    good sense, while the meaning of making a TCP connection to a
  377.    multicast address are unclear.  (A TCP connection to a multicast
  378.    address is presumably trying to establish a connection to multiple
  379.    peers simultaneously, which TCP is not designed to support).
  380.  
  381.    From a practical perspective, the major difference between anycasting
  382.    and multicasting is that anycasting is a special use of unicast
  383.    addressing while multicasting requires more sophisticated routing
  384.    support.  The important observation is that multiple routes to an
  385.    anycast address appear to a router as multiple routes to a unicast
  386.    destination, and the router can use standard algorithms to choose to
  387.    the best route.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Partridge, Mendez & Milliken                                    [Page 7]
  395.  
  396. RFC 1546                Host Anycasting Service            November 1993
  397.  
  398.  
  399.    Another difference between the two approaches is that resource
  400.    location using multicasting typically causes more datagrams to be
  401.    sent.  To find a server using multicasting, an application is
  402.    expected to transmit and retransmit a multicast datagram with
  403.    successively larger IP TTLs.  The TTL is initially kept small to try
  404.    to limit the number of servers contacted.  However, if no servers
  405.    respond, the TTL must be increased on the assumption that the
  406.    available servers (if any) were farther away than was reachable with
  407.    the initial TTL.  As a result, resource location using multicasting
  408.    causes one or more multicast datagrams to be sent towards multiple
  409.    servers, with some datagrams' TTLs expiring before reaching a server.
  410.    With anycasting, managing the TTL is not required and so (ignoring
  411.    the case of loss) only one datagram need be sent to locate a server.
  412.    Furthermore, this datagram will follow only a single path.
  413.  
  414.    A minor difference between the two approaches is that anycast may be
  415.    less fault tolerant than multicast.  When an anycast server fails,
  416.    some datagrams may continue to be mistakenly routed to the server,
  417.    whereas if the datagram had been multicast, other servers would have
  418.    received it.
  419.  
  420. Related Work
  421.  
  422.    The ARPANET AHIP-E Host Access Protocol described in RFC 878 supports
  423.    logical addressing which allows several hosts to share a single
  424.    logical address.  This scheme could be used to support anycasting
  425.    within a PSN subnet.
  426.  
  427. Security Considerations
  428.  
  429.    There are at least two security issues in anycasting, which are
  430.    simply mentioned here without suggested solutions.
  431.  
  432.    First, it is clear that malevolent hosts could volunteer to serve an
  433.    anycast address and divert anycast datagrams from legitimate servers
  434.    to themselves.
  435.  
  436.    Second, eavesdropping hosts could reply to anycast queries with
  437.    inaccurate information.  Since there is no way to verify membership
  438.    in an anycast address, there is no way to detect that the
  439.    eavesdropping host is not serving the anycast address to which the
  440.    original query was sent.
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Partridge, Mendez & Milliken                                    [Page 8]
  451.  
  452. RFC 1546                Host Anycasting Service            November 1993
  453.  
  454.  
  455. Acknowledgements
  456.  
  457.    This memo has benefitted from comments from Steve Deering, Paul
  458.    Francis, Christian Huitema, Greg Minshall, Jon Postel, Ram
  459.    Ramanathan, and Bill Simpson.  However, the authors are solely
  460.    responsible for any dumb ideas in this work.
  461.  
  462.  
  463. Authors' Addresses
  464.  
  465.    Craig Partridge
  466.    Bolt Beranek and Newman
  467.    10 Moulton St
  468.    Cambridge MA 02138
  469.  
  470.    EMail: craig@bbn.com
  471.  
  472.  
  473.    Trevor Mendez
  474.    Bolt Beranek and Newman
  475.    10 Moulton St
  476.    Cambridge MA 02138
  477.  
  478.    EMail: tmendez@bbn.com
  479.  
  480.  
  481.    Walter Milliken
  482.    Bolt Beranek and Newman
  483.    10 Moulton St
  484.    Cambridge MA 02138
  485.  
  486.    EMail: milliken@bbn.com
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Partridge, Mendez & Milliken                                    [Page 9]
  507.  
  508.