<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-yong-idr-flowspec-redirect-vpn-rd-00"
     ipr="trust200902">
  <front>
    <title abbrev="Flowspec Redirect to VPN RD">BGP Flowspec Redirect to VPN
    RD Extended Community</title>

    <author fullname="lucy.yong" initials="Y. " surname="Lucy">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>lucy.yong@huawei.com</email>
      </address>
    </author>

    <author fullname="Shunwan Zhuang" initials="S. " surname="Zhuang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>zhuangshunwan@huawei.com</email>
      </address>
    </author>

    <author fullname="Weiguo Hao" initials="W. " surname="Hao">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>101 Software Avenue,</street>

          <city>Nanjing</city>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>haoweiguo@huawei.com</email>
      </address>
    </author>

    <date day="17" month="March" year="2016"/>

    <abstract>
      <t>This document defines a new type of the redirect extended community,
      called as Redirect to VPN RD Extended Community. When activated, the
      Redirect to VPN RD Extended Community is used to identify the unique VPN
      instance within a router.</t>
    </abstract>

    <note title="Requirements Language">
      <t>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">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>"Dissemination of Flow Specification Rules" <xref target="RFC5575"/>,
      commonly known as BGP Flowspec, provided for a BGP Extended Community
      <xref target="RFC4360"/>[RFC4360] that served to redirect traffic that
      matched the flow specification's Network Layer Reachability Information
      (NLRI) to a Virtual Routing and Forwarding (VRF) instance that lists the
      specified route-target in its import policy. In that RFC, the Redirect
      Extended Community was documented as follows:</t>

      <t><figure>
          <!--preamble></preamble-->

          <artwork><![CDATA[
: +--------+--------------------+--------------------------+
: | type   | extended community | encoding                 |
: +--------+--------------------+--------------------------+
: | 0x8008 | redirect           | 6-byte Route Target      |
: +--------+--------------------+--------------------------+
: 
: [...]
: 
: Redirect:  The redirect extended community allows the traffic to be
: redirected to a VRF routing instance that lists the specified
: route-target in its import policy. If several local instances
: match this criteria, the choice between them is a local matter
: (for example, the instance with the lowest Route Distinguisher
: value can be elected). This extended community uses the same
: encoding as the Route Target extended community [RFC4360].
: [...]
: 
: 11. IANA Considerations
: [...]
: 
: The following traffic filtering flow specification rules have been
: allocated by IANA from the "BGP Extended Communities Type -
: Experimental Use" registry as follows:
: [...]
: 
: 0x8008 - Flow spec redirect
    ]]></artwork>

          <!--postamble></postamble-->
        </figure></t>

      <t> <xref target="RFC7674"/> updates RFC 5575 ("Dissemination of Flow
      Specification Rules") to clarify the formatting of the BGP Flowspec
      Redirect Extended Community. This document defines the following
      redirect extended communities:</t>

      <t><figure>
          <!--preamble></preamble-->

          <artwork><![CDATA[
+--------+--------------------+-------------------------------------+
| type   | extended community | encoding                            |
+--------+--------------------+-------------------------------------+
| 0x8008 | redirect AS-2byte  | 2-octet AS, 4-octet Value           | 
| 0x8108 | redirect IPv4      | 4-octet IPv4 Address, 2-octet Value |
| 0x8208 | redirect AS-4byte  | 4-octet AS, 2-octet Value           |
+--------+--------------------+-------------------------------------+
    ]]></artwork>

          <!--postamble></postamble-->
        </figure></t>

      <t/>
    </section>

    <section title="Operation Concerns in Redirect VRF Action">
      <t>Following example is a case used in a backbone network.</t>

      <t>Traffic Analyzer is installed at the edge of the backbone to detect
      the attack.</t>

      <t>Scrubbing Center is installed at the edge of the backbone tackle the
      attack.</t>

      <t>VRF scrubbing-vpn is configured on R1 and R2. A default route in R1's
      scrubbing-vpn VRF is configured to reach the Scrubbing Center, and
      MP-BGP is configured to advertise the default route from VRF
      scrubbing-vpn to the remote router R2.</t>

      <t><figure align="center">
          <artwork><![CDATA[
       +--------+
       |Traffic |
   +---+Analyzer|
   |   +--------+                                VPN instances in R2:
   |
 | |                                             ip vpn-instance vpn1
 | |FlowSpec rule with                            RD: 10:1
 | |Redirect RT: 100:1                            IRT: 10:1 100:1
 v |                                              ERT: 10:1 100:1
   |    Scrubbing vrf in R1:
   |    ip vpn-instance scrubbing-vpn            ip vpn-instance scrubbing-vpn
   |     RD: 100:1                                RD: 100:1
   |     IRT: 100:1                               IRT: 100:1
+--+--+  ERT: 100:1                      +-----+  ERT: 100:1
|  R1 +----------------------------------+ R2  +
+-----+      ------------->              +-----+ ip vpn-instance vpn2
   |         FlowSpec rule with                   RD: 200:1
   |         Redirect RT: 100:1                   IRT: 10:1 100:1
   |                                              ERT: 10:1
   |                 <------Redirect DDoS Traffic
   |                        to Scrubbing Center from R2
   |   +----------+
   |   |Scrubbing |
   +---+Center    |
       +----------+

Figure 1 Redirect DDoS Traffic to Scrubbing Center Using Redirect VPN RT

]]></artwork>
        </figure>Upon detecting the attack target to the user of the backbone
      network, Traffic Analyzer will push a Flowspec rule to R1 with Redirect
      RT: 100:1.</t>

      <t>R1 will advertise the receiving Flowspec rule to R2.</t>

      <t>If the VRF scrubbing-vpn on R2 is the only VRF routing instance, then
      the receiving Flowspec rule from R1 can be imported by the VRF routing
      instance scrubbing-vpn. The attack traffic that matches the Flowspec
      rule on R2 will be redirected to the VRF scrubbing-vpn and sent to the
      Scrubbing Center.</t>

      <t>However in this case, there are several local instances on R2 can
      match the Redirect RT: 100:1(as shown in following table). To make it
      work, according to RFC 5575, an operator has to configure R2 so that
      'Redirect to VPN' will point to the scrubbing-vpn, which introduces
      operation complex and/or prone to an error. To avoid this configuration,
      a unique RT value for BGP FS 'Redirect to VPN' action has to be
      selected, which can be an operation complex in a large network.</t>

      <t><figure align="center">
          <artwork><![CDATA[
+---------------+--------------------+----------------+
| VRF           | IRT                | RD             |
+---------------+--------------------+----------------+
| vpn1          | 10:1 100:1         | 10:1           |
| scrubbing-vpn | 100:1              | 100:1          |
| vpn2          | 10:1 100:1         | 200:1          |
+---------------+--------------------+----------------+

]]></artwork>
        </figure></t>

      <t>The reason for the above issue is that the IRT isn't unique on one
      router, for example, IRT 100:1 can be assigned to multiple VRF
      instances: vpn1, scrubbing-vpn and vpn2.</t>

      <t>The Route Distinguisher is unique on one router, In order to address
      this operational concern, this document introduces a new type of the
      redirect extended community, called as Redirect to VPN RD Extended
      Community, When activated, the Redirect to VPN RD Extended Community is
      used to identify the unique VPN instance within a router.</t>

      <t/>
    </section>

    <section title="Redirect to VPN RD Extended Community Format">
      <t>This document defines a new type of the redirect extended community,
      called as Redirect to VPN RD Extended Community. This extended community
      is a new transitive extended community with the Sub-Type field is TBD.
      The IANA registry of BGP Extended Communities clearly identifies
      communities of specific formats: "Two-octet AS Specific Extended
      Community" <xref target="RFC4360"/>, "Four-octet AS Specific Extended
      Community" <xref target="RFC5668"/>, and "IPv4 Address Specific Extended
      Community" <xref target="RFC4360"/>. Route Targets <xref
      target="RFC4360"/> identify this format in the high-order (Type) octet
      of the Extended Community, Redirect to VPN RD Extended Community uses
      the same mechanism</t>

      <t>This document defines the following VPN RD Extended Communities:</t>

      <t><figure align="center">
          <artwork><![CDATA[
+------+--------+--------------------+-------------------------------------+
| Type |Sub-Type| Extended Community | Encoding                            |
+------+--------+--------------------+-------------------------------------+
| 0x80 | TBD    | AS-2byte RD        | 2-octet AS, 4-octet Value           |
| 0x81 | TBD    | IPv4 RD            | 4-octet IPv4 Address, 2-octet Value |
| 0x82 | TBD    | AS-4byte RD        | 4-octet AS, 2-octet Value           |
+------+--------+--------------------+-------------------------------------+
                Figure 2: VPN RD Extended Communities
]]></artwork>
        </figure></t>

      <t>It should be noted that the low-order nibble of the Redirect's Type
      field corresponds to the Route Target Extended Community format field
      (Type). (See Sections 3.1, 3.2, and 4 of [RFC4360] plus Section 2 of
      [RFC5668].) The low-order octet (Sub-Type) of the Redirect to VPN RD
      Extended Community is TBD, in contrast to 0x02 for Route Targets and
      0x08 for Redirect to VPN RT Extended Community.</t>

      <t/>
    </section>

    <section title="Using Redirect VPN RD Extended Community">
      <t>Upon detecting the attack target to the user of the backbone network,
      Traffic Analyzer will push a Flowspec rule to R1 with Redirect VPN RD:
      100:1.</t>

      <t>R1 will advertise the receiving Flowspec rule to R2.</t>

      <t>In R2, the receiving Flowspec rule from R1 can be imported by the VRF
      routing instance scrubbing-vpn. The attack traffic that matches the
      Flowspec rule on R2 will be correctly redirected to the VRF
      scrubbing-vpn and sent to the Scrubbing Center.</t>

      <t><figure align="center">
          <artwork><![CDATA[
       +--------+
       |Traffic |
   +---+Analyzer|
   |   +--------+                                VPN instances in R2:
   |
 | |                                             ip vpn-instance vpn1
 | |FlowSpec rule with                            RD: 10:1
 | |Redirect VPN RD: 100:1                        IRT: 10:1 100:1
 v |                                              ERT: 10:1 100:1
   |    Scrubbing vrf in R1:
   |    ip vpn-instance scrubbing-vpn            ip vpn-instance scrubbing-vpn
   |     RD: 100:1                                RD: 100:1
   |     IRT: 100:1                               IRT: 100:1
+--+--+  ERT: 100:1                      +-----+  ERT: 100:1
|  R1 +----------------------------------+ R2  +
+-----+      ------------->              +-----+ ip vpn-instance vpn2
   |         FlowSpec rule with                   RD: 200:1
   |         Redirect VPN RD: 100:1               IRT: 10:1 100:1
   |                                              ERT: 10:1
   |                 <------Redirect DDoS Traffic
   |                        to Scrubbing Center from R2
   |   +----------+
   |   |Scrubbing |
   +---+Center    |
       +----------+

Figure 3: Redirect DDoS Traffic to Scrubbing Center Using Redirect VPN RD

]]></artwork>
        </figure></t>

      <t>The above procedures assume that all PEs are upgraded to support the
      Redirect to VPN RD Extended Community.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>TBD.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>TBD.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.4271'?>

      <?rfc include='reference.RFC.4360'?>

      <?rfc include='reference.RFC.4760'?>

      <?rfc include='reference.RFC.5575'?>

      <?rfc include='reference.RFC.5492'?>

      <?rfc include='reference.RFC.5668'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.7674'?>
    </references>
  </back>
</rfc>
