﻿<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "D:/Program%20Files/XML%20Copy%20Editor/dtd/rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc4020 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4020.xml">
<!ENTITY rfc4264 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4264.xml">
<!ENTITY rfc4271 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
<!ENTITY rfc1997 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1997.xml">
]>
<?rfc compact="yes" ?>
<rfc ipr="full3978" docName="draft-dickson-idr-last-resort-05">
  <front>
    <Creation month="August" year="2008" day="21"></Creation>
    <creation month="August" year="2008" day="21"></creation>
    <created month="August" year="2008" day="21"></created>
    <title abbrev="BGP Community: LAST_RESORT">
A New BGP Standards Action Community, LAST_RESORT
</title>
    <author initials="B.P." surname="Dickson" fullname="Brian Dickson">
      <organization>
Afilias Canada, Inc
</organization>
      <address>
        <postal>
          <street>
4141 Yonge St,
</street>
          <street>
Suite 204
</street>
          <city>
North York
</city>
          <region>
ON
</region>
          <code>
M2P 2A8
</code>
          <country>
Canada
</country>
        </postal>
        <email>
brian.peter.dickson@gmail.com
</email>
        <uri>
www.afilias.info
</uri>
      </address>
    </author>
    <date month="August" year="2008"></date>
    <area>Routing</area>
    <workgroup>idr</workgroup>
    <keyword>
IPv6
</keyword>
    <abstract>
      <t>
This Internet Draft describes a new Standards Action BGP community, LAST_RESORT.
<vspace blankLines="1"></vspace>
This community provides a simple and easily deployable solution to a certain class of BGP "wedgies".
<vspace blankLines="1"></vspace>
Initial deployment is expected to be achieved by voluntary use in the network operator community-at-large.
<vspace blankLines="1"></vspace>
Long-term adoption via software enforcement of the  community, will improve global behavior, and simplify router configurations.
<vspace blankLines="1" />
The Standards Action range of communities (previously limited to the "well-known" communities) ensures that the expectation of (eventual) router support is reasonable.
</t>
    </abstract>
    <note title="Author&apos;s Note">
      <t>This Internet Draft is intended to result in this draft or a related draft(s) being placed on the Standards Track for idr.
      <vspace blankLines="1"></vspace>
      The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in
      <xref target="RFC2119"></xref>.
      <vspace blankLines="1"></vspace>
      Intended Status: Proposed Standard.
</t>
    </note>
  </front>
  <middle>
    <section title="Background">
      <t>
Even when all the best current practises are observed, operational problems may be experienced when running a BGP network.
<vspace blankLines="1"></vspace>
One particularly thorny problem is <xref target="RFC4264">BGP "wedgies"</xref>.
<vspace blankLines="1"></vspace>
While not often articulated, the common problem is the use of local policy settings within (and in particular, at) AS boundaries, which often override the original intent of "backup" BGP announcements.
<vspace blankLines="1"></vspace>
It is somewhat ironic that such local policies are often achieved by use of BGP Communities, and that the lack of a common community, is one source of the problem.
</t>
      <section title="The Local Policy Problem">
        <t>
The BGP "wedgie" problem occurs when a number of mechanisms in path selection interact across multiple routers, where the resulting state is stable, but is not deterministic, but rather is the result of a race.
<vspace blankLines="1" />
Generally speaking, the "wedgie" problem is induced by the application of non-default values to prefixes, by way of local policy setting, such as modification of AS-path, setting of Multi-Exit Discriminators (MEDs), local preference setting, or similar mechanisms.
<vspace blankLines="1" />
One particular class of "wedgies" is the result of the lack of an explicit global mechanism for expressing de-preferring announcements via "back-up" providers. In essence, the applied local policies that interfere with such "back-up" announcements could be described as "not well informed".
</t>
      </section>
    </section>
    <section title="Proposed Change: A New BGP Standards Action Community">
      <t>
To solve this particular class of problem, a new BGP Stardards Action Community, LAST_RESORT, is proposed. This is a standard, not an extended, community.
This is a new value to be assigned by IANA.
In particular, if this instant Draft is adopted as a WG Draft, an RFC 4020 Early Assignment is requested.
</t>
    </section>
    <section title="Changes to BGP Behavior">
      <t>
A BGP speaker receiving a prefix from an EBGP neighbor with LAST_RESORT MUST assign the lowest-possible preference value of LOCAL_PREFERENCE. This LOCAL_PREFERENCE MUST be assigned AFTER the application of local policy mechanisms, and MUST NOT be able to be over-ridden without first removing the LAST_RESORT community from the prefix. A BGP speaker receiving a prefix from an IBGP neighbor with LAST_RESORT MUST ignore the LAST_RESORT community.
<vspace blankLines="1"></vspace>
The distinction between EBGP and IBGP ensures backwards compatibility, particularly when a heterogeneous set of routers in an AS doing IBGP exists.
<vspace blankLines="1"></vspace>
The restriction preventing overriding LAST_RESORT ensures that local policy mechanisms do not interfere with LAST_RESORT. This also facilitates ease in deployment, as most router configurations would not require modification.
<vspace blankLines="1"></vspace>
Note Well, that this order of evaluation, with local policy before LAST_RESORT, means that the only way to apply local policy to routes with LAST_RESORT, is to strip LAST_RESORT on ingress, then apply local policy, then set LAST_RESORT again on egress.
<vspace blankLines="1"></vspace>
This restriction is by design, so that AS-wide policy remains consistent even in a heterogenous environment of routers that may or may not understand LAST_RESORT.
</t>
    </section>
    <section title="LAST_RESORT - Basic Method">
      <t>
