<?xml version="1.0" encoding="US-ASCII"?>
<!-- This is built from a template for a generic Internet Draft. Suggestions for
     improvement welcome - write to Brian Carpenter, brian.e.carpenter @ gmail.com 
     This can be converted using the Web service at http://xml.resource.org/ -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<!-- You want a table of contents -->
<!-- Use symbolic labels for references -->
<!-- This sorts the references -->
<!-- Change to "yes" if someone has disclosed IPR for the draft -->
<!-- This defines the specific filename and version number of your draft (and inserts the appropriate IETF boilerplate -->
<?rfc sortrefs="yes"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc topblock="yes"?>
<?rfc comments="no"?>
<rfc category="info" docName="draft-yc-nmrg-dtn-owd-measurement-01"
     ipr="trust200902">
  <front>
    <title abbrev="Digital Twin Network">One-way delay measurement method
    based on Digital Twin Network</title>

    <author fullname="Hongwei Yang" initials="H." surname="Yang">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>yanghongwei@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Danyang Chen" initials="D." surname="Chen">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>chendanyang@chinamobile.com</email>
      </address>
    </author>

    <date day="21" month="October" year="2022"/>

    <area>Networking</area>

    <workgroup>Internet Research Task Force</workgroup>

    <keyword>Digtial Twin; Digital Twin Network; OWD Measurement</keyword>

    <abstract>
      <t>This document implements an accurate network delay measurement method
      based on the digital twin network. This is a use case of digital twin
      network. This method does not need to send measurement packets, does not
      need to change the physical network configuration, does not need to
      change the format of service packets, do not require physical network
      elements to support the time synchronization protocol, and support the
      one-way delay measurement of any service packet.The digital twin network
      architecture of this document follows the NMRG working group paper
      draft-irtf-nmrg-network-digital-twin-arch-00.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>Digital twin network is a virtual representation of the physical
      network. Such virtual representation of the network is meant to be used
      to analyze, diagnose, emulate, and then control the physical network
      based on data, models, and interfaces. The DTN architecture diagram is
      shown in Figure 1.</t>

      <figure align="center"
              title="Figure1:Reference Architecture of Digital Twin Network">
        <artwork align="center">+---------------------------------------------------------+
|   +-------+   +-------+          +-------+              |
|   | App 1 |   | App 2 |   ...    | App n |   Application|
|   +-------+   +-------+          +-------+              |
+-------------^-------------------+-----------------------+
              |Capability Exposure| Intent Input
              |                   | 
+-------------+-------------------v-----------------------+
|                        Instance of Digital Twin Network |
|  +--------+   +------------------------+   +--------+   |
|  |        |   | Service Mapping Models |   |        |   |
|  |        |   |  +------------------+  |   |        |   |
|  | Data   +---&gt;  |Functional Models |  +---&gt; Digital|   |
|  | Repo-  |   |  +-----+-----^------+  |   | Twin   |   |
|  | sitory |   |        |     |         |   | Network|   |
|  |        |   |  +-----v-----+------+  |   |  Mgmt  |   |
|  |        &lt;---+  |  Basic Models    |  &lt;---+        |   |
|  |        |   |  +------------------+  |   |        |   |
|  +--------+   +------------------------+   +--------+   |
+--------^----------------------------+-------------------+
         |                            |
         | data collection            | control
+--------+----------------------------v-------------------+
|                   Physical Network                      |
|                                                         |
+---------------------------------------------------------+</artwork>
      </figure>

      <t>The digital twin layer forms a network element model by modeling
      physical network elements, and the network element model forms a twin
      network element through instantiation, that is, each physical network
      element in the physical network has a corresponding twin network element
      in the digital twin layer. Similarly, each physical flow of the physical
      network also has a corresponding twin flow at the digital twin
      layer.</t>

      <t>Network measurement is very important for network operation and
      maintenance. Digital twin network can support the implementation of
      network measurement technology very well. Traditional network delay
      measurement methods include active measurement, passive measurement,
      hybrid measurement, etc., but they all have some disadvantages:</t>

      <t>1) It is necessary to inject measurement packets into the physical
      network, but this will affect the forwarding behavior of actual service
      traffic, affect the accuracy of delay measurement, and increase the
      network burden and occupy network resources;</t>

      <t>2) It is impossible to perform accurate delay measurement on the
      packets of all network protocols. For example, it is difficult to
      measure the one-way delay for UDP packets;</t>

      <t>3) Some solutions need to change the format of service packets and
      insert measurement parameters, but this requires upgrading the physical
      network, which is difficult to implement, and affects the normal
      forwarding behavior of service packets and affects the measurement
      accuracy;</t>

      <t>4) The time synchronization protocol is required to measure the
      one-way delay of the network, and the physical network is required to
      support this protocol, which increases the difficulty of implementing
      the solution.</t>
    </section>

    <section title="Conventions Used in This Document">
      <section title="Terminology">
        <t>NTP Network Time Protocol</t>

        <t>PTP Precision Time Protocol</t>

        <t>DTN Digital Twin Network</t>
      </section>

      <section title="Requirements Language">
        <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 title="Method Introduction">
      <t>The delay measurement method based on DTN is as follows:</t>

      <t>1) According to the digital twin network architecture, build a
      digital twin layer, including twin network elements corresponding to
      physical network elements, such as twin switches, twin routers,
      etc.;</t>

      <t>2) Time synchronization is maintained between each twin network
      element in the digital twin layer. a) If multiple twin NEs are in the
      same physical entity, such as the NFV-based modeling method, where
      multiple twin NEs are deployed in one server and share the same local
      clock, the twin NEs themselves is time-synchronized; b) If multiple twin
      NEs are deployed in different physical entities, use PTP (Precise Time
      Protocol) <xref target="IEEE.1588.2008"/>or NTP (Network Time Protocol)
      <xref target="RFC5905"/>to achieve time synchronization between physical
      entities to ensure time synchronization of all twin NEs;</t>

      <t>3) The data transmission from the physical network layer to the
      digital twin layer uses a delay deterministic network (Detnet) to ensure
      that the data transmission delay between each physical network element
      and the twin network element is deterministic or pre-calculable, as
      shown in the figure 2. T1~Tn is the delay of data transmission; the
      delay deterministic network can be based on TSN or DIP technology;</t>

      <t>4) When a flow of the physical network is input from the physical
      network element 1, passes through the physical network elements 2 and 3,
      and finally is output from the physical network element n. When physical
      network element 1 receives the data packet, it will normally forward the
      data to physical network element 2 and transmit the data to twin network
      element 1 at the same time. At this time, the local time of the twin NE
      1 is t1, and the deterministic network transmission delay is T1, then
      the arrival time of the traffic information recorded by the twin NE is
      t1-T1; similarly, the arrival time of the data packet recorded by other
      twin NEs is tn- Tn.</t>

      <t>5) Finally, according to the arrival time of the data packet at the
      twin network elements, its one-way transmission delay between physical
      network elements can be calculated.</t>

      <figure align="center"
              title="Figure 2: Between the physical network and the twin network is a delay deterministic network">
        <artwork type="ascii-art" xml:space="preserve">  +--------------------------------------------------------------+
  | Digital Twin Network            +----------+                 |
  |                       +---------+ Twin NE 3+----------+      |
  |                       |         +----------+          |      |
  |                       |                               |      |
  | -----------+    +-----+----+    +----------+    +-----+----+ |
  | | Twin NE 1+----+ Twin NE 2+----+ Twin NE 4+----+ Twin NE n| |
  | -----------+    +----------+    +----------+    +----------+ |
  +--------------------------------------------------------------+
                                  |
  +-------------------------------+------------------------------+
  |               Delay Deterministic Networking                 |
  +-------------------------------^------------------------------+
                                  |
