<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" []>

<rfc number="8444" submissionType="IETF" consensus="yes" category="std" ipr="trust200902">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>

<front>
  <title abbrev="OSPFv2 Extensions for BIER">OSPFv2 Extensions for Bit Index Explicit Replication (BIER)</title>

  <author initials="P." surname="Psenak" fullname="Peter Psenak" role="editor">
    <organization>Cisco</organization>
    <address>
      <postal>
	<street>Apollo Business Center</street>
	<street>Mlynske nivy 43</street>
	<city>Bratislava</city> <region></region> <code>821 09</code>
	<country>Slovakia</country>
      </postal>
      <email>ppsenak@cisco.com</email>
    </address>
  </author>

  <author initials="N." surname="Kumar" fullname="Nagendra Kumar">
    <organization>Cisco</organization>
    <address>
      <postal>
	<street>7200 Kit Creek Road</street>
	<city>Research Triangle Park</city> <region>NC</region> <code>27709</code>
	<country>United States of America</country>
      </postal>
      <email>naikumar@cisco.com</email>
    </address>
  </author>

  <author fullname="IJsbrand Wijnands" initials="IJ." surname="Wijnands">
    <organization>Cisco</organization>
    <address>
      <postal>
	<street>De Kleetlaan 6a</street>
	<city>Diegem</city>
	<region></region>
	<code>1831</code>
	<country>Belgium</country>
      </postal>
      <email>ice@cisco.com</email>
    </address>
  </author>

  <author fullname="Andrew Dolganow" initials="A." surname="Dolganow">
    <organization>Nokia</organization>
    <address>
      <postal>
	<street>750 Chai Chee Rd</street>
	<street>06-06 Viva Business Park</street>
	<city>Singapore</city>
	<region></region>
	<code>469004</code>
	<country>Singapore</country>
      </postal>
      <email>andrew.dolganow@nokia.com</email>
    </address>
  </author>
  
  <author fullname="Tony Przygienda" initials="T." surname="Przygienda">
    <organization>Juniper Networks, Inc.</organization>
    <address>
      <postal>
	<street>10 Technology Park Drive</street>
	<city>Westford</city>
	<region>MA</region>
	<code>01886</code>
	<country>United States of America</country>
      </postal>
      <email>prz@juniper.net</email>
    </address>
  </author>
  
  <author fullname="Jeffrey Zhang" initials="J." surname="Zhang">
    <organization>Juniper Networks, Inc.</organization>
    <address>
      <postal>
	<street>10 Technology Park Drive</street>
	<city>Westford</city>
	<region>MA</region>
	<code>01886</code>
	<country>United States of America</country>
      </postal>
      <email>zzhang@juniper.net</email>
    </address>
  </author>
  
  <author fullname="Sam Aldrin" initials="S." surname="Aldrin">
    <organization>Google, Inc.</organization>
    <address>
      <postal>
	<street>1600 Amphitheatre Parkway</street>
	<city>Mountain View</city>
	<region>CA</region>
	<code></code>
	<country>United States of America</country>
      </postal>
      <email>aldrin.ietf@gmail.com</email>
    </address>
  </author>

   <date month="November" year="2018"/>
  <area>Internet</area>
  <workgroup>OSPF</workgroup>

  <abstract>
    <t>
      Bit Index Explicit Replication (BIER) is an architecture that provides  
      optimal multicast forwarding through a "BIER domain" without requiring intermediate 
      routers to maintain multicast-related, per-flow state. BIER also does not require
      an explicit tree-building protocol for its operation. A multicast data
      packet enters
      a BIER domain at a Bit-Forwarding Ingress Router (BFIR) and leaves the BIER domain
      at one or more Bit-Forwarding Egress Routers (BFERs). The BFIR adds a 
      BIER packet header to the packet. The BIER packet header contains a BitString in which each bit 
      represents exactly one BFER to forward the packet to. 


The set of BFERs to which the 
      multicast packet needs to be forwarded is expressed by 
