<?xml version='1.0' encoding='utf-8'?> version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent" [
 <!ENTITY rfc7911 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7911.xml'> nbsp    "&#160;">
 <!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"> zwsp   "&#8203;">
 <!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml"> nbhy   "&#8209;">
 <!ENTITY RFC4271 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
    <!ENTITY RFC7854 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7854.xml">
    <!ENTITY RFC5226 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml"> wj     "&#8288;">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-ietf-grow-bmp-local-rib-12" number="9069" ipr="trust200902" submissionType="IETF" category="std" consensus="true" updates="7854" obsoletes="" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">

  <!-- xml2rfc v2v3 conversion 3.3.0 -->
  <front>
    <title abbrev="BMP Loc-RIB">
            Support for Local RIB in the BGP Monitoring Protocol (BMP)</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-grow-bmp-local-rib-12"/> name="RFC" value="9069"/>
    <author fullname="Tim Evens" initials="T" surname="Evens">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>2901 Third Avenue, Suite 600</street>
	  <city>Seattle</city>
          <region>WA</region>
          <code>98121</code>
          <country>USA</country>
          <country>United States of America</country>
        </postal>
        <email>tievens@cisco.com</email>
      </address>
    </author>
    <author fullname="Serpil Bayraktar" initials="S" surname="Bayraktar">
      <organization>Cisco Systems</organization>
      <organization>Menlo Security</organization>
      <address>
        <postal>
          <street>3700 Cisco Way</street>
          <city>San Jose</city>
          <street>800 W El Camino Real, Suite 250</street>
          <city>Mountain View</city>
          <region>CA</region>
          <code>95134</code>
          <country>USA</country>
          <code>94040</code>
          <country>United States of America</country>
        </postal>
        <email>serpil@cisco.com</email>
        <email>serpil.bayraktar@menlosecurity.com</email>
      </address>
    </author>
    <author fullname="Manish Bhardwaj" initials="M" surname="Bhardwaj">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>3700 Cisco Way</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>USA</country>
          <country>United States of America</country>
        </postal>
        <email>manbhard@cisco.com</email>
      </address>
    </author>
    <author fullname="Paolo Lucente" initials="P" surname="Lucente">
      <organization>NTT Communications</organization>
      <address>
        <postal>
          <street>Siriusdreef 70-72</street>
          <city>Hoofddorp</city>
          <code>2132</code>
          <region>WT</region>
          <country>NL</country>
        </postal>
        <email>paolo@ntt.net</email>
      </address>
    </author>
    <date year="2021"/> year="2022" month="February" />
    <area>General</area>
    <workgroup>Global Routing Operations</workgroup>
    <keyword>BGP</keyword>
    <keyword>BMP</keyword>
    <keyword>local-rib</keyword>
    <keyword>loc-rib</keyword>
    <abstract>
      <t>
                The BGP Monitoring Protocol (BMP) defines access to local Routing
                Information Bases (RIBs). This document updates BMP (RFC 7854) by
                adding access to the Local Routing Information Base (Loc-RIB), as
                defined in RFC 4271. The Loc-RIB contains the routes that have been                selected by the local BGP speaker's Decision Process.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="Introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
                This document defines a mechanism to monitor the BGP Loc-RIB state
                of remote BGP instances without the need to establish BGP peering
                sessions.

                BMP <xref target="RFC7854" format="default"/> does not define a method to send
                the BGP instance Loc-RIB.

                It does define locally originated routes in <xref target="RFC7854" format="default">section 8.2 of</xref> locally originated routes, sectionFormat="of" section="8.2"/>,
                but these routes are defined as the routes that originated into BGP. For example, as
                defined by BGP (e.g.,
                <xref target="RFC4271" format="default">Section 9.4 of</xref>. sectionFormat="of" section="9.4"/>). Loc-RIB
                includes all selected received routes from BGP peers in addition to locally
                originated routes.

      </t>
      <t>
                <xref target="FigAdjRibInLocRib" format="default"/> shows the flow of received routes from one or more BGP peers
                into the Loc-RIB.
      </t>
      <figure anchor="FigAdjRibInLocRib">
        <name>BGP peering Peering Adj-RIBs-In into Loc-RIB</name>
        <artwork align="center" name="" type="" alt=""><![CDATA[
    +------------------+      +------------------+
    | Peer-A           |      | Peer-B           |
/-- |                  | ---- |                  | --\
|   | Adj-RIB-In (Pre) |      | Adj-RIB-In (Pre) |   |
|   +------------------+      +------------------+   |
|                 |                         |        |
| Filters/Policy -|         Filters/Policy -|        |
|                 V                         V        |
|   +------------------+      +------------------+   |
|   | Adj-RIB-In (Post)|      | Adj-RIB-In (Post)|   |
|   +------------------+      +------------------+   |
|                |                          |        |
|      Selected -|                Selected -|        |
|                V                          V        |
|    +-----------------------------------------+     |
|    |                 Loc-RIB                 |     |
|    +-----------------------------------------+     |
|                                                    |
| ROUTER/BGP Instance                                |
\----------------------------------------------------/
]]></artwork>
      </figure>
      <t>
                The following are some use-cases use cases for Loc-RIB access:
      </t>
      <ul spacing="normal">
        <li>
            <t>
                        The Adj-RIB-In for a given peer Post-Policy post-policy may contain hundreds of
                        thousands of routes, with only a handful of routes selected and installed
                        in the Loc-RIB after best-path selection.
                        Some monitoring applications, such as ones those that need only to
                        correlate flow records to Loc-RIB entries, only need to collect
                        and monitor the routes that are actually selected and used.

            </t>
            <t>

                        Requiring the applications to collect all Adj-RIB-In Post-Policy post-policy
                        data forces the applications to receive a potentially
                        large unwanted data set and to perform the BGP decision process
                        selection, which includes having access to the interior gateway
                        protocol (IGP) next-hop metrics. While it is possible to obtain
                        the IGP topology information using BGP Link-State - Link State (BGP-LS),
                        it requires the application to implement shortest path first Shortest Path First (SPF)
                        and possibly constrained shortest path first Constrained Shortest Path First (CSPF) based on
                        additional policies. This is overly complex for such a
                        simple application that only needs to have access to the Loc-RIB.
            </t>

        </li>
        <li>
                        It is common to see frequent changes over many BGP peers, but
                        those changes do not always result in the router's Loc-RIB
                        changing. The change in the Loc-RIB can have a direct impact
                        on the forwarding state. It can greatly reduce the time to
                        troubleshoot and resolve issues if operators have the history of
                        Loc-RIB changes. For example, a performance issue might have
                        been seen for only a duration of 5 minutes. Post-facto
                        troubleshooting this issue without Loc-RIB history hides any
                        decision based
                        decision-based routing changes that might have happened during
                        those five 5 minutes.
        </li>
        <li>
                        Operators may wish to validate the impact of policies applied
                        to the Adj-RIB-In by analyzing the final decision made by the
                        router when installing into the Loc-RIB. For example, in order
                        to validate if multi-path multipath prefixes are installed as expected
                        for all advertising peers, the Adj-RIB-In Post-Policy post-policy and Loc-RIB
                        needs
                        need to be compared. This is only possible if the Loc-RIB
                        is available. Monitoring the Adj-RIB-In for this router from
                        another router to derive the Loc-RIB is likely to not show the same
                        installed prefixes. For example, the received Adj-RIB-In will
                        be different if ADD-PATH <xref target="RFC7911" format="default"/>
                        is not enabled or if the maximum supported number of equal paths is different
                        between Loc-RIB and advertised routes.
      </li>
      </ul>
      <t>
                This document adds Loc-RIB to the BGP Monitoring Protocol and
                replaces <xref target="RFC7854" format="default">Section 8.2 of</xref> Locally sectionFormat="of" section="8.2"/> ("Locally Originated Routes. Routes").
      </t>
      <section numbered="true" toc="default">
        <name>Alternative Method to Monitor Loc-RIB</name>
        <t>
                    Loc-RIB is used to build Adj-RIB-Out when advertising routes to a
                    peer. It is therefore possible to derive the Loc-RIB of a router by
                    monitoring the Adj-RIB-In Pre-Policy pre-policy from another router.
                    This becomes overly complex and error prone when considering the number
                    of peers being monitored per router.

        </t>
        <t>
        </t>
        <figure anchor="FigCurLocRibMon">
          <name>Alternative method Method to monitor Monitor Loc-RIB</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