+---------------------------------+---------------------------------+
| Phsical Network                   +------------+                  |
|                        +----------+Physical NE3+----------+       |
|                        |          +------------+          |       |
|                        |                                  |       |
| +------------+   +-----+------+   +------------+   +------+-----+ |
| |Physical NE1+---+Physical NE2+---+Physical NE4+---+Physical NEn| |
| +------------+   +------------+   +------------+   +------------+ |
+-------------------------------------------------------------------+</artwork>
      </figure>
    </section>

    <section title="Implementation Process">
      <t>The detailed calculation process is shown in Figure 3:</t>

      <t>(1) When the traffic data to be measured reaches physical network
      element 1, physical network element 1 forwards the traffic to physical
      network element 2, but also transmits the data to twin network element
      1, and the transmission delay is T1. The local time of network element 1
      is t1, and the arrival time of the data recorded by twin network element
      1 is t1-T1;</t>

      <t>(2) When the data packet is forwarded to physical network element 2,
      physical network element 2 will also forward it to physical network
      element 3 normally, but also to twin network element 2, and the delay to
      reach twin network element 2 is T2 , at this time, the local time of
      twin network element 2 is t2, and the arrival time of data packet
      information recorded by twin network element 2 is t2-T2, then
      (t2-T2)-(t1-T1) is the data packet from physical network element 1 to
      One-way delay of physical network element 2.</t>

      <t>(3) Similarly, when the data packet reaches the nth physical network
      element, the nth physical network element will also transmit the data
      packet to the twin network element n. The data transmission time is Tn,
      and the local time of the twin network element n is tn, then record tn.
      -Tn is the time when the packet reaches the twin network element n, then
      (tn-Tn)-(t1-T1) is the one-way transmission delay of the data packet
      from physical network element 1 to physical network element n;</t>

      <t>So far, the one-way transmission delay of data packets between
      physical NEs is obtained by calculating the time when the data packet to
      be tested reaches the twin NEs. During the measurement process, only
      time synchronization between twin NEs is required, but no physical
      network is required. Inter-meta time synchronization. The accuracy of
      delay measurement depends on the time synchronization accuracy of the
      twin network elements and the time synchronization accuracy of the delay
      deterministic network. If both use the PTP synchronization protocol, the
      delay measurement accuracy can reach the nanosecond level.</t>

      <figure align="center" title="Figure 3: Delay Measurement Process">
        <artwork align="center">+--------+ +--------+ +--------+ +------+ +------+ +------+ +------+