the set of bits in the BIER
packet header.
    </t>
    <t>
      This document describes the OSPF protocol extension (from RFC 2328) that is 
      required for BIER with MPLS encapsulation (which is defined in RFC 8296). 
      Support for other encapsulation types and
      the use of multiple encapsulation types are outside the scope of this document.
    </t>
  </abstract>

</front>

<middle>
  <section title="Introduction">
    <t>
      Bit Index Explicit Replication (BIER) is an architecture that provides optimal 
      multicast forwarding through a "BIER domain" without requiring intermediate 
      routers to maintain any multicast-related, per-flow state. Neither does BIER explicitly
      require a tree-building protocol for its operation. A multicast data packet enters
      a BIER domain at a Bit-Forwarding Ingress Router (BFIR) and leaves the BIER domain
      at one or more Bit-Forwarding Egress Routers (BFERs). The BFIR router adds a 
      BIER packet header to the packet. The BIER packet header contains a BitString in which each bit 
      represents exactly one BFER to forward the packet to. 

The set of BFERs to which the 
      multicast packet needs to be forwarded is expressed by the set of bits
      in the BIER packet header.
    </t>
    <t>
      The BIER architecture requires routers participating in BIER 
      to exchange BIER-related information within a given domain and
      permits
      link-state routing protocols to perform distribution of such information. 
	  This document describes extensions to OSPF necessary to advertise BIER-specific 
	  information in the case where BIER uses MPLS encapsulation as described in 
      <xref target="RFC8296"/>.
    </t>
    
        <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
    "MAY", and "OPTIONAL" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>

  </section>

  <section title="Flooding of the BIER Information in OSPF">
  
      <t>All BIER-specific information that a Bit-Forwarding Router (BFR) needs to 
      advertise to other BFRs is associated with a BFR-prefix. A BFR-prefix is a unique 
	  (within a given BIER domain) routable IP address that is assigned to each BFR as 
	  described in detail in Section 2 of <xref target="RFC8279"/>.</t>
      
      <t>Given that BIER information must be associated with a BFR-prefix, 
	  the OSPFv2 Extended 
      Prefix Opaque LSA <xref target="RFC7684"/> has been
	  chosen for advertisement. </t>
      
   <section title="BIER Sub-TLV">
    
      <t>A sub-TLV of the OSPFv2 Extended Prefix TLV (defined in 
      <xref target="RFC7684"/>) is defined for distributing BIER 
      information. The sub-TLV is called the BIER Sub-TLV. Multiple BIER Sub-TLVs may be
      included in the OSPFv2 Extended Prefix TLV.</t>
        
      <t>The BIER Sub-TLV has the following format:</t>	  

    <figure>
      <artwork>
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Type             |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-domain-id |     MT-ID     |              BFR-id           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    BAR        |    IPA        |            Reserved           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Sub-TLVs (variable)                      |
+-                                                             -+
|                                                               |

     </artwork>
   </figure>
      <t>
	<list style='hanging'>


      <t hangText="Type:">9</t>

      <t hangText="Length:">Variable, dependent on sub-TLVs.</t>
      
      <t hangText="sub-domain-id:">Unique value identifying the BIER sub-domain within the BIER domain,
	  as described in Section 1 of <xref target="RFC8279"/>.</t>
      
      <t hangText="MT-ID:">Multi-Topology ID (as defined in <xref target="RFC4915"/>) that identifies the topology
	  that is associated with the BIER sub-domain.</t>
      
      <t hangText="BFR-id:">A 2-octet field encoding the BFR-id, as documented in Section 2 of
	  <xref target="RFC8279"/>. If the BFR is not locally configured 
      with a valid BFR-id, the value of this field is set to 0, which is defined as illegal 
      in <xref target="RFC8279"/>.</t>

      <t hangText="BAR:">Single-octet BIER Algorithm used to calculate underlay paths 
      to reach other BFRs. Values are allocated from the "BIER Algorithm" registry
      defined in <xref target="RFC8401"/>.</t>
      
      <t hangText="IPA:">Single-octet IGP Algorithm used to either modify, enhance, or replace the 
      calculation of underlay paths to reach other BFRs as defined by the BAR value. 


      Values are defined in the "IGP Algorithm Types" registry <xref target="IANA-IGP"/>.</t>
	  
	 </list></t>
	
	<t>Each BFR sub-domain MUST be associated with one and only one OSPF topology that is 
	identified by the MT-ID. If the association between the BIER
	sub-domain and OSPF topology 
	advertised in the BIER Sub-TLV by other BFRs is in conflict with the association 
	locally configured on the receiving router, the BIER Sub-TLV for such
	conflicting sub-domains MUST be ignored.</t>
	
	<t>If the MT-ID contains an invalid value as specified in
