<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "reference.RFC.2119.xml">
<!ENTITY RFC2328 SYSTEM "reference.RFC.2328.xml">
<!ENTITY RFC5340 SYSTEM "reference.RFC.5340.xml">
<!ENTITY RFC6845 SYSTEM "reference.RFC.6845.xml">
<!ENTITY RFC6987 SYSTEM "reference.RFC.6987.xml">
<!ENTITY RFC3630 SYSTEM "reference.RFC.3630.xml">
<!ENTITY RFC5329 SYSTEM "reference.RFC.5329.xml">
<!ENTITY RFC7770 SYSTEM "reference.RFC.7770.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact='yes'?>
<?rfc subcompact='no'?>
<rfc number="8042" category="std" ipr="trust200902" updates="2328" consensus="yes" submissionType="IETF">

<front>
<title abbrev="OSPF Two-Part Metric">OSPF Two-Part Metric</title>
    <author fullname="Zhaohui Zhang" initials="Z." surname="Zhang">
      <organization>Juniper Networks, Inc.</organization>
      <address>
        <postal>
          <street>10 Technology Park Drive</street>

          <city>Westford, MA 01886</city>
<country>United States of America</country>
        </postal>

        <email>zzhang@juniper.net</email>
      </address>
    </author>

    <author fullname="Lili Wang" initials="L." surname="Wang">
      <organization>Juniper Networks, Inc.</organization>

      <address>
        <postal>
          <street>10 Technology Park Drive</street>

          <city>Westford, MA 01886</city>
          <country>United States of America</country> 
        </postal>

        <email>liliw@juniper.net</email>
      </address>
    </author>

    <author fullname="Acee Lindem" initials="A." surname="Lindem">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>301 Midenhall Way</street>
          <city>Cary, NC 27513</city>
<country>United States of America</country>
        </postal>
        <email>acee@cisco.com</email>
      </address>
    </author>
    <date month="December" year="2016"/>

    <abstract>
      <t>
     This document specifies an optional OSPF protocol extension
     to represent router metrics in a multi-access network in two parts: the
     metric from the router to the network and the metric from the network
     to the router.  For such networks, the router-to-router metric
     for OSPF route computation is the sum of the two parts.
     This document updates RFC 2328.
      </t>
    </abstract>

   </front>

  <middle>
    <section title="Introduction">

      <t>With Open Shortest Path First (OSPF) <xref target="RFC2328"/> <xref target="RFC5340"/>), a Network-LSA (Link State Advertisement) is advertised to list all
         routers on a broadcast network. Additionally, each router on the
	 broadcast network includes
         a link in its Router-LSA to describe its connection to the network.
         The link in the Router-LSA includes a metric but the listed routers
         in the Network-LSA do not include a metric. This is based on the
         assumption that from a particular router, all others on the same
         network can be reached with the same metric.</t>

      <t>With some broadcast networks, different routers can be reached with
         different metrics. <xref target="RFC6845"/> extends the OSPF protocol 
         with a hybrid interface type for that kind of broadcast network, where
         no Network-LSA is advertised and Router-LSAs simply include
	 point-to-point links to
         all routers on the same network with individual metrics.
         Broadcast capability is still used to optimize database
         synchronization and adjacency maintenance.</t>

       <t>This works well for broadcast networks where the metric between
          different pairs of routers are really independent, for example,
          Virtual Private LAN Service (VPLS) networks.</t>

       <t>With certain types of broadcast networks, further optimization can be
          made to reduce the size of Router-LSAs and the number of updates.</t>

       <t>Consider a satellite radio network with fixed and mobile ground terminals. All
          communication goes through the satellite. When the mobile terminals
          move about, their communication capability may change. 