The main reason for establishing the LAST_RESORT Community is to permit the global implementation of "backup only" announcements, whose 
 purpose and intent are clear and unambiguous.
It is not to facilitate change of policies, or to circumvent local policies. Rather, it is to make possible the implementation of policies where those have been negotiated by two or more parties.
<vspace blankLines="1"></vspace>
Currently, there are several documented scenarios in <xref target="RFC4264">the "Wedgies" RFC</xref> where the mutually desired policy is either unable to be implemented, or does not deterministically reach the desired state.
<vspace blankLines="1"></vspace>
Application of the LAST_RESORT Community on announcements sent to a backup provider, permits these problem classes to be resolved.
<vspace blankLines="1"></vspace>
The same prefix is announced to both the primary and backup provider.
When announced to the primary provider, the LAST_RESORT Community is NOT set.
When announced to the backup provider, the LAST_RESORT Community IS set.
<vspace blankLines="1"></vspace>
The propagation of the LAST_RESORT instance will be limited by the availability of paths, and inhibited by the existence of paths which do not have LAST_RESORT applied to them.
<vspace blankLines="1"></vspace>
In <xref target="c1"></xref> (of <xref target="appendixc"></xref>), the LAST_RESORT instance will be seen by the backup provider, and be passed with LAST_RESORT to the backup provider's transit provider.
The latter will prefer any other instance without LAST_RESORT, even if it has policy for applying a LOCAL_PREFERENCE to the received prefix instances.
Should the other instance be withdrawn, the LAST_RESORT will be selected and subsequently propagated.
</t>
    </section>
    <section title="Security Considerations">
      <t>
No additional security considerations beyond those already present in BGP are introduced.
</t>
    </section>
    <section title="IANA Considerations">
      <t>
IANA will need to assign a new code point from BGP Standards Action Communities for LAST_RESORT.
</t>
    </section>
    <section title="Acknowledgements">
      <t>
The author wishes to acknowledge the helpful guidance of Joe Abley and Tony Li.

The author also wishes to acknowledge the assistance and suggestions of Joel M. Halpern in simplifying the original "Backup-only" concept to that of a BGP community, and of Olivier Bonaventure in clarifying the LOCAL_PREFERENCE mechanisms.
</t>
    </section>
  </middle>
  <back>
    <references title="Normative References">&rfc4264;&rfc4271;&rfc1997;&rfc4020;</references>
    <references title="Informative References">&rfc2119;</references>
    <section title="BGP Wedgie Examples" anchor="appendixc">
      <t>
The following examples from <xref target="RFC4264">RFC 4264</xref> show the effects of the proposed changes, in resolving "wedgie" issues.
    
<figure anchor="c1"><artwork>
+----+                +----+
|AS 3|----------------|AS 4|
+----+ peer      peer +----+
  |provider             |provider
  |                     |
  |customer             |
+----+                  |
|AS 2|                  |
+----+                  |
  |provider             |
  |                     |
  |customer             |customer
  +-------+  +----------+
    backup|  |primary
         +----+
         |AS 1|
         +----+
</artwork></figure>
In <xref target="c1"></xref> above, the announcement via the backup link is sent with LAST_RESORT.
<list style="symbols"><t>AS 4 sends AS_PATH "4 1" to AS 3.</t><t>AS 2 receives the LAST_RESORT path from AS 1, and sends AS_PATH "2 1" to AS 3, also with LAST_RESORT.</t><t>AS 3 and AS 4 exchange their respective "best" paths.</t><t>AS 3 prefers the path "4 1" over "2 1" because "2 1" is LAST_RESORT.</t><t>AS 3 sends a withdrawal of the LAST_RESORT path to AS 4.</t><t>AS 3 sends its "best", AS_PATH "3 4 1" to AS 2.</t></list>
This state will be reached regardless of sequence of disconnects and reconnects.
     
<figure anchor="c2"><artwork>
+----+                +----+
|AS 3|----------------|AS 4|
+----+ peer      peer +----+
  |provider             |provider
  |                     |
  |customer             |customer
+----+                +----+
|AS 2|                |AS 5|
+----+                +----+
  |provider             |provider
  |                     |
  |customer             |customer
  +-------+  +----------+
    backup|  |primary for 192.9.200.0/25
   primary|  |backup  for 192.9.200.128/25
         +----+
         |AS 1|
         +----+
</artwork></figure>

In <xref target="c2"> </xref> above, the announcements via the backup links will work the same as in Example 1.
<figure anchor="c3"><artwork>
+----+                +----+
|AS 3|----------------|AS 4|
+----+ peer      peer +----+
 ||provider             |providerS
 |+-----------+         |
 |customer    |customer |
+----+       +----+     |
|AS 2|-------|AS 5|     |
+----+ peer  +----+     |
  |provider   |provider |
  |           |         |
  |customer +-+customer |customer
  +-------+ |+----------+
    backup| ||primary
         +----+
         |AS 1|
         +----+
</artwork></figure>

In <xref target="c3"></xref> above, the announcements via both backup links will result in:
<list style="symbols"><t>AS 2 selecting its best path via "3 4 1" (the only path it hears from AS 3)
</t><t>AS 2 hearing one of two paths from AS 5:
<list style="symbols"><t>"5 3 4 1"
</t><t>LAST_RESORT with path "5 1"
</t></list>
</t><t>AS 2 hearing a LAST_RESORT directly from AS 1
</t></list>
Any announcement that AS 3 hears from AS 2 will always be marked LAST_RESORT. (The same will be true of AS 5.)
Thus, any combination of break/restore on any links in any order, will always result in the desired state being reached.
</t>
    </section>
  </back>
</rfc>