<xref target="RFC4915"/>, 
	the BIER Sub-TLV for such subdomains with conflict MUST be ignored.</t>
	
	<t>If a BFR advertises the same sub-domain-id in multiple BIER Sub-TLVs, the BFR MUST 
	be treated as if it did not advertise a BIER Sub-TLV for such sub-domain.</t>

	<t>All BFRs MUST detect advertisement of duplicate valid BFR-ids for a given MT-ID
	 and sub-domain-id. When such duplication is detected by the BFR, it MUST behave as 
	 described in Section 5 of <xref target="RFC8279"/>.</t>
	 
	<t>The supported BAR and IPA algorithms MUST be consistent for all routers supporting
	a given BFR sub-domain. 


If a router receives a BIER Sub-TLV advertisement with a value
	in the BAR or IPA fields that does not match the locally configured value for a given 
	BFR sub-domain, the router MUST report a misconfiguration for such BIER
	sub-domain and MUST ignore the BIER Sub-TLV containing the error.</t>
	
	<t>The use of non-zero values in either the BAR field or the IPA field is outside 
	the scope of this document.</t>
	
	</section>
    
    <section title="BIER MPLS Encapsulation Sub-TLV">
	  
	  <t>The BIER MPLS Encapsulation Sub-TLV is a sub-TLV of the BIER Sub-TLV. The BIER MPLS 
	  Encapsulation Sub-TLV is used in order to advertise MPLS-specific information used
	  for BIER. It MAY appear multiple times in the BIER Sub-TLV.</t>
	  
	  <t>The BIER MPLS Encapsulation Sub-TLV has the following format:</t>	  

    <figure>
      <artwork>
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Type             |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Max SI    |                     Label                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|BS Len |                     Reserved                          | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     </artwork>
   </figure>
      <t>
	<list style='hanging'>


	  <t hangText="Type:">10</t>

      <t hangText="Length:">8 octets</t>

	  <t hangText="Max SI:">A 1-octet field encoding the maximum Set Identifier (SI)
	  (see Section 1 of <xref target="RFC8279"/>) used in the
      encapsulation for this BIER sub-domain for this BitString length.</t>
	      
      <t hangText="Label:">A 3-octet field, where the 20 rightmost bits represent the first
      label in the label range. The 4 leftmost bits MUST be ignored.</t>
      
      <t hangText="BS Len (BitString Length):">A 4-bit field encoding the supported
      BitString length associated with this BFR-prefix. The values
      allowed in this field	
	  are specified in Section 2 of <xref target="RFC8296"/>.</t>
	  
	  <t hangText="Reserved:">SHOULD be set to 0 on transmission and MUST
	  be ignored on reception.</t>

    </list></t>

	  <t>The "label range" is the set of labels beginning with the Label and 
	  ending with (Label + (Max SI)). A unique label range is  allocated
	  for each BitString length and sub-domain-id. These labels are used for BIER 
	  forwarding as described in <xref target="RFC8279"/> and 
	  <xref target="RFC8296"/>.</t>

      <t>The size of the label range is determined by the number of SIs
      (Section 1 of <xref target="RFC8279"/>) that are used in the 
      network. Each SI maps to a single label in the label range: the first label is for 
      SI=0, the second label is for SI=1, etc.</t>
    
    <t>If the label associated with the Maximum Set Identifier exceeds the 20-bit range,
    the BIER MPLS Encapsulation Sub-TLV containing the error MUST be ignored.</t>
    
    <t>If the BitString length is set to a value that does not match any of the allowed values 
    specified in <xref target="RFC8296"/>, the BIER MPLS Encapsulation Sub-TLV
    containing the error MUST
    be ignored.</t>
    
    <t>If the same BitString length is repeated in multiple BIER MPLS Encapsulation Sub-TLVs inside
    the same BIER Sub-TLV, the whole BIER Sub-TLV containing the conflicts MUST be ignored.</t>
    
    <t>Label ranges within all BIER MPLS Encapsulation Sub-TLVs advertised by the same BFR
    MUST NOT overlap. If an overlap is detected, all BIER sub-TLVs advertised
    by such a router MUST be ignored.
