<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp "&#160;">
  <!ENTITY zwsp "&#8203;">
  <!ENTITY nbhy "&#8209;">
  <!ENTITY wj "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     submissionType="IETF"
     docName="draft-gai-intarea-ip-tunnel-node-security-01"
     category="std"
     consensus="true"
     ipr="trust200902"
     xml:lang="en"
     symRefs="true"
     sortRefs="true"
     tocInclude="true"
     version="3">
  <front>
    <title abbrev="IP Tunnel Node Security">Security Requirements for IP Tunnel Nodes</title>
    <seriesInfo name="Internet-Draft" value="draft-gai-intarea-ip-tunnel-node-security-01"/>

    <author initials="L." surname="He" fullname="Lin He">
      <organization>Tsinghua University</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>he-lin@tsinghua.edu.cn</email>
      </address>
    </author>
    <author initials="L." surname="Gai" fullname="Le Gai">
      <organization>Tsinghua University</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>gl25@mails.tsinghua.edu.cn</email>
      </address>
    </author>
    <author initials="Z." surname="Jia" fullname="Zedong Jia">
      <organization>Tsinghua University</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>jzd25@mails.tsinghua.edu.cn</email>
      </address>
    </author>
    <author initials="Y." surname="Liu" fullname="Ying Liu">
      <organization>Tsinghua University</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>liuying@cernet.edu.cn</email>
      </address>
    </author>

    <date year="2026" month="September" day="9"/>
    <workgroup>Internet Area</workgroup>

    <abstract>
      <t>
        IP tunnels conceal passenger-packet fields from devices on the
        delivery path and create a new forwarding and policy boundary at
        decapsulation.  If a tunnel node accepts delivery packets from an
        unauthorized source, or if it forwards a decapsulated passenger
        packet without applying the policy for the exposed packet and
        forwarding domain, the node can enable source-address spoofing,
        unauthorized transit, policy bypass, or resource-exhaustion attacks.
      </t>
      <t>
        This document specifies generic security requirements for IP tunnel
        ingress, egress, and relay nodes.  The requirements cover explicit
        enablement, peer and passenger-packet authorization, source and
        forwarding-scope validation, nested tunneling, IPv6 extension
        headers, ICMP and Path MTU Discovery, resource controls, and
        telemetry.  They apply to configured IP-in-IP, IPv6 tunneling, GRE,
        and enabled IPv4/IPv6 transition mechanisms.  This document does not
        define a new encapsulation or replace protocol-specific processing
        rules.
      </t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>
        IP tunneling carries a passenger packet inside a delivery packet.
        The delivery header is routed across a delivery network, and a
        tunnel egress removes that encapsulation before locally delivering,
        forwarding, or re-encapsulating the exposed passenger packet.  This
        model is used by IP-in-IP <xref target="RFC2003"/>, generic packet
        tunneling in IPv6 <xref target="RFC2473"/>, Generic Routing
        Encapsulation (GRE) <xref target="RFC2784"/>, GRE over IPv6
        <xref target="RFC7676"/>, and IPv4/IPv6 transition mechanisms
        <xref target="RFC4213"/>.
      </t>
      <t>
        Encapsulation moves passenger source and destination addresses,
        upper-layer protocol identifiers, and ports away from their normal
        locations.  Consequently, security devices on the delivery path may
        be unable to apply controls that would have been applied to native
        traffic.  This concern is described for IP-in-IP in
        <xref target="RFC2003"/> and more generally in
        <xref target="RFC6169"/>.  Decapsulation then creates a trust
        boundary: acceptance of the delivery packet is not, by itself,
        authorization to deliver or forward the exposed passenger packet.
      </t>
      <t>
        This document consolidates generic requirements for making that
        boundary explicit, bounded, and observable.  It does not deprecate
        IP tunneling.  It also does not assume that every tunnel is a
        point-to-point tunnel; protocol-specific mechanisms such as 6to4
        require role- and direction-specific validation instead of a static
        peer-address check.
      </t>

      <section anchor="scope">
        <name>Scope and Relationship to Existing Specifications</name>
        <t>
          This document applies to hosts, routers, firewalls, tunnel brokers,
          customer-edge devices, provider-edge devices, and middleboxes that
          encapsulate, decapsulate, locally deliver, forward, or
          re-encapsulate IP passenger packets in IPv4 or IPv6 delivery
          packets.  The generic requirements apply to configured tunnels and
          to automatic or transition mechanisms only when those mechanisms
          are explicitly enabled.
        </t>
        <t>
          This document specifies no new packet format, authentication
          exchange, key-management protocol, ICMP message, or IANA code
          point.  It does not replace the TTL, Hop Limit, fragmentation,
          reassembly, ICMP, or MTU procedures in the specification for a
          particular tunnel.  An implementation claiming conformance with
          this document MUST also follow the applicable tunnel and passenger
          protocol specifications.  If a protocol-specific specification
          requires behavior that differs from a generic rule in this
          document, the protocol-specific behavior takes precedence.
        </t>
        <t>
          Link-layer tunnels, application-layer proxies, and non-IP
          passenger protocols are outside the normative scope.  The same
          design principles may be useful for them.  IPsec tunnel mode is
          not re-specified here; <xref target="RFC4301"/> defines the IPsec
          security architecture, and <xref target="RFC4891"/> discusses its
          use for IPv6-in-IPv4 tunnels.
        </t>
      </section>

      <section anchor="terminology">
        <name>Terminology</name>
        <dl newline="true" spacing="normal">
          <dt>Delivery packet and delivery header:</dt>
          <dd>
            The packet transmitted across a tunnel and the header used to
            deliver it to a tunnel egress.  These are also commonly called
            the outer packet and outer header.
          </dd>
          <dt>Passenger packet and passenger header:</dt>
          <dd>
            The packet carried by the tunnel and the header exposed by
            decapsulation.  These are also commonly called the inner packet
            and inner header.
          </dd>
          <dt>Tunnel node:</dt>
          <dd>
            A node that performs tunnel encapsulation, decapsulation, local
            delivery of a decapsulated packet, forwarding, or tunnel relay
            processing.
          </dd>
          <dt>Ingress tunnel node:</dt>
          <dd>
            A tunnel node that receives or originates a passenger packet and
            encapsulates it for delivery across a tunnel.
          </dd>
          <dt>Egress tunnel node:</dt>
          <dd>
            A tunnel node that receives a delivery packet, removes one
            tunnel encapsulation, and locally delivers or forwards the
            exposed passenger packet according to tunnel policy.
          </dd>
          <dt>Relay tunnel node:</dt>
          <dd>
            A tunnel node that decapsulates a packet and then forwards or
            re-encapsulates the exposed packet into another forwarding
            domain, address family, or tunnel.
          </dd>
          <dt>Tunnel peer:</dt>
          <dd>
            A remote tunnel ingress, egress, or relay that is authorized by
            a tunnel policy.  Authorization can be based on authenticated
            identity, configured topology, protocol-specific derivation, or
            a combination of these.
          </dd>
          <dt>Tunnel policy:</dt>
          <dd>
            The configuration and authenticated control-plane state that
            bind a delivery-packet selector and peer authorization context
            to permitted passenger packets, dispositions, forwarding
            domains, and resource limits.
          </dd>
          <dt>Nested encapsulation:</dt>
          <dd>
            Encapsulation in which a passenger packet is itself a tunnel
            packet, as defined by <xref target="RFC2473"/>.
          </dd>
          <dt>Recursive encapsulation:</dt>
          <dd>
            Encapsulation in which a packet reenters a tunnel before exiting
            it, as defined by <xref target="RFC2473"/>.  Recursive
            encapsulation is a hazardous special case of nested
            encapsulation.
          </dd>
          <dt>Decapsulation depth:</dt>
          <dd>
            The number of tunnel headers removed from a packet during a
            local processing sequence.
          </dd>
        </dl>
      </section>

      <section anchor="requirements-language">
        <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="threat-model">
      <name>Threat Model and Security Objectives</name>
      <t>
        The assets protected by this document are: (1) authorization of
        decapsulation, local delivery, forwarding, and re-encapsulation;
        (2) source-address validity and accountability for passenger
        traffic; (3) consistency between policy for native traffic and
        policy for traffic exposed by decapsulation; (4) separation among
        forwarding domains; and (5) data-plane and control-plane
        availability at the tunnel node.
      </t>
      <t>
        The attacker is assumed to be able to send delivery packets to an
        address of the tunnel node and to choose passenger headers,
        extension headers, fragments, and nested encapsulations.  Where
        source address spoofing is possible on the delivery network, the
        attacker may also choose a forged delivery source address.  The
        attacker may instead be an authorized tunnel peer that sends a
        passenger packet outside its authorized source, destination,
        protocol, or forwarding scope.
      </t>
      <t>
        The principal trust boundaries are the transition from the delivery
        network into tunnel processing, the transition from tunnel
        processing into a passenger forwarding domain, and every subsequent
        decapsulation or re-encapsulation boundary.  Successful attack
        events include unauthorized decapsulation, local delivery,
        forwarding, or re-encapsulation; acceptance of an unauthorized
        passenger source; placement of a packet in the wrong forwarding
        domain; bypass of a configured policy selector; and exhaustion of
        parsing, reassembly, logging, or control-plane resources.
      </t>
      <t>
        Administrative compromise of the tunnel node, compromise of
        cryptographic keys or authenticated control-plane state, and attacks
        on the cryptographic algorithms themselves are out of scope.  This
        document does not prevent an authorized peer from sending harmful
        traffic that remains within its authorized passenger scope.
        Address-based peer checks do not provide cryptographic data-origin
        authentication when delivery source addresses can be spoofed.
      </t>
    </section>

    <section anchor="processing-model">
      <name>Tunnel Node Processing Model</name>
      <t>
        A tunnel node compliant with this document applies the following
        logical stages to each candidate tunnel packet:
      </t>
      <ol spacing="normal" type="1">
        <li><t>Determine whether the addressed tunnel mechanism is enabled.</t></li>
        <li><t>Select a candidate tunnel policy using the local delivery address, delivery protocol, receiving interface or forwarding domain, and authenticated control-plane state.</t></li>
        <li><t>Validate the delivery source and destination and authorize the candidate peer for that policy.</t></li>
        <li><t>Perform delivery-packet processing required by the applicable IP and tunnel specifications, subject to resource limits.</t></li>
        <li><t>Authorize and perform exactly one decapsulation step.</t></li>
        <li><t>Validate the exposed passenger packet, including its address validity, authorized source, permitted destination and forwarding scope, fragmentation state, and any configured upper-layer policy.</t></li>
        <li><t>Apply the policy for the first processing depth at which each required selector is visible.</t></li>
        <li><t>Authorize local delivery, forwarding, re-encapsulation, or an additional decapsulation step.</t></li>
        <li><t>Update counters and emit any permitted, rate-limited logs or control messages.</t></li>
      </ol>
      <t>
        An implementation MAY combine these stages internally or execute
        them in a different order, but it MUST preserve their externally
        visible security properties.  In particular, a fast path MUST NOT
        forward, locally deliver, or re-encapsulate a packet solely because
        its delivery header matched a tunnel policy.
      </t>
      <t>
        Unless a protocol-specific specification requires another action, a
        packet that fails authorization or a configured validation rule MUST
        be discarded.  Failure of logging or telemetry export MUST NOT cause
        an otherwise unauthorized packet to be accepted.
      </t>
    </section>

    <section anchor="configuration">
      <name>Default Configuration and Policy Requirements</name>
      <t>
        Tunnel decapsulation and tunnel relay behavior MUST be disabled
        unless enabled by explicit configuration or authenticated
        control-plane state.  Support for an automatic tunnel mechanism does
        not constitute enablement.  A permissive, multipoint, or automatic
        mode MUST require explicit administrative action and MUST NOT be
        enabled merely by enabling IP forwarding.
      </t>
      <t>A tunnel policy MUST identify at least:</t>
      <ul spacing="normal">
        <li><t>the delivery and passenger address families and enabled encapsulation type;</t></li>
        <li><t>the local tunnel endpoint address or other local delivery selector;</t></li>
        <li><t>the expected receiving interface or delivery forwarding domain where that selector is stable;</t></li>
        <li><t>the authorized peer address set, authenticated peer identity, or protocol-specific peer-derivation rule;</t></li>
        <li><t>the passenger source prefixes, destination scope, and passenger protocols authorized for each peer or peer class;</t></li>
        <li><t>the permitted disposition and passenger forwarding domain;</t></li>
        <li><t>the permitted next tunnel policy, maximum decapsulation depth, and re-encapsulation behavior;</t></li>
        <li><t>IPv6 extension-header, fragmentation, ICMP, and PMTU handling policy; and</t></li>
        <li><t>per-peer, per-tunnel, and global resource, logging, and rate limits.</t></li>
      </ul>
      <t>
        By default, a policy MUST authorize removal of only the tunnel header
        that matched that policy.  A further decapsulation or
        re-encapsulation step MUST require an explicitly configured next
        policy.  This default is a local authorization rule; it does not
        replace the Tunnel Encapsulation Limit mechanism in
        <xref target="RFC2473"/>.
      </t>
      <t>
        When authenticated control-plane state is required to authorize a
        peer or passenger prefix, loss or expiration of that state MUST NOT
        authorize new decapsulation state.  Implementations SHOULD provide a
        bounded, operator-configurable behavior for existing state during
        control-plane failure.
      </t>
    </section>

    <section anchor="peer-auth">
      <name>Peer Authentication and Packet Authorization</name>
      <t>
        Peer authentication and packet authorization are distinct.
        Authentication establishes an identity or data origin.
        Authorization determines which delivery packets and passenger
        packets that identity may inject and where those packets may be
        delivered or forwarded.
      </t>
      <t>
        A configured tunnel crossing a network in which delivery source
        spoofing or on-path modification is within the threat model SHOULD
        use cryptographic data-origin authentication and integrity
        protection.  If a security decision depends on a peer identity that
        cannot be reliably established by the delivery topology, the tunnel
        node MUST use an authenticated mechanism.  IPsec
        <xref target="RFC4301"/> is one such mechanism; this document does
        not mandate a single mechanism.
      </t>
      <t>
        An address match, receiving interface, IPv6 Flow Label, local
        interface identifier, or predictable address format MUST NOT be
        represented as cryptographic peer authentication.  The GRE Key field
        defined by <xref target="RFC2890"/> identifies a logical traffic
        flow.  Absent an additional specification and protected secret
        provisioning, it MUST NOT be treated as cryptographic
        authentication.  Such fields MAY be used as authorization selectors
        after the applicable peer check has succeeded.
      </t>
      <t>
        Successful peer authentication MUST NOT, by itself, authorize every
        passenger source, destination, protocol, local service, forwarding
        domain, or deeper tunnel layer.  The tunnel node MUST bind the
        authenticated or configured peer to the complete tunnel policy used
        for the packet.  This requirement applies equally to packets that
        will be forwarded and packets addressed to a local service after
        decapsulation.
      </t>
      <t>
        Where the selected authentication mechanism provides anti-replay
        protection and replay is relevant to the deployment, operators
        SHOULD enable that protection.  Replay protection does not replace
        passenger-packet authorization.
      </t>
    </section>

    <section anchor="validation">
      <name>Address and Forwarding-Scope Validation</name>

      <section anchor="delivery-validation">
        <name>Delivery-Packet Validation</name>
        <t>
          Before decapsulation, a configured tunnel egress MUST verify that
          the delivery destination identifies a local enabled tunnel
          endpoint and that the delivery protocol, source address, receiving
          context, and any authentication result match the selected policy.
          For a configured IPv6-over-IPv4 tunnel, the IPv4 source-address
          check required by <xref target="RFC4213"/> applies.
        </t>
        <t>
          A node receiving packets for a standards-defined automatic or
          multipoint mechanism MUST apply that mechanism's role- and
          direction-specific consistency checks.  It MUST NOT substitute a
          static point-to-point source-address rule when the mechanism
          explicitly permits packets from a broader peer set.
        </t>
        <t>
          Delivery-source validation SHOULD also use the receiving interface
          and routing information where doing so is compatible with
          multihoming and asymmetric routing.  BCP 38
          <xref target="RFC2827"/> and BCP 84
          <xref target="RFC3704"/> <xref target="RFC8704"/> describe
          applicable source-address validation techniques.
        </t>
        <t>
          A packet that fails delivery-source, peer, or tunnel-policy
          validation MUST be discarded before its passenger packet is
          admitted to a forwarding or local-delivery path.  Unless an
          applicable specification requires an error, such a discard SHOULD
          be silent to avoid reflection and information disclosure.
        </t>
      </section>

      <section anchor="passenger-validation">
        <name>Passenger Source Validation</name>
        <t>
          After each decapsulation step, the tunnel node MUST validate the
          exposed passenger source address using the passenger address
          family's validity rules and the authorized source-prefix set or
          other source rule bound to the peer and tunnel policy.  An
          authenticated delivery packet does not exempt the passenger
          packet from this check.
        </t>
        <t>
          If the passenger source is invalid or outside its authorized
          scope, the packet MUST NOT be forwarded, re-encapsulated,
          reflected, or delivered to a local service.  The packet MUST be
          discarded unless an applicable protocol specification requires a
          different action.
        </t>
        <t>
          Before encapsulating a packet received from another node, a tunnel
          ingress MUST apply source-address validation appropriate to the
          passenger forwarding domain.  Operators SHOULD select strict,
          feasible-path, enhanced feasible-path, access-list, or equivalent
          validation according to the routing properties of the deployment.
          Strict uRPF SHOULD NOT be used where legitimate multihoming or
          asymmetry would cause unacceptable false drops.
        </t>
      </section>

      <section anchor="forwarding-validation">
        <name>Destination, Local-Delivery, and Forwarding-Scope Validation</name>
        <t>
          Before locally delivering or forwarding a decapsulated packet, a
          tunnel node MUST verify that the passenger destination, passenger
          protocol, requested disposition, and destination forwarding domain
          are permitted by the tunnel policy.  A forwarding domain or tenant
          context MUST NOT be selected solely from an unauthenticated packet
          field.
        </t>
        <t>
          A tunnel node MUST NOT provide arbitrary transit merely because a
          delivery packet reached an enabled tunnel endpoint.  A node
          intentionally providing transit MUST explicitly configure the
          authorized peer class, passenger source scope, passenger
          destination scope, and destination forwarding domain for that
          service.
        </t>
        <t>
          Policy that depends on passenger fields MUST be applied at the
          first processing depth at which those fields are visible.  If a
          later decapsulation step exposes a new passenger packet or new
          policy selectors, the node MUST perform a new authorization
          decision.  Authorization of a carrier packet MUST NOT be inherited
          as authorization of a newly exposed passenger flow.
        </t>
      </section>
    </section>

    <section anchor="nesting">
      <name>Nested and Recursive Tunneling</name>
      <t>
        A tunnel node that supports more than one local decapsulation step
        MUST maintain the decapsulation depth and selected policy chain for
        the packet.  It MUST perform another decapsulation only when the
        exposed packet matches an explicitly configured next tunnel policy.
        Recognition of an IP protocol number or GRE header alone is not
        sufficient authorization for the next step.
      </t>
      <t>
        An implementation MUST provide a configurable upper bound on local
        decapsulation depth and on the work performed for a nested packet.
        A packet that exceeds either bound MUST be discarded.  The bounds
        MUST be applied across fast and slow paths and MUST NOT be reset by a
        local forwarding-domain or interface transition.
      </t>
      <t>
        For IPv6 tunnel encapsulation, an implementation MUST process the
        Tunnel Encapsulation Limit option as specified in Section 4.1.1 of
        <xref target="RFC2473"/>.  In particular, a tunnel ingress examines
        an existing option, rejects a zero limit with the specified ICMPv6
        Parameter Problem behavior, decrements a nonzero limit when adding
        an encapsulation, and inserts a configured limit when required.  A
        local decapsulation-depth limit complements, but does not replace,
        this on-wire mechanism.
      </t>
      <t>
        Implementations MUST prevent loopback and routing-loop
        encapsulation.  IP-in-IP implementations MUST follow the routing
        failure checks in <xref target="RFC2003"/>, and IPv6 tunnel
        implementations SHOULD implement the configuration and packet checks
        in Sections 4.1.2 and 4.1.3 of <xref target="RFC2473"/>.  Automatic
        re-encapsulation of a decapsulated packet MUST be disabled unless an
        explicit route and tunnel policy authorize it.
      </t>
      <t>
        Peer authorization, passenger source validation, destination and
        forwarding-scope validation, extension-header policy, and resource
        accounting MUST be applied independently at every applicable layer.
      </t>
    </section>

    <section anchor="ipv6-eh">
      <name>IPv6 Extension Headers and Fragmentation Policy</name>
      <t>
        Decapsulation can expose an IPv6 header chain that was not visible to
        devices on the delivery path.  A tunnel node MUST therefore apply
        any configured passenger IPv6 policy after each decapsulation and
        before local delivery, forwarding, or re-encapsulation.  The policy
        and parser MUST conform to <xref target="RFC8200"/> and
        <xref target="RFC7045"/>.
      </t>
      <t>
        Decapsulation by itself is not justification for a blanket discard
        of packets containing standard IPv6 extension headers.  Consistent
        with <xref target="RFC7045"/>, a forwarding node that operates as a
        firewall MUST discard a packet containing a standard extension
        header only as the result of an intentionally configured policy and
        MUST be capable of permitting standard extension headers when
        configured to do so.
      </t>
      <t>
        If a configured policy requires an upper-layer selector, the tunnel
        node MUST parse the IPv6 header chain far enough to locate that
        selector or determine that it is unavailable.  It MUST NOT treat an
        unavailable selector as an implicit match for an allow rule.  The
        node MAY discard the packet or send it to a resource-limited
        inspection path.  The operational tradeoffs of these choices are
        described in <xref target="RFC9098"/>.
      </t>
      <t>
        Implementations MUST provide configurable processing limits for IPv6
        header-chain length, parsing work, and slow-path admission.  Such
        limits are resource controls, not permission to process standard
        extension headers contrary to <xref target="RFC7045"/>.  A node that
        cannot enforce its configured policy within the limit MUST fail
        closed for that policy decision.
      </t>
      <t>
        Routing Header Type 0 MUST be rejected as specified by
        <xref target="RFC5095"/>.  Segment Routing Header processing and SR
        domain-boundary filtering MUST follow <xref target="RFC8754"/>.
        Other routing-header types MUST be handled according to their
        defining specifications and configured policy.
      </t>
      <t>
        IPv6 fragmentation and reassembly MUST follow
        <xref target="RFC8200"/>.  A First Fragment that does not contain the
        complete IPv6 header chain is handled as specified by
        <xref target="RFC7112"/>.  If fragmentation prevents enforcement of
        a configured policy, the tunnel node MUST either perform validated,
        resource-bounded reassembly or discard the fragments associated with
        that policy decision.  It MUST NOT admit later fragments as a means
        of bypassing a decision made on the First Fragment.
      </t>
    </section>

    <section anchor="protocol-specific">
      <name>Protocol-Specific Requirements</name>

      <section anchor="ipip">
        <name>IP-in-IP and IPv6 Tunneling</name>
        <t>
          For IP-in-IP <xref target="RFC2003"/> and IPv6 tunneling
          <xref target="RFC2473"/>, a packet using IP protocol number 4 or 41
          MUST NOT be decapsulated merely because it is addressed to a local
          IP address.  It MUST match an enabled tunnel policy and the
          delivery-source and peer checks for that policy.
        </t>
        <t>
          The TTL in an IPv4 passenger header is decremented during
          encapsulation when encapsulation is performed as part of
          forwarding, but it is not changed merely by decapsulation, as
          specified in <xref target="RFC2003"/>.  The analogous passenger Hop
          Limit or TTL processing for IPv6 delivery tunnels is specified by
          <xref target="RFC2473"/>.  Subsequent forwarding performs the
          normal decrement for the passenger protocol.  An implementation
          MUST NOT add an extra decrement solely because a packet was
          decapsulated.
        </t>
      </section>

      <section anchor="gre">
        <name>GRE and GRE over IPv6</name>
        <t>
          GRE implementations MUST validate GRE header fields according to
          <xref target="RFC2784"/> and, when implemented, the Key and Sequence
          Number extensions according to <xref target="RFC2890"/>.  GRE over
          IPv6 implementations MUST also follow <xref target="RFC7676"/>.
        </t>
        <t>
          A tunnel node MUST complete the applicable delivery-peer check
          before using a GRE Key or passenger Protocol Type to select a
          forwarding domain.  A GRE Key MAY select a tunnel policy, tenant,
          or virtual routing table, but it does not remove the requirement
          to authorize the peer and passenger packet as described in
          <xref target="peer-auth"/>.
        </t>
        <t>
          A GRE policy MUST enumerate the permitted passenger Protocol Types
          and MUST define source, destination, and forwarding-scope rules for
          every enabled IP passenger address family.  Unknown or unauthorized
          passenger Protocol Types MUST be discarded.
        </t>
      </section>

      <section anchor="configured-transition">
        <name>Configured IPv4/IPv6 Transition Tunnels</name>
        <t>
          A configured IPv6-over-IPv4 tunnel MUST perform the delivery IPv4
          source-address and passenger IPv6 validity checks specified in
          Section 3.6 of <xref target="RFC4213"/>.  The configured delivery
          peer MUST also be bound to the passenger prefixes and forwarding
          scope that it is authorized to inject.
        </t>
        <t>
          Cross-protocol encapsulation MUST NOT bypass source-address
          validation for either address family.  Operators SHOULD audit IPv4
          and IPv6 policy together because the delivery and passenger
          forwarding paths can be administered by different systems.
        </t>
      </section>

      <section anchor="six-to-four">
        <name>6to4</name>
        <t>
          6to4 <xref target="RFC3056"/> is an automatic multipoint mechanism;
          its authorized delivery-peer set cannot be modeled as a single
          configured peer.  A 6to4 router or relay that remains enabled MUST
          perform all role- and direction-applicable encapsulation,
          decapsulation, and address sanity checks in Section 5 of
          <xref target="RFC3964"/>.  The implementation MUST apply the exact
          role-specific rules rather than a generalized equality test
          between every delivery and passenger address.
        </t>
        <t>
          As required by <xref target="RFC7526"/>, anycast 6to4 and unicast
          6to4 in hosts, and 6to4 in routers, MUST be disabled by default.
          Enabling IPv6 forwarding MUST NOT automatically enable 6to4.  The
          basic unicast 6to4 mechanism and 2002::/16 are not themselves
          deprecated by <xref target="RFC7526"/>; the anycast relay mechanism
          and 192.88.99.1 are deprecated.
        </t>
        <t>
          A 6to4 relay service MUST be deliberately configured, monitored,
          and rate limited.  Its forwarding behavior MUST be restricted by
          the checks in <xref target="RFC3964"/> and by the role-specific
          service policy; it MUST NOT be treated as an authenticated
          point-to-point tunnel.
        </t>
      </section>
    </section>

    <section anchor="icmp-mtu">
      <name>ICMP, TTL, Hop Limit, MTU, and Fragmentation</name>

      <section anchor="ttl-hop-limit">
        <name>TTL and Hop Limit</name>
        <t>
          A tunnel node MUST follow the TTL and Hop Limit rules in the
          applicable delivery, passenger, and tunnel specifications.
          Decapsulation alone MUST NOT cause an additional passenger TTL or
          Hop Limit decrement.  If the exposed packet is subsequently
          forwarded, normal passenger-protocol forwarding rules apply.
        </t>
      </section>

      <section anchor="icmp-processing">
        <name>ICMP Generation and Processing</name>
        <t>
          ICMP and ICMPv6 errors generated or relayed by a tunnel node MUST
          follow the applicable requirements of <xref target="RFC1812"/>,
          <xref target="RFC4443"/>, and the tunnel specification.  Error
          generation MUST be rate limited.  A security-policy discard SHOULD
          be silent unless an applicable specification requires an error or
          an operator deliberately enables one.
        </t>
        <t>
          A tunnel node MUST NOT generate an error to a passenger source that
          failed passenger-source validation.  It MUST NOT generate a
          response to a delivery source that failed peer or delivery-source
          validation unless a protocol-specific requirement applies and the
          response is safe under the deployment's reflection threat model.
        </t>
        <t>
          Before an incoming ICMP or ICMPv6 error changes tunnel PMTU,
          reachability, or other forwarding state, the tunnel ingress MUST
          validate that the quoted packet and available context identify an
          active tunnel and a packet that the node could have sent.
          Unmatched or insufficiently quoted errors MUST NOT update tunnel
          state.  Accepted updates SHOULD be scoped to the identified tunnel
          and SHOULD have bounded lifetimes.  Examples of forged ICMP attacks
          and validation techniques for TCP are discussed in
          <xref target="RFC5927"/>.
        </t>
      </section>

      <section anchor="mtu-pmtud">
        <name>MTU and Path MTU Discovery</name>
        <t>
          A tunnel ingress MUST account for encapsulation overhead and MUST
          implement the MTU, fragmentation, and ICMP translation or relay
          behavior required by its tunnel specification.  Relevant
          procedures are specified by <xref target="RFC2003"/>,
          <xref target="RFC2473"/>, <xref target="RFC4213"/>, and
          <xref target="RFC7676"/>.  The operational tradeoffs for
          in-the-network tunneling are described in <xref target="RFC4459"/>.
        </t>
        <t>
          IPv4 Path MTU Discovery is specified by <xref target="RFC1191"/>,
          and IPv6 Path MTU Discovery is specified by
          <xref target="RFC8201"/>.  A tunnel implementation using these
          mechanisms MUST follow the applicable specification together with
          the ICMP handling rules of its tunnel protocol.
        </t>
        <t>
          An implementation MUST NOT use a reported PMTU outside the bounds
          permitted by the applicable IP and tunnel specifications.  It
          SHOULD expose accepted and rejected PMTU updates through counters.
          Packetization Layer PMTUD <xref target="RFC8899"/> MAY be used
          where supported by the packetization layer and deployment.
        </t>
      </section>

      <section anchor="reassembly">
        <name>Fragmentation and Reassembly Resources</name>
        <t>
          Fragmentation MUST NOT be used to bypass delivery-peer or passenger
          policy.  Where a tunnel specification requires delivery-packet
          reassembly at an egress, the egress MUST perform that reassembly
          before decapsulation and MUST apply the reassembly rules of the
          delivery IP version.
        </t>
        <t>
          Reassembly and fragment-tracking state MUST be bounded per source
          or peer, per tunnel, and globally.  Implementations MUST bound at
          least the number of incomplete datagrams, bytes retained, fragment
          count per datagram, and retention time.  When resources are
          exhausted, the node MUST fail closed for packets that require
          reassembly or fragment state to complete authorization.
        </t>
        <t>
          Operators and implementers SHOULD avoid fragmentation where a
          compliant MTU or PMTUD strategy is available.  The fragility and
          denial-of-service implications of IP fragmentation are described
          in BCP 230 <xref target="RFC8900"/>.
        </t>
      </section>
    </section>

    <section anchor="resource-controls">
      <name>Resource-Exhaustion Controls</name>
      <t>
        Tunnel nodes MUST provide independent, configurable limits for work
        performed before peer authorization and work performed after peer
        authorization.  An unauthorized source MUST NOT be able to consume
        an unbounded amount of decapsulation, parsing, reassembly,
        cryptographic, ICMP-generation, logging, or control-plane work.
      </t>
      <t>Implementations MUST support limits for at least:</t>
      <ul spacing="normal">
        <li><t>candidate tunnel packets and bytes per peer or source class and per tunnel;</t></li>
        <li><t>nested decapsulation depth and total parsing work per packet;</t></li>
        <li><t>fragment-tracking and reassembly state;</t></li>
        <li><t>IPv6 extension-header slow-path or inspection admission;</t></li>
        <li><t>ICMP and ICMPv6 generation and accepted state updates; and</t></li>
        <li><t>log generation and telemetry export.</t></li>
      </ul>
      <t>
        Resource exhaustion MUST NOT cause the implementation to bypass a
        mandatory authorization or validation step.  Implementations SHOULD
        isolate management and routing-control traffic from data-plane
        tunnel processing and SHOULD provide a bounded recovery path after a
        limit is reached.
      </t>
    </section>

    <section anchor="operations">
      <name>Operational Management and Telemetry</name>
      <t>Operators deploying tunnel nodes SHOULD:</t>
      <ul spacing="normal">
        <li><t>inventory enabled tunnel mechanisms, endpoint addresses, peer identities, and passenger forwarding domains;</t></li>
        <li><t>disable unused tunnel mechanisms on hosts, borders, and intermediate systems;</t></li>
        <li><t>bind every configured peer or peer class to explicit passenger and forwarding scopes;</t></li>
        <li><t>review IPv4 and IPv6 source-validation policy together for cross-protocol tunnels;</t></li>
        <li><t>configure and test nested-tunnel, extension-header, fragment, ICMP, PMTU, and resource limits;</t></li>
        <li><t>protect tunnel configuration and telemetry using access control and authenticated management channels; and</t></li>
        <li><t>periodically verify, using authorized testing, that tunnel nodes do not provide unintended local delivery, transit, or re-encapsulation.</t></li>
      </ul>
      <t>A tunnel node MUST provide counters for at least:</t>
      <ul spacing="normal">
        <li><t>packets and bytes accepted by tunnel policy and resulting disposition;</t></li>
        <li><t>unknown or disabled tunnel mechanisms;</t></li>
        <li><t>delivery-source, receiving-context, peer-authentication, and replay failures;</t></li>
        <li><t>passenger source, destination, protocol, local-delivery, and forwarding-scope failures;</t></li>
        <li><t>nested-policy and decapsulation-depth failures;</t></li>
        <li><t>IPv6 extension-header, fragment, reassembly, and resource-limit failures;</t></li>
        <li><t>ICMP or ICMPv6 errors generated, rate limited, accepted for state update, and rejected; and</t></li>
        <li><t>PMTU updates accepted and rejected.</t></li>
      </ul>
      <t>
        Implementations SHOULD support rate-limited, sampled event logging.
        When available, a log entry SHOULD identify the tunnel policy and
        version, receiving context, decapsulation depth, peer or peer class,
        delivery and passenger address families, disposition, and specific
        failure reason.  Logs SHOULD NOT contain passenger payload and SHOULD
        minimize capture of headers not needed for diagnosis.
      </t>
      <t>
        Tunnel configuration changes and authenticated control-plane changes
        that alter peer or passenger authorization SHOULD be auditable.
        Telemetry loss SHOULD be reported, but it MUST NOT weaken packet
        authorization.
      </t>
    </section>

    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>

    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>
        This entire document specifies security requirements.  The principal
        threats are unauthorized tunnel use, forged delivery or passenger
        source addresses, unintended local delivery or transit, forwarding-
        domain confusion, policy bypass at a decapsulation boundary,
        recursive or looping encapsulation, extension-header or fragment
        evasion, forged ICMP state changes, and exhaustion of parsing,
        reassembly, cryptographic, control-plane, or logging resources.
      </t>
      <t>
        The requirements reduce these threats by binding an authorized peer
        and delivery context to permitted passenger traffic and disposition,
        applying policy at every visibility and decapsulation boundary,
        bounding work, and making security-relevant outcomes observable.
        They do not prove that a tunnel is safe for every deployment.
      </t>
      <t>
        Address-based peer authorization remains vulnerable where an
        attacker can spoof a permitted delivery source.  Cryptographic peer
        authentication reduces that risk but does not authorize arbitrary
        passenger traffic.  Conversely, passenger source validation does not
        authenticate the delivery peer.  Deployments requiring both
        properties need both controls.
      </t>
      <t>
        A compromised authorized peer can still send harmful traffic within
        its assigned passenger and forwarding scope.  An encrypted passenger
        may prevent a tunnel node from applying upper-layer policy; an
        operator MUST either rely on an authorized endpoint that can enforce
        that policy or restrict the encrypted traffic to a scope where the
        missing visibility is acceptable.  Resource limits reduce but do not
        eliminate denial-of-service risk.
      </t>
      <t>
        Incorrect source-prefix, destination-scope, interface, or uRPF
        configuration can cause either unauthorized acceptance or legitimate
        traffic loss, particularly with multihoming, mobility, and asymmetric
        routing.  Operators need change control and tests that cover both
        security failure and legitimate reachability.
      </t>
      <t>
        Tunnel telemetry can reveal customer prefixes, peer relationships,
        forwarding domains, policy, and traffic patterns.  Implementations
        and operators SHOULD restrict access, minimize collection, protect
        export, define retention limits, and aggregate or pseudonymize data
        when exact identifiers are not required.  Measurement results that
        identify source-validation gaps SHOULD be handled as sensitive
        operational security information.
      </t>
    </section>

    <section anchor="contributors">
      <name>Contributors</name>
      <t>The following individuals contributed to this document:</t>
      <contact fullname="Daguo Cheng">
        <organization>Tsinghua University</organization>
        <address>
          <postal><city>Beijing</city><country>China</country></postal>
          <email>cdg22@mails.tsinghua.edu.cn</email>
        </address>
      </contact>
      <contact fullname="Chentian Wei">
        <organization>Tsinghua University</organization>
        <address>
          <postal><city>Beijing</city><country>China</country></postal>
          <email>wct24@mails.tsinghua.edu.cn</email>
        </address>
      </contact>
    </section>

    <section anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>
        The authors thank the IETF community for prior work on IP tunneling,
        source-address validation, IPv6 extension-header processing, and
        operational security guidance.
      </t>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative 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.1812.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2003.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.2473.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2784.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2827.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2890.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3704.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3964.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4213.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4443.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5095.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7045.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7112.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7526.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7676.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"/>
      <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.8704.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8754.xml"/>
      </references>
      <references>
        <name>Informative References</name>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3056.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4301.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4459.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4891.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5927.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6169.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8899.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8900.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9098.xml"/>
      </references>
    </references>

    <section anchor="changes-from-00" numbered="false">
      <name>Changes from -00</name>
      <ul spacing="normal">
        <li><t>Added an explicit threat model, trust boundaries, security objectives, and exclusions.</t></li>
        <li><t>Clarified scope and the precedence of protocol-specific processing rules.</t></li>
        <li><t>Separated peer authentication from delivery- and passenger-packet authorization.</t></li>
        <li><t>Corrected nested and recursive encapsulation terminology and aligned limits with RFC 2473.</t></li>
        <li><t>Aligned IPv6 extension-header policy with RFC 7045 and added fragment-policy requirements.</t></li>
        <li><t>Expanded protocol-specific requirements for IP-in-IP, GRE, configured transition tunnels, and 6to4.</t></li>
        <li><t>Reworked TTL, Hop Limit, ICMP, PMTU, fragmentation, and reassembly requirements to defer to the applicable RFCs.</t></li>
        <li><t>Added explicit resource-exhaustion controls and expanded operational telemetry.</t></li>
        <li><t>Added and corrected RFC references, including RFCs 1191, 2890, 4301, 4459, 6169, 7112, 7526, 8201, 8754, 8899, and 8900.</t></li>
      </ul>
    </section>
  </back>
</rfc>
