|
72 | 72 | # Every fcf0:0:x:y::/64 network interconnects the SRv6 routers rt-x with rt-y in
|
73 | 73 | # the selftest network.
|
74 | 74 | #
|
| 75 | +# In addition, every router interface connecting rt-x to rt-y is assigned an |
| 76 | +# IPv6 link-local address fe80::x:y/64. |
| 77 | +# |
75 | 78 | # Local SID/C-SID table
|
76 | 79 | # =====================
|
77 | 80 | #
|
@@ -521,6 +524,9 @@ setup_rt_networking()
|
521 | 524 | ip -netns "${nsname}" addr \
|
522 | 525 | add "${net_prefix}::${rt}/64" dev "${devname}" nodad
|
523 | 526 |
|
| 527 | + ip -netns "${nsname}" addr \ |
| 528 | + add "fe80::${rt}:${neigh}/64" dev "${devname}" nodad |
| 529 | + |
524 | 530 | ip -netns "${nsname}" link set "${devname}" up
|
525 | 531 | done
|
526 | 532 |
|
@@ -609,6 +615,27 @@ set_end_x_nextcsid()
|
609 | 615 | nflen "${LCNODEFUNC_BLEN}" dev "${DUMMY_DEVNAME}"
|
610 | 616 | }
|
611 | 617 |
|
| 618 | +set_end_x_ll_nextcsid() |
| 619 | +{ |
| 620 | + local rt="$1" |
| 621 | + local adj="$2" |
| 622 | + |
| 623 | + eval nsname=\${$(get_rtname "${rt}")} |
| 624 | + lcnode_func_prefix="$(build_lcnode_func_prefix "${rt}")" |
| 625 | + nh6_ll_addr="fe80::${adj}:${rt}" |
| 626 | + oifname="veth-rt-${rt}-${adj}" |
| 627 | + |
| 628 | + # enabled NEXT-C-SID SRv6 End.X behavior via an IPv6 link-local nexthop |
| 629 | + # address (note that "dev" is the dummy dum0 device chosen for the sake |
| 630 | + # of simplicity). |
| 631 | + ip -netns "${nsname}" -6 route \ |
| 632 | + replace "${lcnode_func_prefix}" \ |
| 633 | + table "${LOCALSID_TABLE_ID}" \ |
| 634 | + encap seg6local action End.X nh6 "${nh6_ll_addr}" \ |
| 635 | + oif "${oifname}" flavors next-csid lblen "${LCBLOCK_BLEN}" \ |
| 636 | + nflen "${LCNODEFUNC_BLEN}" dev "${DUMMY_DEVNAME}" |
| 637 | +} |
| 638 | + |
612 | 639 | set_underlay_sids_reachability()
|
613 | 640 | {
|
614 | 641 | local rt="$1"
|
@@ -1016,6 +1043,27 @@ host_vpn_tests()
|
1016 | 1043 |
|
1017 | 1044 | check_and_log_hs_ipv4_connectivity 1 2
|
1018 | 1045 | check_and_log_hs_ipv4_connectivity 2 1
|
| 1046 | + |
| 1047 | + # Setup the adjacencies in the SRv6 aware routers using IPv6 link-local |
| 1048 | + # addresses. |
| 1049 | + # - rt-3 SRv6 End.X adjacency with rt-4 |
| 1050 | + # - rt-4 SRv6 End.X adjacency with rt-1 |
| 1051 | + set_end_x_ll_nextcsid 3 4 |
| 1052 | + set_end_x_ll_nextcsid 4 1 |
| 1053 | + |
| 1054 | + log_section "SRv6 VPN connectivity test hosts (h1 <-> h2, IPv6), link-local" |
| 1055 | + |
| 1056 | + check_and_log_hs_ipv6_connectivity 1 2 |
| 1057 | + check_and_log_hs_ipv6_connectivity 2 1 |
| 1058 | + |
| 1059 | + log_section "SRv6 VPN connectivity test hosts (h1 <-> h2, IPv4), link-local" |
| 1060 | + |
| 1061 | + check_and_log_hs_ipv4_connectivity 1 2 |
| 1062 | + check_and_log_hs_ipv4_connectivity 2 1 |
| 1063 | + |
| 1064 | + # Restore the previous adjacencies. |
| 1065 | + set_end_x_nextcsid 3 4 |
| 1066 | + set_end_x_nextcsid 4 1 |
1019 | 1067 | }
|
1020 | 1068 |
|
1021 | 1069 | __nextcsid_end_x_behavior_test()
|
|
0 commit comments