<?xml version="1.0" encoding="UTF-8"?>
<rfc version="3"
     category="std"
     docName="draft-kerigond-cptf-00"
     ipr="trust200902"
     consensus="true"
     submissionType="IETF">
  <front>
    <title abbrev="CPTF">Connectionless Packet Timestamp Forwarding (CPTF)</title>
    <author fullname="Amoghasidd Kerigond" initials="Amogh" surname="Kerigond">
      <address>
        <email>amogh.kerigond@gmail.com</email>
      </address>
    </author>
    <date year="2025" month="September" day="18"/>
    <area>Internet</area>
    <workgroup>IETF</workgroup>
    <abstract>
      <t>
        This document specifies a protocol extension for connectionless packet transmission, enabling forwarding devices such as routers and switches to insert per-hop arrival timestamps directly into packets during transit. The extension allows receivers and monitoring systems to reconstruct the precise timing and location of delays throughout a packet's network path, improving performance diagnostics for protocols such as UDP, ICMP, multicast, and broadcast.
      </t>
    </abstract>
    <note>
      <t>
        This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79 and is intended for the IETF standards track.
      </t>
    </note>
  </front>
  <middle>
    <section title="Introduction">
      <t>
        Connectionless protocols such as UDP, ICMP, multicast, and broadcast are widely used for streaming, diagnostics, IoT, and control-plane functions. These packets traverse multiple network hops without explicit state; existing standards do not provide a means for intermediate devices to record their transit times. Lack of per-hop transit information impedes the ability to pinpoint delays, diagnose jitter, and perform fine-grained network analysis.
      </t>
      <t>
        This document defines a Timestamp Forwarding Option for selected packet types, enabling hop-by-hop timestamp insertion and subsequent analysis.
      </t>
    </section>
    <section title="Terminology">
      <t>
        CPTF: Connectionless Packet Timestamp Forwarding
      </t>
      <t>
        TFO: Timestamp Forwarding Option
      </t>
      <t>
        Node Identifier: The device's unique address (IP or MAC)
      </t>
      <t>
        Timestamp: 64-bit value in milliseconds since Unix epoch
      </t>
    </section>
    <section title="Problem Statement">
      <t>
        Packet delay is typically only observable at endpoints. Operators cannot precisely identify which network hop induces delay or jitter, especially for connectionless flows. Traceroute and similar active probes require custom traffic and do not reflect normal traffic conditions. IoT and real-time services are particularly affected.
      </t>
    </section>
    <section title="Protocol Overview">
      <t>
        CPTF introduces a header option for eligible packets. Each CPTF-capable forwarding node appends or inserts its timestamp as the packet is received or forwarded. At the destination, these timestamps reveal per-hop transit delays for individual packets.
      </t>
    </section>
    <section title="Timestamp Forwarding Option">
      <section title="IPv4 Option Structure">
        <t>
          The CPTF IPv4 Option format:
        </t>
        <figure>
          <artwork><![CDATA[
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Option Type | Option Length |   Entries (variable length)     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Entry format:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node ID (4 bytes, optional) | Timestamp (8 bytes)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure>
        <t>
          Multiple entries are appended in arrival order.
        </t>
      </section>
      <section title="IPv6 Option Structure">
        <t>
          The CPTF destination option is carried in the IPv6 Destination Options header.
        </t>
        <figure>
          <artwork><![CDATA[
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Option Type | Option Data Len |   Entries (variable length)   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Entry format:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node ID (16 bytes, optional) | Timestamp (8 bytes)           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure>
      </section>
      <section title="UDP Extension Structure">
        <t>
          For UDP extensions, CPTF may be placed in the UDP payload or in an extension header.
        </t>
        <figure>
          <artwork><![CDATA[
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Entry Count |   Entries ...                                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Entry format:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node ID (4 or 16 bytes) | Timestamp (8 bytes)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure>
      </section>
      <section title="Processing Rules">
        <t>
          Sender MAY initialize CPTF header and insert its timestamp.
        </t>
        <t>
          Each CPTF-capable device SHOULD check for available entry slots and insert its Node ID and current time.
        </t>
        <t>
          If all entry slots are full, no further timestamps are added.
        </t>
        <t>
          Devices MUST NOT overwrite earlier timestamps.
        </t>
        <figure>
          <artwork><![CDATA[
[Sender]---->[Router1]---->[Router2]---->[Receiver]
       |           |             |             |
    TS0 Insert  TS1 Insert   TS2 Insert    Read all

CPTF Option after Receiver:
+---------+---------+---------+
| TS0,ID0 | TS1,ID1 | TS2,ID2 |
+---------+---------+---------+
          ]]></artwork>
        </figure>
      </section>
    </section>
    <section title="Operational Scenarios">
      <t>
        UDP Video Streaming: Packets from a camera traverse routers, each adding CPTF info. The server can analyze delays per hop for each packet received.
      </t>
      <t>
        ICMP Diagnostics: Echo Request and Reply packets accumulate CPTF data, allowing the initiator to determine where latency/jitter occurred without special probes.
      </t>
      <t>
        IoT Mesh Broadcast: CPTF helps diagnose congested mesh segments by collecting hop timing.
      </t>
    </section>
    <section title="Security Considerations">
      <t>
        CPTF fields may reveal topology and timing to observers. Usage SHOULD be limited by network policy. Entry limits and rate controls are RECOMMENDED to avoid resource exhaustion. CPTF-enabled devices MAY restrict Node ID exposure.
      </t>
    </section>
    <section title="IANA Considerations">
      <t>
        This memo requests assignment of:
        CPTF IPv4 Option Number,
        CPTF IPv6 Destination Option Type,
        CPTF UDP Extension Option Code,
        CPTF ICMP Extension Option Code.
      </t>
    </section>
    <section title="References">
      <t>RFC791: Internet Protocol</t>
      <t>RFC792: Internet Control Message Protocol</t>
      <t>RFC2460: Internet Protocol, Version 6 (IPv6) Specification</t>
      <t>RFC768: User Datagram Protocol</t>
    </section>
  </middle>
  <back>
    <section title="Acknowledgments">
      <t>
        The author wishes to thank the networking and diagnostics communities for inspiring work that motivated CPTF.
      </t>
    </section>
    <section title="Author's Address">
      <t>
        Amoghasidd Kerigond
      </t>
      <t>
        Email: amogh.kerigond@gmail.com
      </t>
    </section>
  </back>
</rfc>
