3. Definition of the SRH AltMark TLV
Cette section conserve le texte RFC relatif à l'expérience SRH AltMark TLV, y compris Alternate-Marking Method, SRv6, SRH, FlowMonID, L and D flags, NH, enhanced fields, controlled-domain requirements, security et IANA considerations.
Texte RFC original
3. Definition of the SRH AltMark TLV
The AltMark SRH TLV is defined to carry the data fields associated
with the Alternate-Marking Method. The TLV has some initial fields
that are always present and further extension fields that are present
when Enhanced Alternate Marking is in use.
Figure 1 shows the format of the AltMark TLV.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SRH TLV Type | SRH TLV Len | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowMonID |L|D| Reserved | NH |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Optional extended data fields (variable) ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: The AltMark SRH TLV for Alternate Marking
The fields of this TLV are as follows:
SRH TLV Type: The 8-bit identifier of the Alternate-Marking SRH TLV.
The value for this field is taken from the range 124-126. It is
an Experimental code point that indicates a TLV that does not
change en route. Deployment of this document must coordinate the
value used by all implementations participating in the experiment.
Therefore, experiments should carefully consider any other
implementations running in the controlled domain to avoid clashes
with other SRH TLVs.
SRH TLV Len: The length of the Data Fields of this TLV in bytes.
This is set to 6 when Enhanced Alternate Marking is not in use.
Reserved: Reserved for future use. These bits MUST be set to zero
on transmission and ignored on receipt.
FlowMonID: The Flow Monitoring Identification field. It is a 20-bit
unsigned integer as defined in [RFC9343].
L: The Loss flag, as defined in [RFC9343].
D: The Delay flag, as defined in [RFC9343].
NH: The NextHeader field. It is used to indicate extended data
fields are present to support Enhanced Alternate Marking as
follows:
* NextHeader value of 0x0 means that there is no extended data
field attached.
* NextHeader values of 0x1-0x8 are reserved for further usage.
* NextHeader value of 0x9 indicates the extended data fields are
present as described in Section 3.2.
* NextHeader values of 0xA-0xF are reserved for further usage.
Optional extended data fields may be present according to the setting
of the NH field and as described in Section 3.2.
3.1. Base Alternate-Marking Data Fields
The base AltMark data fields are: the Loss (L) flag, the Delay (D)
flag, and the Flow Monitoring Identification (FlowMonID) field, as in
[RFC9343].
L and D are the marking fields of the Alternate-Marking Method, while
FlowMonID is used to identify monitored flows and aids the
optimization of implementation and scaling of the Alternate-Marking
Method. Note that, as already highlighted in [RFC9343], the
FlowMonID is used to identify the monitored flow because it is not
possible to utilize the Flow Label field of the IPv6 Header.
It is important to note that if the 20-bit FlowMonID is set by the
domain entry nodes, there is a chance of collision even when the
values are chosen using a pseudorandom algorithm; therefore, it may
not be sufficient to uniquely identify a monitored flow. In such
cases, the packets need to be tagged with additional flow information
to allow disambiguation. Such additional tagging can be carried in
the extended data fields described in Section 3.2.
3.2. Optional Extended Data Fields for Enhanced Alternate Marking
The optional extended data fields to support Enhanced Alternate
Marking are illustrated in Figure 2. They are present when the NH
field of the AltMark TLV is set to 0x9.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowMonID Ext |M|F|W|R| Len | Rsvd |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MetaInfo | Optional MetaData ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Optional MetaData (variable) ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: Optional Extended Data Fields for Enhanced Alternate
Marking
The extended data fields are as follows:
FlowMonID Ext: 20-bit unsigned integer used to extend the FlowMonID
in order to reduce the conflict when random allocation is applied.
The disambiguation of the FlowMonID field is discussed in "IPv6
Application of the Alternate-Marking Method" [RFC9343].
Four different bit flags indicate special-purpose usage.
M bit: Measurement mode. If M=0, it indicates that it is for
segment-by-segment monitoring. If M=1, it indicates that it is
for end-to-end monitoring.
F bit: Fragmentation. If F=1, it indicates that the original
packet is fragmented; therefore, it is necessary to only count
a single packet, ignoring all the following fragments with F
set to 1. Note that F is set to 0 for the first fragment.
W bit: Flow direction identification. This flag is used if
backward direction flow monitoring is requested to be set up
automatically, so that the egress node is instructed to setup
the backward flow monitoring. If W=1, it indicates that the
flow direction is forward. If W=0, it indicates that the flow
direction is backward.
R bit: Reserved. This bit MUST be set to zero and ignored on
receipt.
Len: Length. Indicates the length of the extended data fields for
Enhanced Alternate Marking as a multiple of 4 bytes. It includes
all of the fields shown in Figure 2 including any metadata that is
present.
Rsvd: Reserved for further use. These bits MUST be set to zero on
transmission and ignored on receipt.
MetaInfo: A 16-bit Bitmap to indicate more metadata attached in the
Optional MetaData field for enhanced functions. More than one bit
may be set, in which case the additional metadata is present in
the order that the bits are set. MetaInfo bits are numbered from
0 as the most significant bit. Three bits and associated metadata
are defined as follows:
bit 0: If set to 1, it indicates that a 6-byte Timestamp is
present as shown in Figure 3.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Timestamp(s) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Timestamp(ns) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 3: The Timestamp Extended Data Field
This Timestamp can be filled by the encapsulation node and is
taken all the way to the decapsulation node so that all the
intermediate nodes can compare it against their local time and
measure the one-way delay. The Timestamp consists of two
fields:
Timestamp(s): A 16-bit integer that carries the number of
seconds.
Timestamp(ns): A 32-bit integer that carries the number of
nanoseconds.
Note that the Timestamp data field enables all the intermediate
nodes to measure the one-way delay. It can be correlated with
the implementation of [IPFIX] and [YANG-TELEMETRY]. [IPFIX]
introduces new IP Flow Information Export (IPFIX) information
elements to expose the On-Path Telemetry measured delay.
Similarly, [YANG-TELEMETRY] defines a YANG data model for
monitoring On-Path Telemetry data, including the path delay.
bit 1: If set to 1, it indicates the control information to set
up the backward direction flow monitoring based on the trigger
packet presence as shown in Figure 4.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DIP Mask | SIP Mask |P|I|O|V|S|T| Period |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: Control Information for Backward Direction Flow
Monitoring
The control information includes several fields and flags to
match in order to set up the backward direction:
DIP Mask: The length of the destination IP prefix used to
match the flow.
SIP Mask: The length of the source IP prefix used to match the
flow.
P bit: If set to 1, it indicates to match the flow using the
protocol identifier in the trigger packet.
I bit: If set to 1, it indicates to match the source port.
O bit: If set to 1, it indicates to match the destination
port.
V bit: If set to 1, the node will automatically set up reverse
direction monitoring and allocate a FlowMonID.
S bit: If set to 1, it indicates to match the Differentiated
Services Code Point (DSCP).
T bit: Used to control the scope of tunnel measurement. T=1
means measure between Network-to-Network Interfaces (i.e.,
NNI to NNI). T=0 means measure between User-to-Network
Interfaces (i.e., UNI to UNI).
Period: Indicates the Alternate-Marking period counted in
seconds.
bit 2: If set to 1, it indicates that a 4-byte Sequence Number is
present as shown in Figure 5.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 5: Sequence Number Data Field
The unique Sequence Number can be used to detect the out-of-
order packets, in addition to enabling packet loss measurement.
Moreover, the Sequence Number can be used together with the
latency measurement to access per-packet Timestamps.