/------------------------------------------------------\
|  ROUTER1 BGP Instance                                |
|                                                      |
|     +--------------------------------------------+   |
|     |                 Loc-RIB                    |   |
|     +--------------------------------------------+   |
|                    |                    |            |
|    +------------------+     +------------------+     |
|    |   Peer-ROUTER2   |     |   Peer-ROUTER3   |     |
|    | Adj-RIB-Out (Pre)|     | Adj-RIB-Out (Pre)|     |
|    +------------------+     +------------------+     |
|    Filters/Policy -|    Filters/Policy -|            |
|                    V                    V            |
|   +-------------------+     +-------------------+    |
|   | Adj-RIB-Out (Post)|     | Adj-RIB-Out (Post)|    |
|   +-------------------+     +-------------------+    |
|              |                          |            |
\------------- | ------------------------ | -----------/
          BGP  |                     BGP  |
          Peer |                     Peer |
   +------------------+          +------------------+
   |   Peer-ROUTER1   |          |   Peer-ROUTER1   |
/--|                  |--\    /--|                  | --\
|  | Adj-RIB-In (Pre) |  |    |  | Adj-RIB-In (Pre) |   |
|  +------------------+  |    |  +------------------+   |
|                        |    |                         |
| ROUTER2/BGP Instance   |    | ROUTER3/BGP Instance    |
\------------------------/    \-------------------------/
            |                              |
            v                              v
    ROUTER2 BMP Feed               ROUTER3 BMP Feed
]]></artwork>
        </figure>
        <t>
                    The setup needed to monitor the Loc-RIB of a router requires another
                    router with a peering session to the target router that is to be
                    monitored. As shown in <xref target="FigCurLocRibMon" format="default"/>, the
                    target router Loc-RIB is advertised via the Adj-RIB-Out
                    to the BMP router over a standard BGP peering session. The BMP
                    router then forwards the Adj-RIB-In Pre-Policy pre-policy to the BMP receiver.
        </t>
        <t>
                    A BMP lacking access to Loc-RIB introduces the need for additional
		    resources:
        </t>
        <ul spacing="normal">
          <li>
                    Requires at least two routers when only one router was to be
                    monitored.
          </li>
          <li>
                    Requires additional BGP peering to collect the received updates
                    when peering may have not have even been required in the first
                    place. For example, virtual routing and forwarding (VRF) tables
                    with no peers, redistributed BGP-LS with no peers, and
                    segment routing egress peer engineering where no
                    peers have link-state address family enabled are all
                    situations with no preexisting BGP peers.
          </li>
        </ul>
        <t>
                    Many complexities are introduced when using a received Adj-RIB-In
                    to infer a router Loc-RIB:

        </t>
        <ul spacing="normal">
          <li>
                    Adj-RIB-Out received as Adj-RIB-In from another router may have
                    a policy applied that filters, generates aggregates, suppresses
                    more specific prefixes, manipulates attributes, or filters routes. Not
                    only does this invalidate the Loc-RIB view, it adds complexity
                    when multiple BMP routers may have peering sessions to the same
                    router. The BMP receiver user is left with the error-prone task of
                    identifying which peering session is the best representative of
                    the Loc-RIB.
          </li>
          <li>
                    BGP peering is designed to work between administrative domains
                    and therefore does not need to include internal system level system-level
                    information of each peering router (e.g., the system name or
                    version information). In order to derive the Loc-RIB of a router,
                    the router name or other system information is needed. The BMP
                    receiver and user are forced to do some type of correlation using
                    what
                    whatever information is available in the peering session (e.g., peering
                    addresses, autonomous system numbers, and BGP identifiers).
                    This leads to error-prone correlations.
          </li>
          <li>
                    Correlating BGP identifiers (BGP-ID) and session addresses to a
                    router requires additional data, such as router inventory. This
                    additional data provides the BMP receiver the ability to map and
                    correlate the BGP-IDs and/or session addresses, addresses but requires the
                    BMP receiver to somehow obtain this data outside of the BMP. How this
                    data is obtained and the accuracy of the data directly affects affect the
                    integrity of the correlation.
          </li>
        </ul>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Terminology</name>
      <t>
		The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
		NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
		"MAY", "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
		NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
		"<bcp14>MAY</bcp14>", and "OPTIONAL" "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
		described in BCP 14 <xref target="RFC2119" format="default">RFC 2119</xref>
        <xref target="RFC8174" format="default">RFC 8174</xref> when, and only when, they
		appear in all capitals, as shown here.
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>Definitions</name>
      <ul spacing="normal">
        <li>
			BGP Instance: refers
