DMYTRO SHYTYI

SRv6 TE Policy, SRv6 BGP, SRv6 ISIS with FRR (FRRouting) and Ubuntu (WSL)

srv6_te_policy

This post describes the SRv6 TE Policy, SRv6 BGP, SRv6 ISIS with FRR (FRRouting) and Ubuntu (WSL). Also it points to the repo with source-code[0] and suggestions[1],

The main goal is to send the ipv4 packet from “src” pc[4] to the “dst” pc[6] with using of Segment Routing IPv6. When ipv4 packet reaches rt1 it arrives to a VRF “vrf10”, it follows the route
[2]. This route has nexthop with 1st segment “fc00:0:6b:1::” that is encoded in SRH. The ipv6 address “fc00:0:6b:1::” corresponds to the DT4 seg6local on the rt6, where “fc00:0:6b::” – rt6 bgp locator. Packet processed further on rt1 by following the ipv6 static colored route[3]. This ipv6 static colored route uses the SRv6 TE Policy. It specifies the segment list followed by the packet. Further the packet is sent based on the SRv6 ISIS topology with exception that it follows the “low-latency” path that is not the same as SPF[5]. The config of src,dst,rt2,rt3,rt4,rt5,rt6 are presented in github-repo-topotest and SRv6 TE Policy + static colored route that describes the specific (“low-latency”) path is presented in this post [7],[8]

To summarize, at the moment when ipv4 packet arrives at rt1 from src, it is encapsulated within IPv6 and SRH headers, that are provided by SRv6 BGP, SRv6 TE Policy + static colored route, and further it is traversing the SRv6 ISIS topology[4].

[0] Code repositories(in progress):
https://github.com/FRRouting/frr/pull/15057
[1] Linux support
Ubuntu 22.04 within WSL was used for the testbed with kernel that has following modules activated:

CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_IPV6_SEG6_LWTUNNEL=y

[2] VRF10, show ip route

rt1# show ip route vrf vrf10
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure
​
VRF vrf10:
B>  10.0.10.0/24 [20/0] via fc00:0:6b::1 (vrf default) (recursive), label 16, seg6 fc00:0:6b:1::, weight 1, 00:00:08
  *                       via fe80::422:c6ff:fe18:f0cb, eth-sw1 (vrf default), label 16, seg6 fc00:0:6b:1::, weight 1, 00:00:0
[..]
rt1# show ip route vrf vrf10
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure
​

VRF vrf10:

B>  10.0.10.0/24 [20/0] via fc00:0:6b::1 (vrf default) (recursive), label 16, seg6 fc00:0:6b:1::, weight 1, 00:00:08
  *                       via fe80::422:c6ff:fe18:f0cb, eth-sw1 (vrf default), label 16, seg6 fc00:0:6b:1::, weight 1, 00:00:0
[..]

[3] show ipv6 routes related to SRv6 TE Policy + static colored route, SRv6 BGP, SRv6 ISIS.

rt1(config)# do show ipv6 route
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

[..]
I>* fc00:0:1::/128 [115/0] is directly connected, sr0, seg6local End USP, weight 1, 00:03:12
L>* fc00:0:1::1/128 is directly connected, lo, 00:03:12
I>* fc00:0:1:1::/128 [115/0] is directly connected, eth-sw1, seg6local End.X nh6 fe80::d026:aeff:fe1e:ffc3, weight 1, 00:03:11
I>* fc00:0:1:2::/128 [115/0] is directly connected, eth-sw1, seg6local End.X nh6 fe80::7094:3eff:feac:6838, weight 1, 00:03:11
[..]
B>* fc00:0:1b:1::/128 [20/0] is directly connected, vrf10, seg6local End.DT4 table 10, weight 1, 00:03:12
S>  fc00:0:6b::/48 [1/0] via fc00:0:6:: (recursive), weight 1, 00:00:03
  *                        via fe80::7094:3eff:feac:6838, eth-sw1, seg6 fc00:0:2::,fc00:0:3::,fc00:0:5::,fc00:0:4::,fc00:0:6::, weight 1, 00:00:03
[..]

[4] Ping from “src” PC.

src# ping 10.0.10.2
PING 10.0.10.2 (10.0.10.2) 56(84) bytes of data.
64 bytes from 10.0.10.2: icmp_seq=1 ttl=63 time=0.768 ms

[5] Packet capture on “rt1” router, when sending ping from “src” to “dst”

root@rt1:/# tcpdump -i any -q
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
04:08:26.078045 eth-src In  IP 10.8.0.2 > 10.0.10.2: ICMP echo request, id 30963, seq 5, length 64
04:08:26.078098 eth-sw1 Out IP6 2001:db8:1::1 > fc00:0:2::: RT6 (len=10, type=4, segleft=4, last-entry=4, tag=0, [0]fc00:0:6::, [1]fc00:0:4::, [2]fc00:0:5::, [3]fc00:0:3::, [4]fc00:0:2::) IP6 2001:db8:1::1 > fc00:0:6b:1::: RT6 (len=2, type=4, segleft=0, last-entry=0, tag=0, [0]fc00:0:6b:1::) IP 10.8.0.2 > 10.0.10.2: ICMP echo request, id 30963, seq 5, length 64

[6] Packet capture on “dst”, when sending packets from “src”

root@dst:/# tcpdump -i any -q
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
04:11:43.114858 eth-rt6 In  IP 10.8.0.2 > 10.0.10.2: ICMP echo request, id 23351, seq 1, length 64
04:11:43.114950 eth-rt6 Out IP 10.0.10.2 > 10.8.0.2: ICMP echo reply, id 23351, seq 1, length 64

[7] Static colored route example

ipv6 route fc00:0:6b::/48 fc00:0:6:: color 1

[8] SRv6 TE Policy with ipv6-address in segment list.

segment-routing
 traffic-eng
  segment-list srv6
   index 1 ipv6-address fc00:0:2::
   index 2 ipv6-address fc00:0:3::
   index 3 ipv6-address fc00:0:5::
   index 4 ipv6-address fc00:0:4::
   index 5 ipv6-address fc00:0:6::
  exit
  policy color 1 endpoint fc00:0:6::
   candidate-path preference 1 name srv6 explicit segment-list srv6
  exit
 exit
exit
!
end

Thank you for reading.