</t>   
    </section>


	<section title="Flooding Scope of BIER Information">
	<t>The flooding scope of the OSPFv2 Extended Prefix Opaque LSA 
	<xref target="RFC7684"/> that is used for advertising 
	the BIER Sub-TLV is set to area-local. To allow BIER deployment in a multi-area environment, 
	OSPF must propagate BIER information between areas.</t> 
	
	
	<figure anchor="fig1" title="BIER Propagation between Areas">
      <artwork>
              (  )         (  )         (  )
            (      )     (      )     (      )
         R1  Area 1   R2  Area 0   R3  Area 2  R4
            (      )     (      )     (      )
              (  )         (  )         (  )
    </artwork>
   </figure>
   
   <t>The following procedure is used in order to propagate BIER related information 
   between areas:<list style="hanging">
	
	<t>When an OSPF Area Border Router (ABR) advertises a Type-3 Summary LSA from an 
	intra-area or inter-area prefix to all its attached areas, it will also originate an 
	OSPFv2 Extended Prefix Opaque LSA, as described in <xref target="RFC7684"/>. The flooding 
	scope of the OSPFv2 Extended Prefix Opaque LSA type will be set to area-local. The route-type
	in the OSPFv2 Extended Prefix TLV is set to inter-area. When determining whether a BIER  
    Sub-TLV should be included in this LSA, an OSPF ABR will:<list style="symbols">
         
            <t>Examine its best path to the prefix in the source area and find the 
            advertising router associated with the best path to that prefix.</t>


            <t>
Determine if the advertising router advertised a BIER Sub-TLV for the prefix.
If yes, the ABR will copy the information
   from that BIER Sub-TLV when advertising the BIER Sub-TLV to each
   attached area.
</t>
            
          </list></t>
          
    <t>In <xref target="fig1"/>, R1 advertises a prefix 192.0.2.1/32 in Area
    1. It also advertises an
    OSPFv2 Extended Prefix Opaque LSA for prefix 192.0.2.1/32 and includes a BIER Sub-TLV in it. 
    ABR R2 calculates the reachability for prefix 192.0.2.1/32 inside 
    Area 1 and propagates it to Area 0. When doing so, it copies the entire BIER Sub-TLV 
    (including all of its Sub-TLVs) that it received from R1 in Area 1 and includes it in the 
    OSPFv2 Extended Prefix Opaque LSA it generates for 192.0.2.1/32 in Area 0. ABR R3 calculates 
    the reachability for prefix 192.0.2.1/32 inside Area 0 and propagates it to Area 2. 
    When doing so, it copies the entire BIER Sub-TLV (including all of its
    sub-TLVs) that it 
    received from R2 in Area 0 and includes it in the OSPFv2 Extended Prefix Opaque LSA it 
    generates for 192.0.2.1/32 in Area 2.</t>
            
    </list></t>
  </section>
  </section>


  <section title="Security Considerations">
    <t>This document introduces new sub-TLVs for the existing OSPFv2 Extended Prefix TLV. 
    It does not introduce any new security risks to OSPF. Existing security 
    extensions as described in <xref target="RFC2328"/> and <xref target="RFC7684"/> 
    apply.</t>
    
    <t>It is assumed that both the BIER and OSPF layers are under a single administrative
    domain. There can be deployments where potential attackers have access to one or more
    networks in the OSPF routing domain. 