<dl>

<dt>BGP Instance:</dt><dd>Refers to an instance of BGP-4 <xref target="RFC4271" format="default"/> format="default"/>,
			and considerations in <xref target="RFC7854" format="default">section 8.1 of</xref> do sectionFormat="of" section="8.1"/> apply to it.
        </li>
        <li>
            Adj-RIB-In: As it.</dd>
   <dt>Adj-RIB-In:</dt><dd>As defined in <xref target="RFC4271" format="default"/>, "The Adj-RIBs-In contains
            unprocessed routing information that has been advertised to the
            local BGP speaker by its peers." This is also referred to as the
            pre-policy Adj-RIB-In
            "pre-policy Adj-RIB-In" in this document.
        </li>
        <li>
            Adj-RIB-Out: As
        </dd>
        <dt>
            Adj-RIB-Out:</dt><dd>As defined in <xref target="RFC4271" format="default"/>, "The Adj-RIBs-Out contains
            the routes for advertisement to specific peers by means of the
            local speaker's UPDATE messages."
        </li>
        <li>
            Loc-RIB: As
        </dd>
        <dt>

            Loc-RIB:</dt><dd>As defined in <xref target="RFC4271" format="default">section 9.4 of</xref>, sectionFormat="of" section="1.1"/>, "The Loc-RIB
			contains the routes that have been selected by the local BGP speaker's Decision
            Process." Note that the Loc-RIB state as monitored through BMP might
            also contain routes imported from other routing protocols such as an IGP, IGP
            or local static routes.
        </li>
        <li>
        </dd>
        <dt>
            Pre-Policy Adj-RIB-Out: The Adj-RIB-Out:</dt><dd>The result before applying the outbound
            policy to an Adj-RIB-Out. This normally represents a similar view of the
            Loc-RIB but may contain additional routes based on BGP peering configuration.
        </li>
        <li>
        </dd>
        <dt>
            Post-Policy Adj-RIB-Out: Adj-RIB-Out:</dt><dd> The result of applying the outbound policy to
		an Adj-RIB-Out. This MUST <bcp14>MUST</bcp14> be what is actually sent to the peer.
        </li>
      </ul>
	    </dd>
	  </dl>
	</section>
	<section numbered="true" toc="default">
	  <name>Per-Peer Header</name>
	  <section anchor="PeerType" numbered="true" toc="default">
	    <name>Peer Type</name>
	    <t>
		A new peer type is defined for Loc-RIB to distinguish indicate that it
		represents the router Loc-RIB, which may have a route distinguisher (RD).
		<xref target="RFC7854" format="default">Section 4.2 of</xref> sectionFormat="of" section="4.2"/> defines a Local Instance
			    Peer type, which is for the case of non-RD peers that have an instance
		identifier.
	    </t>
	    <t>
		This document defines the following new peer type:
	    </t>

            <ul spacing="normal">
          <li>
            Peer
             <li>Peer Type = 3: Loc-RIB Instance Peer
              </li>
            </ul>
	  </section>

	  <section anchor="PeerFlags" numbered="true" toc="default">
	    <name>Peer Flags</name>
	    <t>
		If locally sourced routes are communicated
		      using BMP, they MUST <bcp14>MUST</bcp14> be conveyed using the Loc-RIB instance peer type. Instance Peer Type.
	    </t>
	    <t>
		The per-peer header flags for the Loc-RIB Instance Peer type Type are defined
		as follows:
	    </t>
	    <artwork align="center" name="" type="" alt=""><![CDATA[
     0 1 2 3 4 5 6 7
    +-+-+-+-+-+-+-+-+
    |F| | | | | | | |
    +-+-+-+-+-+-+-+-+
    ]]></artwork>
	    <ul spacing="normal">
	    <li>
		<t>
		    The F flag indicates that the Loc-RIB is filtered. This MUST <bcp14>MUST</bcp14> be
		    set when a filter is applied to Loc-RIB routes sent to the BMP
		    collector.

		</t>
		<t>

		    The unused bits are reserved for future use. They MUST <bcp14>MUST</bcp14> be
		    transmitted as 0 0, and their values MUST <bcp14>MUST</bcp14> be ignored on receipt.
		</t>
	    </li>
	    </ul>
	  </section>
	</section>
	<section numbered="true" toc="default">
	  <name>Loc-RIB Monitoring</name>
	  <t>
		    The Loc-RIB contains all routes selected by the BGP Decision Process as
		    described in <xref target="RFC4271" format="default">section 9.1 of</xref>. sectionFormat="of" section="9.1"/>. These
		    routes include those learned from BGP peers via its Adj-RIBs-In Post-Policy, post-policy, as
		    well as routes learned by other means as per <xref target="RFC4271" format="default">section 9.4 of</xref>. sectionFormat="of" section="9.4"/>.

		Examples of these include redistribution of routes from other protocols into BGP
		or those otherwise locally originated (i.e., aggregate routes).
      </t>
      <t>

    As described in <xref target="FilterLocRib" format="default"/>, a subset of Loc-RIB routes
    MAY
    <bcp14>MAY</bcp14> be sent to a BMP collector by setting the F flag.

      </t>
      <section numbered="true" toc="default">
        <name>Per-Peer Header</name>
        <t>
            All peer messages that include a per-peer header as defined in
            <xref target="RFC7854" format="default">section 4.2 of</xref>
	          MUST sectionFormat="of" section="4.2"/>
	          <bcp14>MUST</bcp14> use the following values:

        </t>
        <ul spacing="normal">
          <li>
        <dl>
          <dt>
                Peer Type: Set Type:</dt><dd>Set to 3 to indicate Loc-RIB Instance Peer.
          </li>
          <li>
          </dd>
          <dt>
                Peer Distinguisher: Zero filled Distinguisher:</dt><dd>Zero-filled if the Loc-RIB represents the
                global instance.  Otherwise  Otherwise, set to the route distinguisher or
                unique locally defined value of the particular instance to which the Loc-RIB belongs to.
          </li>
          <li> belongs.
          </dd>

          <dt>
		Peer Address: Address:</dt><dd> Zero-filled.  Remote  The remote peer address is not applicable.
		The V flag is not applicable with the Loc-RIB Instance peer type Peer Type
		considering addresses are zero-filed.
          </li>
          <li>
                Peer AS: Set zero-filled.
          </dd>
          <dt>
                Peer Autonomous System (AS):</dt><dd>Set to the primary router BGP autonomous system number (ASN).
          </li>
          <li>
          </dd>
          <dt>
                Peer BGP ID: ID:</dt><dd> Set the ID to the BGP router-id of the VRF instance if VRF is used; otherwise, set to the global or RD (e.g., VRF)
                specific router-id <xref target="RFC7854" format="default">section 1.1 of</xref>.
          </li>
          <li>
		Timestamp: The instance router-id.
          </dd>
          <dt>
		Timestamp:</dt><dd>The time when the encapsulated routes were installed in
		the Loc-RIB, expressed in seconds and microseconds since midnight
		(zero hour), January 1, 1970 (UTC).  If zero, the time is unavailable.
		Precision of the timestamp is implementation-dependent.
          </li>
        </ul> implementation dependent.
          </dd>
        </dl>
      </section>
      <section anchor="PeerUpNotify" numbered="true" toc="default">
        <name>Peer Up Notification</name>
        <t>
                Peer Up notifications follow <xref target="RFC7854" format="default">section 4.10 of</xref> sectionFormat="of" section="4.10"/> with the
                following clarifications:

        </t>
        <ul spacing="normal">
          <li>
       <dl>
          <dt>
                Local Address: Zero-filled, Address:</dt><dd> Zero-filled; the local address is not applicable.
          </li>
          <li>
          </dd>
          <dt>
                Local Port: Port:</dt><dd> Set to 0, 0; the local port is not applicable.
          </li>
          <li>
          </dd>
          <dt>
                Remote Port: Port:</dt><dd> Set to 0, 0; the remote port is not applicable.
          </li>
          <li>
          </dd>
          <dt>
                Sent OPEN Message: Message:</dt><dd> This is a fabricated BGP OPEN message.
                Capabilities MUST <bcp14>MUST</bcp14> include the 4-octet ASN and all necessary
                capabilities to represent the Loc-RIB route monitoring Route Monitoring messages.
                Only include capabilities if they will be used for Loc-RIB
                monitoring messages.  For example, if ADD-PATH is enabled for
                IPv6 and Loc-RIB contains additional paths, the ADD-PATH
                capability should be included for IPv6.  In the case of ADD-PATH,
                the capability intent of advertise, receive receive, or both can be ignored
           since the presence of the capability indicates enough that add- additional paths will be used for IPv6.
          </li>
          <li>
          </dd>
          <dt>
                Received OPEN Message: Message:</dt><dd> Repeat of the same Sent Open Message. sent OPEN message.  The
                duplication allows the BMP receiver to parse the expected
                received OPEN message as defined in <xref target="RFC7854" format="default">section 4.10 of</xref>.
          </li>
        </ul> sectionFormat="of" section="4.10"/>.
          </dd>
        </dl>
        <section anchor="PeerUpInfoTlv" numbered="true" toc="default">
          <name>Peer Up Information</name>
          <t>
                The following Peer Up information Information TLV type is added:
          </t>

          <ul spacing="normal">
            <li>
                <t>
                Type
                <t>Type = 3: VRF/Table Name.  The Information field contains a
                UTF-8 string whose value MUST <bcp14>MUST</bcp14> be equal to the value of the VRF or
                table name (e.g., RD instance name) being conveyed.  The string size
                MUST
                <bcp14>MUST</bcp14> be within the range of 1 to 255 bytes.
                </t>
                <t>
                The VRF/Table Name TLV is optionally included to support implementations
                that may not have defined a name.  If a name is configured, it MUST <bcp14>MUST</bcp14>
                be included.  The
                default value of "global" MUST <bcp14>MUST</bcp14> be used for the default Loc-RIB
                instance with a zero-filled distinguisher.
                If the TLV is included, then it MUST <bcp14>MUST</bcp14> also be included in the Peer
		Down notification.
                </t>
            </li>
          </ul>

                <t>The Information field contains a
                UTF-8 string whose value <bcp14>MUST</bcp14> be equal to the value of the VRF or
                table name (e.g., RD instance name) being conveyed.  The string size
                <bcp14>MUST</bcp14> be within the range of 1 to 255 bytes.
                </t>
                <t>
                The VRF/Table Name TLV is optionally included to support implementations
                that may not have defined a name.  If a name is configured, it <bcp14>MUST</bcp14>
                be included.  The
                default value of "global" <bcp14>MUST</bcp14> be used for the default Loc-RIB
                instance with a zero-filled distinguisher.

                If the TLV is included, then it <bcp14>MUST</bcp14> also be included in the Peer Down notification.
                </t>
          <t>
			Multiple TLVs of the same type can be repeated as part of the same message,
			for example example, to convey a filtered view of a VRF. A BMP receiver should append
			multiple TLVs of the same type to a set in order to support alternate or
			additional names for the same peer. If multiple strings are included, their
			ordering MUST <bcp14>MUST</bcp14> be preserved when they are reported.
          </t>
        </section>
      </section>
      <section anchor="PeerDownReasonCode" numbered="true" toc="default">
        <name>Peer Down Notification</name>
        <t>
            The Peer Down notification MUST <bcp14>MUST</bcp14> use reason code 6. Following the reason is data
		    in TLV format. The following Peer Down information Information TLV type is defined:

        </t>
        <ul spacing="normal">
          <li>
                Type = 3: VRF/Table Name.  The Information field contains a
                UTF-8 string whose value MUST <bcp14>MUST</bcp14> be equal to the value of the VRF or
                table name (e.g., RD instance name) being conveyed.  The string size
                MUST
                <bcp14>MUST</bcp14> be within the range of 1 to 255 bytes. The VRF/Table Name
				informational TLV MUST <bcp14>MUST</bcp14> be included if it was in the Peer Up.
      	  </li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>Route Monitoring</name>
        <t>
            Route Monitoring messages are used for initial synchronization of
            the Loc-RIB.  They are also used to convey incremental Loc-RIB
            changes.

        </t>
        <t>
            As defined described in <xref target="RFC7854" format="default">section 4.6 of</xref>, sectionFormat="of" section="4.6"/>, "Following the
		    common BMP header and per-peer header is a BGP Update PDU."
        </t>
        <section numbered="true" toc="default">
          <name>ASN Encoding</name>
          <t>
            Loc-RIB route monitor Route Monitoring messages MUST <bcp14>MUST</bcp14> use a 4-byte ASN encoding as indicated
            in the <xref target="PeerUpNotify" format="default">Peer Up sent OPEN message</xref> capability.
          </t>
        </section>
        <section numbered="true" toc="default">
          <name>Granularity</name>
          <t>
            State compression and throttling SHOULD <bcp14>SHOULD</bcp14> be used by a BMP sender
            to reduce the amount of route monitoring Route Monitoring messages that are
            transmitted to BMP receivers.  With state compression, only the
            final resultant updates are sent.
          </t>
          <t>
            For example, prefix 192.0.2.0/24 is updated in the Loc-RIB 5 times
            within 1 second. State compression of BMP route monitor Route Monitoring messages
            results in only the final change being transmitted. The other 4
            changes are suppressed because they fall within the compression
            interval. If no compression was being used, all 5 updates would
            have been transmitted.

          </t>
          <t>
            A BMP receiver should expect that Loc-RIB route monitoring the granularity of Loc-RIB Route Monitoring can be different by
            vary depending on the BMP sender implementation.
          </t>
        </section>
      </section>
      <section numbered="true" toc="default">
        <name>Route Mirroring</name>
        <t>
            <xref target="RFC7854" format="default">Section 4.7 of</xref>, sectionFormat="of" section="4.7"/>
            defines Route Mirroring for verbatim  duplication of messages received. This
            is not applicable to Loc-RIB as PDUs are originated by the router.
            Any received Route Mirroring messages SHOULD <bcp14>SHOULD</bcp14> be ignored.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Statistics Report</name>
        <t>
            Not all Stat Types are relevant to Loc-RIB.  The Stat Types that
            are relevant are listed below:
        </t>
        <ul spacing="normal">
          <li>
            Stat Type = 8: (64-bit Gauge) Number of routes in Loc-RIB.
          </li>
          <li>
            Stat Type = 10: Number of routes in per-AFI/SAFI Loc-RIB.  The
       value is structured as: 2-byte AFI, 1-byte SAFI, followed by a 64-
            bit 64-bit Gauge.
          </li>
        </ul>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Other Considerations</name>
      <section numbered="true" toc="default">
        <name>Loc-RIB Implementation</name>
        <t>
            There are several methods for a BGP speaker to implement Loc-RIB efficiently.
            In all methods, the implementation emulates a peer with Peer Up and Down
            messages to convey capabilities as well as Route Monitor messages to
            convey Loc-RIB.  In this sense, the peer that conveys the Loc-RIB is
            a locally emulated peer.
        </t>
        <section numbered="true" toc="default">
          <name>Multiple Loc-RIB Peers</name>
          <t>
            There MUST <bcp14>MUST</bcp14> be at least one emulated peer for each Loc-RIB instance,
            such as with VRFs. The BMP receiver identifies the Loc-RIB by the peer
            header distinguisher and BGP ID.  The BMP receiver uses the VRF/Table
            Name from the Peer Up information to associate a name to with the Loc-RIB.
          </t>
          <t>
            In some implementations, it might be required to have more than one
            emulated peer for Loc-RIB to convey different address families for
            the same Loc-RIB.  In this case, the peer distinguisher and BGP ID
            should be the same since they represent the same Loc-RIB instance.
            Each emulated peer instance MUST <bcp14>MUST</bcp14> send a Peer Up with the OPEN message
            indicating the address family capabilities.  A BMP receiver MUST <bcp14>MUST</bcp14>
            process these capabilities to know which peer belongs to which
            address family.
          </t>
        </section>
        <section anchor="FilterLocRib" numbered="true" toc="default">
          <name>Filtering Loc-RIB to BMP Receivers</name>
          <t>
            There maybe may be use-cases use cases where BMP receivers should only receive
            specific routes from Loc-RIB. For example, IPv4 unicast routes may
            include internal BGP (IBGP), external BGP (EBGP), and IGP IGP, but only
            routes from EBGP should be sent
            to the BMP receiver.  Alternatively, it may be that only IBGP and
            EBGP that should be sent and IGP redistributed routes should be excluded.  In these cases where the Loc-RIB is filtered, the F flag
            is set to 1 to indicate to the BMP receiver that the Loc-RIB is
            filtered. If multiple filters are associated to with the same Loc-RIB,
			a Table Name MUST table name <bcp14>MUST</bcp14> be used in order to allow a BMP receiver to make
			the right associations.
          </t>
        </section>
        <section numbered="true" toc="default">

