<?xml version="1.0" encoding="UTF-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     version="3"
     ipr="trust200902"
     docName="draft-mauch-bgp-nh-mtu-00"
     category="std"
     submissionType="IETF"
     consensus="true"
     sortRefs="true"
     symRefs="true"
     tocInclude="true">
  <front>
    <title abbrev="BGP Next Hop MTU">BGP Next Hop MTU Attribute</title>
    <seriesInfo name="Internet-Draft" value="draft-mauch-bgp-nh-mtu-00"/>
    <author fullname="Jared Mauch" initials="J." surname="Mauch">
      <organization>Akamai</organization>
      <address>
        <email>jared@akamai.com</email>
      </address>
    </author>
    <date year="2026" month="October" day="28"/>
    <area>Routing</area>
    <workgroup>Network Working Group</workgroup>
    <keyword>BGP</keyword>
    <keyword>MTU</keyword>
    <keyword>NEXT_HOP_MTU</keyword>

    <abstract>
      <t>
        This document defines NEXT_HOP_MTU, an optional non-transitive
        BGP path attribute (type code TBD).  It carries the IP MTU a
        speaker promises is acceptable for an NLRI across one network
        boundary.  The speaker that receives the NLRI across that
        boundary may attach the attribute from the boundary interface
        MTU and advertise it on internal and external sessions.  The
        intent is to communicate network MTU capability so that
        devices can use that information to improve the efficiency of
        their communications.
      </t>
    </abstract>

    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>
        This document is an individual submission intended for
        consideration by the Inter-Domain Routing (IDR) Working Group.
        Discussion takes place on the IDR mailing list (idr@ietf.org),
        which is archived at
        <eref target="https://mailarchive.ietf.org/arch/browse/idr/"/>.
      </t>
    </note>
  </front>

  <middle>
    <section anchor="sec-introduction">
      <name>Introduction</name>
      <t>
        Operators often configure a network boundary to accept IP
        packets larger than 1500 octets (for example, 9000).  Internal
        hosts and routers can use that size only if they learn it.
        BGP advertises the NLRI but has no way to carry the boundary
        IP MTU with the route.  Extending the path attributes carried
        with the NLRI to pass that network-boundary information is
        useful to mitigate the negative impacts of Path MTU Discovery
        (<xref target="RFC1191"/>, <xref target="RFC4821"/>) and IPv6
        Packet Too Big handling (<xref target="RFC8201"/>).
      </t>
      <t>
        NEXT_HOP_MTU is an optional, non-transitive path attribute.
        The speaker that receives an NLRI across a network boundary
        may attach a 32-bit IP MTU for that boundary and advertise it
        with the route.  The value is a promise that an IP packet of
        that size, destined to the NLRI, is acceptable across that
        boundary.  It is not a Path MTU
        (<xref target="RFC8201"/>, <xref target="RFC1191"/>,
        <xref target="RFC4821"/>).  BGP-LS can carry per-link MTU in a
        topology (<xref target="RFC9552"/>,
        <xref target="I-D.ietf-idr-bgp-ls-link-mtu"/>); this attribute
        attaches the promise to an ordinary unicast NLRI.
      </t>
      <t>
        This document uses the BGP terminology of
        <xref target="RFC4271"/> and <xref target="RFC4760"/>.  IP MTU
        means the largest IP packet, in octets, that can cross a link
        in one piece (IP header and payload; link-layer framing
        excluded).  Network boundary means the edge interface across
        which the route was learned and toward which traffic for the
        NLRI is forwarded.
      </t>

      <section anchor="sec-requirements">
        <name>Requirements Language</name>
        <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 14
          <xref target="RFC2119"/> <xref target="RFC8174"/>
          when, and only when, they appear in all capitals, as shown
          here.
        </t>
      </section>
    </section>

    <section anchor="sec-attribute">
      <name>NEXT_HOP_MTU Attribute</name>
      <t>
        NEXT_HOP_MTU is optional and non-transitive.  IANA assigns the
        type code (TBD; <xref target="sec-iana"/>).  The attribute
        applies to every NLRI in the UPDATE that carries it.  It is a
        path attribute, not part of the NLRI encoding
        (<xref target="RFC4271"/>, <xref target="RFC4760"/>).
      </t>
      <t>
        The attribute is defined for IPv4 unicast (AFI 1, SAFI 1) and
        IPv6 unicast (AFI 2, SAFI 1).  A speaker MUST NOT attach it to
        any other AFI/SAFI.
      </t>

      <section anchor="sec-encoding">
        <name>Encoding</name>
        <t>
          The attribute uses the three-octet header of
          <xref target="RFC4271"/> followed by a four-octet value.
          The Extended Length bit is clear.
        </t>
        <figure anchor="fig-format">
          <name>NEXT_HOP_MTU encoding</name>
          <artwork type="ascii-art" align="left"><![CDATA[
 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Flags     |  Type (TBD)   |  Length (4)   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IP MTU                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <t>
          When attaching the attribute, the flags octet MUST be 0x80
          (Optional set; Transitive, Partial, Extended Length, and
          reserved bits clear).  The length is 4.  Unrecognized
          optional non-transitive attributes are ignored and not
          propagated (<xref target="RFC4271"/>).
        </t>
        <t>
          IP MTU is an unsigned 32-bit integer in network byte order:
          the maximum acceptable IP packet size across the network
          boundary for the NLRI (IPv6 header and payload included;
          see <xref target="RFC8200"/>).  This is a link / IP MTU, not
          the Jumbo Payload Length field of
          <xref target="RFC2675"/>.
        </t>
        <t>
          For IPv4 NLRI the value MUST be in the range 68 to 65535
          inclusive (<xref target="RFC791"/>).  For IPv6 NLRI the
          value MUST be in the range 1280 to 4294967295 inclusive.
          Without the Jumbo Payload option, the largest IPv6 packet
          is 65575 octets (40-octet IPv6 header plus a Payload Length
          of 65535).  Values from 1280 to 65575 inclusive are
          therefore ordinary IPv6 IP MTUs.  Values greater than or
          equal to 65576 indicate a jumbogram-capable boundary:
          <xref target="RFC2675"/> requires a link MTU greater than
          65575 before jumbograms can be sent, and such a promise is
          useful only where nodes will send and receive the Jumbo
          Payload option.
        </t>
      </section>
    </section>

    <section anchor="sec-procedures">
      <name>Procedures</name>

      <section anchor="sec-boundary">
        <name>Network Boundary</name>
        <t>
          The network boundary is the interface on which the receiving
          speaker forwards toward the BGP next hop when that interface
          is the edge the route was learned across.  For a directly
          connected external session, that is the session interface.
          The boundary IP MTU is that interface's IP MTU for the NLRI
          address family.
        </t>
        <t>
          A speaker MUST NOT replace NEXT_HOP_MTU with the MTU of an
          internal interface when readvertising a route learned across
          a different edge.  For multi-hop external sessions, the
          speaker MUST NOT invent a boundary from an unrelated
          interface.  It MAY attach a configured promissory value for
          that neighbor; the configured value MUST be less than or
          equal to the IP MTU of the interface that forwards toward
          the next hop.
        </t>
      </section>

      <section anchor="sec-adding">
        <name>Attaching on Receipt</name>
        <t>
          A speaker that receives an NLRI across a network boundary
          MAY attach NEXT_HOP_MTU when installing and when advertising
          the route, whether or not the route arrived with the
          attribute.  The attached value is computed as follows:
        </t>
        <ol>
          <li>
            Let L be the boundary IP MTU.  If L cannot be determined,
            or is outside the range in <xref target="sec-encoding"/>
            for the address family, the speaker MUST NOT attach the
            attribute.
          </li>
          <li>
            If the received route has a valid NEXT_HOP_MTU value R and
            local policy accepts R from that neighbor, the attached
            value is min(L, R); otherwise it is L.
          </li>
          <li>
            Local policy MAY further reduce the value and MUST NOT
            increase it.  The result MUST remain in range for the
            address family.
          </li>
        </ol>
        <t>
          All NLRI in one UPDATE that carries NEXT_HOP_MTU MUST share
          the same value; otherwise they MUST be split across UPDATE
          messages.  Absence of the attribute means no promise.
        </t>
      </section>

      <section anchor="sec-sessions">
        <name>Advertisement</name>
        <t>
          Implementations MUST allow enabling and disabling attachment
          and acceptance of received values per neighbor and per
          AFI/SAFI.  Neither is required to be enabled by default.
        </t>
        <t>
          On an internal session, a speaker that does not forward the
          NLRI across a different boundary SHOULD advertise the
          attribute unchanged when the next hop is unchanged.  A route
          reflector that does not change the next hop SHOULD forward
          it unchanged (<xref target="RFC4456"/>).  The border speaker
          that attached the value in <xref target="sec-adding"/>
          SHOULD include that value toward internal peers, including
          when it sets next hop to self.
        </t>
        <t>
          On an external session, the attached value MUST be the
          promise for traffic that crosses the boundary with that
          peer.  If the route already has a valid NEXT_HOP_MTU and the
          speaker knows the facing interface IP MTU, the attached
          value MUST be the minimum of the two (then reduced by local
          policy if applicable).  A speaker MUST NOT copy a promise
          for one boundary onto a different boundary without that
          minimum.  If the value cannot be determined, the attribute
          MAY be omitted.
        </t>
        <t>
          An originating speaker MAY attach NEXT_HOP_MTU using the IP
          MTU of the boundary it advertises across, subject to
          <xref target="sec-encoding"/>.  The receiving speaker may
          still attach from its own side whether or not the originator
          sent the attribute.
        </t>
      </section>

      <section anchor="sec-use">
        <name>Use of the Value</name>
        <t>
          Attaching NEXT_HOP_MTU promises that an IP packet destined to
          a covered NLRI, of size less than or equal to the value, is
          acceptable across the identified boundary (the interface
          permits it and the speaker will forward it).  Applications
          MAY use the value when sending toward the NLRI across that
          boundary.  A value greater than or equal to 65576 is a
          jumbogram-capable promise and is useful only where the
          sender and the boundary support the Jumbo Payload option
          (<xref target="RFC2675"/>).  NEXT_HOP_MTU MUST NOT by itself
          change the BGP Decision Process (<xref target="RFC4271"/>).
          Path MTU Discovery and IPv6 Packet Too Big handling remain
          required for the minimum MTU of a full path
          (<xref target="RFC8201"/>, <xref target="RFC1191"/>).
        </t>
        <t>
          A speaker MAY program the value as a per-destination
          forwarding MTU only when every forwarding path for the NLRI
          carries a valid NEXT_HOP_MTU; the programmed value MUST be
          the minimum of those path values.  Otherwise it MUST NOT
          program a promissory MTU for the destination.
        </t>
        <t>
          When aggregating, a speaker MAY attach NEXT_HOP_MTU only if
          every included component has a valid value; the aggregate
          value MUST be the minimum of the component values.
          Otherwise omit the attribute from the aggregate.
        </t>
        <t>
          When the boundary IP MTU changes, the speaker that attached
          NEXT_HOP_MTU from that boundary MUST advertise a replacement
          route for each affected NLRI with the new value (or omit the
          attribute if it no longer makes a promise).
        </t>
      </section>
    </section>

    <section anchor="sec-example">
      <name>Example</name>
      <t>
        In <xref target="fig-topology"/>, Router A in AS 65000
        advertises 2001:db8::/48 to Router B in AS 65001.  The
        boundary permits an IP payload of 9000 octets.  Router B adds
        NEXT_HOP_MTU with value 9000 (0x00002328) and advertises it to
        Router C over iBGP.  The same receive-and-attach procedure
        applies in the reverse direction.
      </t>
      <figure anchor="fig-topology">
        <name>AS 65000 and AS 65001 exchange 2001:db8::/48</name>
        <artwork type="ascii-art" align="left"><![CDATA[
     AS 65000                         AS 65001

+---------------+            +---------------+
| Router A      |=== eBGP ===| Router B      |
| 2001:db8:1::1 | IP payload | 2001:db8:1::2 |
| advertises    |    9000    | receives NLRI |
| 2001:db8::/48 |   octets   | adds NH-MTU   |
+---------------+            | value 9000    |
                             +---------------+

                                     |
                                     | iBGP
                                     | NH-MTU 9000
                                     v
                             +---------------+
                             | Router C      |
                             | internal      |
                             | application   |
                             +---------------+
]]></artwork>
      </figure>
      <t>
        The boundary addresses (2001:db8:1::1 and 2001:db8:1::2) are
        outside the advertised prefix.  If Router B sets next hop to
        self toward Router C, NEXT_HOP_MTU remains 9000 because
        traffic still crosses the same boundary.
      </t>
    </section>

    <section anchor="sec-errors">
      <name>Error Handling</name>
      <t>
        A NEXT_HOP_MTU attribute is malformed if it appears more than
        once in the UPDATE, its length is not 4, or its flags are not
        exactly 0x80.  Malformed NEXT_HOP_MTU attributes use attribute
        discard (<xref target="RFC7606"/>): discard the attribute,
        process the UPDATE as if it were absent, and MUST NOT
        session-reset or treat the NLRI as withdrawn.
      </t>
      <t>
        A speaker MUST NOT use a NEXT_HOP_MTU value as a promissory MTU
        when the value is 0, when the UPDATE carries IPv4 NLRI and the
        value is outside 68..65535, when the UPDATE carries IPv6 NLRI
        and the value is less than 1280, or when the UPDATE carries
        NLRI for an AFI/SAFI other than IPv4 or IPv6 unicast.  In those
        cases the speaker treats the UPDATE as if the attribute were
        absent.
      </t>
    </section>

    <section anchor="sec-operational">
      <name>Operational Considerations</name>
      <t>
        Enable attachment toward the neighbors that should receive the
        promise, with the boundary interface MTU configured
        accordingly.  If a received value is accepted, the propagated
        value is min(local boundary MTU, received value).  This
        document makes no changes to IPv6 Packet Too Big
        (<xref target="RFC8201"/>), IPv4 Path MTU Discovery
        (<xref target="RFC1191"/>), or Packetization Layer Path MTU
        Discovery (<xref target="RFC4821"/>) behavior.
      </t>
    </section>

    <section anchor="sec-iana">
      <name>IANA Considerations</name>
      <t>
        IANA is requested to assign a code point from the BGP Path
        Attributes registry for NEXT_HOP_MTU (optional,
        non-transitive; value field four octets), as shown in
        <xref target="tab-iana"/>.  The RFC Editor is asked to replace
        TBD throughout this document with the assigned code point.
      </t>
      <table anchor="tab-iana">
        <name>BGP Path Attributes registry addition</name>
        <thead>
          <tr>
            <th>Value</th>
            <th>Code</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>TBD</td>
            <td>NEXT_HOP_MTU</td>
            <td>This document</td>
          </tr>
        </tbody>
      </table>
    </section>

    <section anchor="sec-adjacent" removeInRFC="true">
      <name>Notes on Adjacent Work</name>
      <t>
        This note records adjacent work encountered while preparing
        this document.  It is not normative.
      </t>
      <t>
        <xref target="I-D.blahaj-idr-bgp-mtu"/> proposes signalling
        Path MTU via a BGP capability and an optional non-transitive
        Path MTU path attribute.  That work accumulates a path-scoped
        MTU along the route and uses a narrower value field.  This
        document instead attaches a promissory IP MTU for one network
        boundary to an ordinary unicast NLRI and does not define a
        path-minimum attribute.  An editor's copy is available at
        <eref target="https://theenbyperor.github.io/draft-blahaj-idr-bgp-mtu/draft-blahaj-idr-bgp-mtu.html"/>.
      </t>
      <t>
        <xref target="I-D.ietf-idr-bgp-ls-link-mtu"/> carries a
        per-link MTU in BGP-LS (IANA TLV 1104).  That is topology
        input for controllers, not a path attribute on IPv4/IPv6
        unicast routes.  The BGP-LS value is two octets and therefore
        cannot represent jumbogram-sized IP MTUs.
      </t>
    </section>

    <section anchor="sec-security">
      <name>Security Considerations</name>
      <t>
        An overstated value can cause packet loss; an understated
        value reduces efficiency.  Deriving the attached value from
        the local interface MTU limits overstatement by a peer.
        Accepting a received value can only reduce the attached value
        (via the minimum) but can propagate an understated promise;
        operators SHOULD accept received values from external peers
        only when those peers are trusted.
      </t>
    </section>
  </middle>

  <back>
    <references>
      <name>Normative References</name>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.791.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4760.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7606.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8200.xml"/>
    </references>
    <references>
      <name>Informative References</name>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1191.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2675.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4456.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4821.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8201.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9552.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-bgp-ls-link-mtu.xml"/>
      <reference anchor="I-D.blahaj-idr-bgp-mtu"
                 target="https://theenbyperor.github.io/draft-blahaj-idr-bgp-mtu/draft-blahaj-idr-bgp-mtu.html">
        <front>
          <title>Signalling Path MTU via BGP Attributes</title>
          <author fullname="Q. Misell" initials="Q." surname="Misell">
            <organization/>
          </author>
          <date year="2024" month="December"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-blahaj-idr-bgp-mtu"/>
      </reference>
    </references>
  </back>
</rfc>
