The Loopback flag is used to request that each transit device along the path loops back a truncated copy of the data packet to the sender. Loopback allows an IOAM encapsulating node to trace the path to a given destination and to receive per-hop data about both the forward and return paths. Loopback is intended to provide an accelerated alternative to Traceroute that allows the encapsulating node to receive responses from multiple transit nodes along the path in less than one round-trip time (RTT) and by sending a single packet.
As illustrated in
Figure 1, an IOAM encapsulating node can push an IOAM encapsulation that includes the Loopback flag onto some or all of the packets it forwards using one of the IOAM encapsulation types, e.g., [
IOAM-NSH] or [
IOAM-IPV6-OPTIONS]. The IOAM transit node and the decapsulating node both create copies of the packet and loop them back to the encapsulating node. The decapsulating node also terminates the IOAM encapsulation and then forwards the packet towards the destination. The two IOAM looped-back copies are terminated by the encapsulating node.
+--------+ +--------+ +--------+ +--------+ +--------+
| | | IOAM |.....| IOAM |.....| IOAM | | |
+--------+ +--------+ +--------+ +--------+ +--------+
| L2/L3 |<===>| L2/L3 |<===>| L2/L3 |<===>| L2/L3 |<===>| L2/L3 |
+--------+ +--------+ +--------+ +--------+ +--------+
Source Encapsulating Transit Decapsulating Destination
Node Node Node
<------------ IOAM-Domain ----------->
IOAM encap. with Loopback flag
Data packet ------->============================>----------->
| |
IOAM looped back | |
<=============+ |
IOAM looped back|
<===========================+
Loopback can be used only if a return path from transit nodes and destination nodes towards the source (encapsulating node) exists. Specifically, loopback is only applicable in encapsulations in which the identity of the encapsulating node is available in the encapsulation header. If an encapsulating node receives a looped-back packet that was not originated from the current encapsulating node, the packet is dropped.
The encapsulating node either generates synthetic packets with an IOAM trace option that has the Loopback flag set or sets the Loopback flag in a subset of the in-transit data packets. Loopback is used either proactively or on-demand, i.e., when a failure is detected. The encapsulating node also needs to ensure that sufficient space is available in the IOAM header for loopback operation, which includes transit nodes adding trace data on the original path and again on the return path.
An IOAM trace option that has the Loopback flag set
MUST have the value '1' in the most significant bit of IOAM-Trace-Type and '0' in the rest of the bits of IOAM-Trace-Type. Thus, every transit node that processes this trace option only adds a single data field, which is the Hop_Lim and node_id data field. A transit node that receives a packet with an IOAM trace option that has the Loopback flag set and the IOAM-Trace-Type is not equal to '1' in the most significant bit and '0' in the rest of the bits
MUST NOT loop back a copy of the packet. The reason for allowing only a single data field per hop is to minimize the impact of amplification attacks.
IOAM encapsulating nodes
MUST NOT push an IOAM encapsulation with the Loopback flag onto data packets that already include an IOAM encapsulation. This requirement is intended to prevent IOAM Loopback nesting where looped-back packets may be subject to loopback in a nested IOAM-Domain.
If an IOAM encapsulating node incorporates the Loopback flag into all the traffic it forwards, it may lead to an excessive amount of looped back packets, which may overload the network and the encapsulating node. Therefore, an IOAM encapsulating node that supports the Loopback flag
MUST support the ability to incorporate the Loopback flag selectively into a subset of the packets that are forwarded by it.
Various methods of packet selection and sampling have been previously defined, such as [
RFC 7014] and [
RFC 5475]. Similar techniques can be applied by an IOAM encapsulating node to apply loopback to a subset of the forwarded traffic.
The subset of traffic that is forwarded or transmitted with a Loopback flag
SHOULD NOT exceed 1/N of the interface capacity on any of the IOAM encapsulating node's interfaces. This requirement applies to the total traffic that incorporates a Loopback flag, including traffic that is forwarded by the IOAM encapsulating node and probe packets that are generated by the IOAM encapsulating node. In this context, N is a parameter that can be configurable by network operators. If there is an upper bound, M, on the number of IOAM transit nodes in any path in the network, then configuring N such that N >> M (i.e., N is much greater than M) is
RECOMMENDED. The rationale is that a packet that includes the Loopback flag triggers a looped-back packet from each IOAM transit node along the path for a total of M looped-back packets. Thus, if N >> M, then the number of looped-back packets is significantly lower than the number of data packets forwarded by the IOAM encapsulating node. It is
RECOMMENDED that the default value of N satisfies N>100 to be used in the absence of explicit operator configuration or if there is no prior knowledge about the network topology or size.
An IOAM-Domain in which the Loopback flag is used
MUST be configured such that there is expected to be a return path from each of the IOAM transit and IOAM decapsulating nodes; if this expectation does not apply, or if the encapsulating node's identity is not available in the encapsulation header, then configuration
MUST NOT enable the Loopback flag to be set.
A Loopback flag that is set indicates to the transit nodes processing this option that they are to create a copy of the received packet and send the copy back to the source of the packet. In this context, the source is the IOAM encapsulating node and it is assumed that the source address is available in the encapsulation header. Thus, the source address of the original packet is used as the destination address in the copied packet. If IOAM is used over an encapsulation that does not include the address of the encapsulating node, then the transit/decapsulating node does not loop back a copy of the original packet. The address of the node performing the copy operation is used as the source address; the specific method of source address assignment is encapsulation specific, e.g., if an IPv6 encapsulation is used, then the source address can be assigned as specified in [
RFC 6724]. The copy is also truncated, i.e., any payload that resides after the IOAM option(s) is removed before transmitting the looped-back packet back towards the encapsulating node. Creating the copy that is looped back, and specifically the truncation, may require some encapsulation-specific updates in the encapsulation header. The original packet continues towards its destination. The L-bit
MUST be cleared in the copy of the packet that a node sends back towards the source.
An IOAM node that supports the reception and processing of the Loopback flag
MUST support the ability to limit the rate of the looped-back packets. The rate of looped-back packets
SHOULD be limited so that the number of looped-back packets is significantly lower than the number of packets that are forwarded by the device. The looped-back data rate
SHOULD NOT exceed 1/N of the interface capacity on any of the IOAM node's interfaces. Using N>100 is
RECOMMENDED. Depending on the IOAM node's architecture considerations, the loopback response rate may be limited to a lower number in order to avoid overloading the IOAM node.
On its way back towards the source, the copied packet is processed like any other packet with IOAM information, including adding requested data at each transit node (assuming there is sufficient space).
Once the return packet reaches the IOAM-Domain boundary, IOAM decapsulation occurs as with any other packet containing IOAM information. Note that the looped-back packet does not have the L-bit set. The IOAM encapsulating node that initiated the original loopback packet recognizes a received packet as an IOAM looped-back packet by checking the Node ID in the Hop_Lim/node_id field that corresponds to the first hop. If the Node ID and IOAM-Namespace match the current IOAM node, it indicates that this is a looped-back packet that was initiated by the current IOAM node and processed accordingly. If there is no match in the Node ID, the packet is processed like a conventional IOAM-encapsulated packet.
Note that an IOAM encapsulating node may be either an endpoint (such as an IPv6 host) or a switch/router that pushes a tunnel encapsulation onto data packets. In both cases, the functionality that was described above avoids IOAM data leaks from the IOAM-Domain. Specifically, if an IOAM looped-back packet reaches an IOAM boundary node that is not the IOAM node that initiated the loopback, the node does not process the packet as a loopback; the IOAM encapsulation is removed, preventing IOAM information from leaking out from the IOAM-Domain. Since the packet does not have any payload, it is terminated.