<!-- start here -->
          <name>Changes to existing Existing BMP sessions</name> Sessions</name>
          <t>
			In case of any change that results in the alteration of behavior of
			an existing BMP session, ie. i.e., changes to filtering and table names, the
			session MUST <bcp14>MUST</bcp14> be bounced with a Peer Down/Peer Down / Peer Up sequence.
          </t>
        </section>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
        The same considerations as in <xref target="RFC7854" format="default">section 11 of</xref> sectionFormat="of" section="11"/> apply to this
        document. Implementations of this protocol SHOULD <bcp14>SHOULD</bcp14> require that sessions are only be established with
        authorized and trusted monitoring devices. It is also believed that this document does
        not add introduce any additional security considerations.
      </t>
    </section>

    <section numbered="true" toc="default">

      <name>IANA Considerations</name>
      <t>
        This document requests that
        IANA assign the following has assigned new parameters
        to the <eref target="https://www.iana.org/assignments/bmp-parameters/bmp-parameters.xhtml">
        BMP parameters name space</eref>. target="https://www.iana.org/assignments/bmp-parameters/">
        "BGP Monitoring Protocol (BMP) Parameters" registry</eref>.
      </t>
      <section numbered="true" toc="default">
        <name>BMP Peer Type</name>
        <t>
            This document defines a
        <t>IANA has registered the following new peer type (<xref target="PeerType" format="default"/>):

        </t>
        <ul spacing="normal">
          <li>
