tools/testing/selftests/net/srv6_end_next_csid_l3vpn_test.sh

Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/srv6_end_next_csid_l3vpn_test.sh

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/net/srv6_end_next_csid_l3vpn_test.sh
Extension
.sh
Size
32530 bytes
Lines
1105
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# author: Andrea Mayer <andrea.mayer@uniroma2.it>
#
# This script is designed for testing the support of NEXT-C-SID flavor for SRv6
# End behavior.
# A basic knowledge of SRv6 architecture [1] and of the compressed SID approach
# [2] is assumed for the reader.
#
# The network topology used in the selftest is depicted hereafter, composed by
# two hosts and four routers. Hosts hs-1 and hs-2 are connected through an
# IPv4/IPv6 L3 VPN service, offered by routers rt-1, rt-2, rt-3 and rt-4 using
# the NEXT-C-SID flavor. The key components for such VPNs are:
#
#    i) The SRv6 H.Encaps/H.Encaps.Red behaviors [1] apply SRv6 Policies on
#       traffic received by connected hosts, initiating the VPN tunnel;
#
#   ii) The SRv6 End behavior [1] advances the active SID in the SID List
#       carried by the SRH;
#
#  iii) The NEXT-C-SID mechanism [2] offers the possibility of encoding several
#       SRv6 segments within a single 128-bit SID address, referred to as a
#       Compressed SID (C-SID) container. In this way, the length of the SID
#       List can be drastically reduced.
#       The NEXT-C-SID is provided as a "flavor" of the SRv6 End behavior
#       which advances the current C-SID (i.e. the Locator-Node Function defined
#       in [2]) with the next one carried in the Argument, if available.
#       When no more C-SIDs are available in the Argument, the SRv6 End behavior
#       will apply the End function selecting the next SID in the SID List.
#
#   iv) The SRv6 End.DT46 behavior [1] is used for removing the SRv6 Policy and,
#       thus, it terminates the VPN tunnel. Such a behavior is capable of
#       handling, at the same time, both tunneled IPv4 and IPv6 traffic.
#
# [1] https://datatracker.ietf.org/doc/html/rfc8986
# [2] https://datatracker.ietf.org/doc/html/draft-ietf-spring-srv6-srh-compression
#
#
#               cafe::1                      cafe::2
#              10.0.0.1                     10.0.0.2
#             +--------+                   +--------+
#             |        |                   |        |
#             |  hs-1  |                   |  hs-2  |
#             |        |                   |        |
#             +---+----+                   +----+---+
#    cafe::/64    |                             |      cafe::/64
#  10.0.0.0/24    |                             |    10.0.0.0/24
#             +---+----+                   +----+---+
#             |        |  fcf0:0:1:2::/64  |        |
#             |  rt-1  +-------------------+  rt-2  |
#             |        |                   |        |
#             +---+----+                   +----+---+
#                 |      .               .      |
#                 |  fcf0:0:1:3::/64   .        |
#                 |          .       .          |
#                 |            .   .            |
# fcf0:0:1:4::/64 |              .              | fcf0:0:2:3::/64
#                 |            .   .            |
#                 |          .       .          |
#                 |  fcf0:0:2:4::/64   .        |
#                 |      .               .      |
#             +---+----+                   +----+---+
#             |        |                   |        |
#             |  rt-4  +-------------------+  rt-3  |
#             |        |  fcf0:0:3:4::/64  |        |
#             +---+----+                   +----+---+
#
# Every fcf0:0:x:y::/64 network interconnects the SRv6 routers rt-x with rt-y in
# the selftest network.

Annotation

Implementation Notes