|Physical| |Physical| |Physical| |Detnet| | Twin | | Twin | | Twin |
|   NE1  | | NE2    | |  NEn   | |      | |  NE1 | |  NE2 | | NEn  |
+----+---+ +----+---+ +----+---+ +---+--+ +---+--+ +---+--+ +---+--+
     |          |          |         |        |        |        |
     |1.The packet is sent from physical NE1 to twin NE1,       |
     |and twin NE1 records the arri^al time of|the packet       |
     +----------+----------+---------+-------&gt;+        |        |
     |          |          |         |        |        |        |
     |          |2.The packet is sent|from physical NE2|to twin NE2,
     |          |and twin NE2 records|the arri^al time of the packet
     |          +----------+---------------------------&gt;        |
     |          |          |         |        |        |        |
     |          |          |         |        |        |        |
     |          |   n.The packet is sent from physical NEn to twin NEn,
     |          |   and twin NEn records the arri^al time of the|packet
     |          |          +---------+--------+--------+--------&gt;
     |          |          |         |        |        |        |
     |          |          |         |        |        |        |
     |          |          |         |        |        |        |</artwork>
      </figure>
    </section>

    <section title="Conclusion">
      <t>This method can realize segment-by-segment or end-to-end one-way
      delay measurement in the physical network. The advantages of this method
      include: no need to send measurement packets, all traffic protocol types
      can be measured, physical network configuration is not changed, and
      traffic data format is not changed. , It does not need the physical
      network to support the time synchronization protocol, and the
      measurement accuracy is high.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>TBD.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>TBD.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <reference anchor="IEEE.1588.2008">
        <front>
          <title>IEEE Standard for a Precision Clock Synchronization Protocol
          for Networked Measurement and Control Systems</title>

          <author>
            <organization>IEEE</organization>
          </author>

          <date month="July" year="2008"/>
        </front>
      </reference>

      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.8174"?>

      <?rfc include="reference.RFC.5905"?>
    </references>
  </back>
</rfc>