<table anchor="t1">
  <name>BMP Peer Type = 3: Loc-RIB Type</name>
  <thead>
    <tr>
      <th>Peer Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>3</td>
      <td>Loc-RIB Instance Peer
          </li>
        </ul> Peer</td>
    </tr>
  </tbody>
</table>

      </section>
      <section numbered="true" toc="default">
        <name>BMP Loc-RIB Instance Peer Flags</name>
        <t>
            This document requests
            IANA to rename has renamed "BMP Peer Flags" to
            "BMP Peer Flags for Peer Types 0 through 2" and create created a new registry
            named "BMP Peer Flags for Loc-RIB Instance Peer Type 3"

            This 3".</t>

           <t>This document defines that peer flags that are specific to the
           Loc-RIB instance peer type.
            As defined Instance Peer Type.  IANA has registered the following in (<xref target="PeerFlags" format="default"/>):

        </t>
        <ul spacing="normal">
          <li>
            Flag 0: The
           the "BMP Peer Flags for Loc-RIB Instance Peer Type 3" registry:</t>
<table anchor="t2">
  <name>Loc-RIB Instance Peer Type</name>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>F flag</td>
    </tr>
  </tbody>
</table>

<t>As noted in <xref target="PeerFlags"/>, the F flag indicates that the Loc-RIB is filtered.  This indicates that the Loc-RIB does not represent the complete routing table.
         </li>
        </ul> table.</t>
        <t>
         Flags 0 through 3 and 5 1 through 7 are unassigned.  The registration procedure for the
        registry is "Standards Action". Standards Action.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Peer Up Information TLV</name>
        <t>
            This document requests that
            IANA rename has renamed the "BMP Initiation Message TLVs" registry to "BMP Initiation and Peer Up Information TLVs." TLVs".
            <xref target="RFC7854" format="default">section 4.4 of</xref> defines sectionFormat="of" section="4.4"/> indicates that
            both Initiation and Peer Up share the same information TLVs.

            This document defines the following new BMP Peer Up information Information
            TLV type (<xref target="PeerUpInfoTlv" format="default"/>):

        </t>
        <ul spacing="normal">
          <li>
            Type = 3: VRF/Table Name.
            The format="default"/>):</t>