In these deployments, stronger authentication
    mechanisms such as those specified in <xref target="RFC7474"/> SHOULD be used.</t> 
    
    <t>The Security Considerations section of <xref target="RFC8279"/> discusses the	
	possibility of performing a Denial-of-Service (DoS) attack by setting	
    too many bits in the BitString of a BIER-encapsulated packet.	
    However, this sort of DoS attack cannot be initiated by modifying the	
	OSPF BIER advertisements specified in this document.  A BFIR decides	
	which systems are to receive a BIER-encapsulated packet.  In making	
	this decision, it is not influenced by the OSPF control messages.	
    When creating the encapsulation, the BFIR sets one bit in the	
	encapsulation for each destination system.  


The information in the	
	OSPF BIER advertisements is used to construct the forwarding tables	
	that map each bit in the encapsulation into a set of next hops for	
	the host that is identified by that bit, but the information is not
	used by the BFIR	
	to decide which bits to set.  Hence, an attack on the OSPF control	
	plane cannot be used to cause this sort of DoS attack.</t>	
		 		
	<t>While a BIER-encapsulated packet is traversing the network, a BFR	
	that receives a BIER-encapsulated packet with n bits set in its	
	BitString may have to replicate the packet and forward multiple	
	copies.  However, a given bit will only be set in one copy of the	
	packet.  This means that each transmitted replica of a received	
	packet has fewer bits set (i.e., is targeted to fewer destinations)	
	than the received packet.  This is an essential property of the BIER	
	forwarding process as defined in <xref target="RFC8279"/>.  While a failure of this	
	process might cause a DoS attack (as discussed in the Security	
	Considerations section of <xref target="RFC8279"/>), such a failure
	cannot be caused by an	
	attack on the OSPF control plane.</t>
   

   <t>Implementations MUST ensure that malformed BIER and BIER MPLS
   Encapsulation Sub-TLVs as defined in
   this document are detected and that they do not provide a vulnerability for
   attackers to crash the OSPF router or routing process.  Reception
   of malformed TLVs or sub-TLVs SHOULD be counted and/or logged for
   further analysis.  Logging of malformed TLVs and sub-TLVs SHOULD be
   rate-limited to prevent a DoS attack (distributed
   or otherwise) from overloading the OSPF control plane.</t>
  </section>

  <section title="IANA Considerations">
    <t>
      IANA has allocated the following from the "OSPFv2 Extended
      Prefix TLV Sub-TLVs"
      registry defined in <xref target="RFC7684"/>.
      <list style='hanging'>
	  <t>BIER Sub-TLV: 9</t>
	  
	  <t>BIER MPLS Encapsulation Sub-TLV: 10</t>
	  
      </list>
    </t>
    
  </section>

</middle>
<back>
  <references title="Normative References">    
    <?rfc include="reference.RFC.2119"?>
    <?rfc include="reference.RFC.2328"?>
    <?rfc include="reference.RFC.4915"?>
    <?rfc include="reference.RFC.7684"?>
    <?rfc include="reference.RFC.8279"?>
    <?rfc include="reference.RFC.8296"?>
    <?rfc include="reference.RFC.8174"?>
    <?rfc include="reference.RFC.7474"?>

<!-- ietf-bier-isis-extensions now RFC 8401 -->
    <?rfc include="reference.RFC.8401"?>
   
  </references>

  <references title="Informative References">
<reference anchor="IANA-IGP"
           target="https://www.iana.org/assignments/igp-parameters/">
  <front>
    <title>IGP Algorithm Types</title>
    <author><organization>IANA</organization></author>
    <date />
  </front>
</reference>
  </references>

  <section title="Acknowledgments" numbered="no">
    <t>
      The authors would like to thank Rajiv Asati, Christian Martin, Greg Shepherd, and 
      Eric Rosen for their contributions.
    </t>
  </section>
      
  </back>


</rfc>