When OSPF
          runs over the radio network, <xref target="RFC6845"/> hybrid interface can be used, but 
          with the following drawbacks.</t>

       <t>Consider that one terminal/router moves into an area where its
          communication capability degrades significantly. Through the radio
          control protocol, all other routers determine that the metric to this
          particular router changed and they all need to update their Router-LSAs
          accordingly. In addition, the router in question determines that its metric to reach
          all others also changed and it needs to update its Router-LSA.
          Consider that there could be many terminals and many of
          them can be moving fast and frequently. The number and frequency of
          updates of those large Router-LSAs could inhibit network scaling.</t>
    <section 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"/>.
      </t>
    </section>
    </section>
    <section title="Proposed Enhancement">

      <t>Notice that in the above scenario, when one terminal's communication
         capability changes, its metric to all other terminals and the metric
	 to it from all other terminals will all change in a similar fashion. Given this,
         the above problem can be easily addressed by breaking the metric
         into two parts: the metric to the satellite and the metric from
         the satellite. The metric from terminal R1 to R2 would be the sum
         of the metric from R1 to the satellite and the metric from the
         satellite to R2.</t>

      <t>Instead of using the hybrid interface type
      described in <xref target="RFC6845"/>, 
         the network is treated as a regular broadcast network. A router on the 
         network no longer lists individual metrics to each neighbor in its
         Router-LSA. Instead, each router advertises the metric from the
         network to itself in addition to the normal metric for the network.
         With the normal Router-to-Network and additional Network-to-Router
         metrics advertised for each router, individual Router-to-Router
         metrics can be calculated.</t>

      <t>With the proposed enhancement, the size of the Router-LSA will be
         significantly reduced. In addition,
         when a router's communication capability changes, only that router
         needs to update its Router-LSA.</t>

      <t>Note that while the example uses the satellite as the relay point
         at the radio level (layer 2), the satellite does not 
         participate in packet forwarding at layer 3. In fact, the satellite does not
         need to run any layer-3 protocol.
         Therefore, for generality, the metric is abstracted as to/from the
         "network" rather than specifically to/from the "satellite".</t>
    </section>

    <section title="Specifications" anchor='spec'>
      <t>The following specifications are added to or modified from
         the base OSPF protocol. If an area contains one or more two-part
         metric networks, then all routers in the area MUST support the
         extensions specified herein. This is ensured by procedures described
         in <xref target="backward"/>.</t>
      <section title="Router Interface Parameters">
      <t>The "Router interface parameters" have the following additions:
         <list style="symbols">
         <t>Two-part metric: TRUE if the interface connects to a
            multi-access network that uses a two-part metric. All routers
            connected to the same network SHOULD have the same configuration
            for their corresponding interfaces.</t>
         <t>Interface input cost: Link-state metric from the two-part-metric
            network to this router. Defaults to "Interface output cost" but is
            not valid for normal networks using a single metric. May be configured or
            dynamically adjusted to a value different from the "Interface
            output cost".<vspace blankLines="100"/></t>
         </list>
      </t>
      </section>
      <section title="Advertising Network-to-Router Metric in OSPFv2">
      <t>For OSPFv2, the Network-to-Router metric is encoded in an
         OSPF Extended Link TLV Sub-TLV <xref target="RFC7684"/>,
         defined in this document as the Network-to-Router Metric
         Sub-TLV. The type of the sub-TLV is 4. The length of the sub-TLV
         is 4 (for the value part only). The value part of the sub-TLV
         is defined as follows:
      <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      MT-ID    |        0      |          MT Metric            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
    </figure>
     </t>
     <t>
         Multiple such sub-TLVs can exist in a single OSPF Extended Link TLV,
         one for each topology <xref target="RFC4915"/>. 
         Each sub-TLV will have a unique Multi-Topology Identifier (MT-ID) and 
         will adhere to the advertisement rules defined in Section 3.4 of 
         <xref target="RFC4915"/>. 
         The OSPF Extended Link TLV identifies the
         transit link to the network and is part of an OSPFv2 Extended-Link
         Opaque LSA. The sub-TLV MUST ONLY appear in Extended-Link TLVs
         for Link Type 2 (link to transit network) and MUST be ignored
         if received for other link types.
      </t>
      </section>
      <section title="Advertising Network-to-Router Traffic Engineering (TE) Metric" anchor='tecost'>
      <t>
         A Traffic Engineering Network-to-Router Metric Sub-TLV
         is defined, similar to the Traffic Engineering Metric
         Sub-TLV defined in Section 2.5.5 of <xref target="RFC3630"/>. The only
         difference is the TLV type, which is 35. The sub-TLV
         MUST only appear in Type 2 Link TLVs (Multi-access)

         of Traffic Engineer LSAs (OSPF2) or Intra-Area-TE-LSAs
         (OSPFv3) <xref target="RFC5329"/>, and MUST appear at most once in
         such a Link TLV.
      </t>
      </section> 
     <section title="Advertising Network-to-Router Metric in OSPFv3" anchor='v3cost'>
     <t>Network-to-Router metric advertisement in OSPFv3 Extended Router-LSA
     <xref target="OSPFV3-EXTENDED-LSA"/> will be described in a separate 
        document.</t>
     </section> 
     <section title="OSPF Stub Router Behavior">
      <t>When an OSPF router with interfaces to multi-access networks using two-part metrics is advertising itself as a stub router <xref target="RFC6987"/>, only the
         Router-to-Network metric in the stub router's OSPF Router-LSA links
         for those networks is set to the MaxLinkMetric. This is fully backward compatible and 
         will result in the same behavior as described in <xref target="RFC6987"/>. 
      </t>
      </section>
      <section title="SPF Calculation">
    <t>
    The first stage of the shortest-path tree calculation is described
    in Section 16.1 of <xref target="RFC2328"/>.  With a two-part metric, when a vertex 
    V corresponding to a Network-LSA
    has just been added to the Shortest Path Tree (SPT) and an adjacent vertex W 
    (joined by a link in V's corresponding Network-LSA) is being added to
    the candidate list, the cost from V to W (W's network-to-router cost) is determined 
    as follows:
         <list style="symbols">
         <t>For OSPFv2, if vertex W has a corresponding Extended-Link Opaque LSA
            with an Extended Link TLV for the link from W to V, and the Extended Link TLV
            has a Network-to-Router Metric Sub-TLV for the corresponding topology,
            then the cost from V to W is the metric in the sub-TLV. Otherwise, the cost is 0.</t>
         <t>OSPFv3 <xref target="RFC5340"/> Shortest Path First (SPF) changes will be described 
            in a separate document.</t> 
         </list>
      </t>
      </section>
      <section title="Backward Compatibility" anchor="backward">
      <t>Due to the change of procedures in the SPF calculation,
         all routers in an area that includes one or more
         two-part metric networks must support the changes specified in this document.
         To ensure that, if an area is provisioned to support two-part metric networks,
         all routers supporting this capability must advertise a
         Router Information (RI) LSA with a Router Functional Capabilities TLV
         <xref target="RFC7770"/> that includes the following Router Functional Capability Bit:
          <figure>
              <artwork><![CDATA[
          Bit       Capabilities
    
          6         Two-Part Metric support
              ]]></artwork>
          </figure>
      </t>
      <t>Upon detecting the presence of a
         reachable Router-LSA without a companion RI LSA that has the bit set,
         all routers MUST recalculate routes without considering any
         network-to-router costs.
       </t>
      </section>
    </section>
    <section anchor="IANA" title="IANA Considerations">
      <t>IANA has made the following assignments per this document:
         <list style="symbols">
         <t>Two-Part Metric support (6) was added to the "OSPF Router
	 Informational Capability Bits" registry.
         </t>
         <t>Network-to-Router Metric Sub-TLV (4) has been added to the "OSPFv2
	 Extended Link TLV Sub-TLVs" registry. 
         </t>
         <t>Network-to-Router TE Metric Sub-TLV (35) has been added to the
	 "Types for sub-TLVs of TE Link TLV (Value 2)" registry. 
         </t>
         </list>
      </t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>
      This document does not introduce new security risks. 
      Existing security considerations in OSPFv2 and OSPFv3 apply.
      </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.3630'?>
      <?rfc include='reference.RFC.5329'?>
      <?rfc include='reference.RFC.7684'?>
      <?rfc include='reference.RFC.7770'?>
    </references>
    <references title="Informative References">
      <?rfc include='reference.RFC.5340'?>
      <?rfc include='reference.RFC.6845'?>
      <?rfc include='reference.RFC.6987'?>

      <!--draft-ietf-ospf-ospfv3-lsa-extend-13 IESG state: I-D Exists -->

<reference anchor="OSPFV3-EXTENDED-LSA">
<front>
<title>OSPFv3 LSA Extendibility</title>
<author initials="A" surname="Lindem" fullname="Acee Lindem"><organization/></author>
<author initials="S" surname="Mirtorabi" fullname="Sina Mirtorabi"><organization />
</author>
<author initials="A" surname="Roy" fullname="Abhay Roy"><organization /></author>
<date day="21" month="October" year="2016" />

</front>
<seriesInfo name="Work in Progress,"
	    value="draft-ietf-ospf-ospfv3-lsa-extend-13.txt" />
<format type="TXT"
	target="http://www.ietf.org/internet-drafts/draft-ietf-ospf-ospfv3-lsa-extend-13.txt"
	/>
</reference>


    </references>
    <section anchor="Acknowledgements" title="Acknowledgements" numbered="no">
      <t>The authors would like to thank Abhay Roy,
         Hannes Gredler, Peter Psenak, and Eric Wu for their comments
         and suggestions.</t>
      
    </section>
   <?rfc needLines="100"?>
   <section title="Contributors" numbered="no">
   <figure>
   <artwork>  

David Dubois
General Dynamics C4S
400 John Quincy Adams Road
Taunton, MA 02780
United States of America
Email: dave.dubois@gd-ms.com

Vibhor Julka
Individual Contributor

Email: vjulka1@yahoo.com


Tom McMillan
L3 Communications, Linkabit
9890 Towne Centre Drive
San Diego, CA 92121
United States of America
Email: tom.mcmillan@l-3com.com

   </artwork> 
   </figure>
  </section>
  </back>
</rfc>