<table anchor="t3">
  <name>BMP Peer Up Information TLV Type</name>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>3</td>
      <td>VRF/Table Name</td>
    </tr>
  </tbody>
</table>

            <t>The Information field contains a UTF-8 string whose value MUST
            <bcp14>MUST</bcp14> be equal to the value of the VRF or table name
            (e.g., RD instance name) being conveyed.  The string size MUST
            <bcp14>MUST</bcp14> be within the range of 1 to 255 bytes.
          </li>
        </ul> bytes.</t>

      </section>
      <section numbered="true" toc="default">
        <name>Peer Down Reason code</name> Code</name>
        <t>
            This document defines
            IANA has registered the following new BMP Peer Down reason code
            (<xref target="PeerDownReasonCode" format="default"/>):

        </t>
        <ul spacing="normal">
          <li>
            Type = 6: Local format="default"/>):</t>

<table anchor="t4">
  <name>BMP Peer Down Reason Code</name>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>6</td>
      <td>Local system closed, TLV data follows.
          </li>
        </ul> follows</td>
    </tr>
  </tbody>
</table>

      </section>

      <section numbered="true" toc="default">
        <name>Deprecated Entries</name>
     <t>Per this document, IANA has marked the F Flag entry in the "BMP
        Peer Flags for Peer Types 0 through 2" registry as
        "deprecated".</t>
      </section>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      &RFC2119;
      &RFC8174;
      &RFC4271;
      &RFC5226;
      &RFC7854;
  <references>
    <name>References</name>
  <references>
    <name>Normative References</name>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7854.xml"/>

</references>
<references>
  <name>Informative References</name>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7911.xml"/>

    </references>
    <references title="Informative References">
      &rfc7911;
	  </references>

        <section anchor="Acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>
        The authors would like to thank John Scudder, Jeff Haas and Mukul Srivastava <contact fullname="John Scudder"/>, <contact fullname="Jeff Haas"/>, and <contact fullname="Mukul Srivastava"/>
		for their valuable input.
      </t>
    </section>
  </back>

</rfc>