diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-10 21:13:54 +0100 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-13 12:04:43 +0000 |
commit | 5904a4163d004561b8cb51ad76212a841ce85832 (patch) | |
tree | 4f3be6ea2a1d80f3795bec344af85e680ced2545 /data/templates/frr/zebra.segment_routing.frr.j2 | |
parent | 94380fe28b0a4a5e4bcd3c4efd7d5ac2c68fb3da (diff) | |
download | vyos-1x-5904a4163d004561b8cb51ad76212a841ce85832.tar.gz vyos-1x-5904a4163d004561b8cb51ad76212a841ce85832.zip |
srv6: T591: initial implementation to support locator definition
VyOS CLI
set protocols segment-routing srv6 locator bar prefix '2001:b::/64'
set protocols segment-routing srv6 locator foo behavior-usid
set protocols segment-routing srv6 locator foo prefix '2001:a::/64'
Will generate in FRR
segment-routing
srv6
locators
locator bar
prefix 2001:b::/64 block-len 40 node-len 24 func-bits 16
exit
!
locator foo
prefix 2001:a::/64 block-len 40 node-len 24 func-bits 16
behavior usid
exit
!
exit
!
exit
!
exit
(cherry picked from commit ca301cdd4746187f96ff84e411fda6a84e33f237)
Diffstat (limited to 'data/templates/frr/zebra.segment_routing.frr.j2')
-rw-r--r-- | data/templates/frr/zebra.segment_routing.frr.j2 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/data/templates/frr/zebra.segment_routing.frr.j2 b/data/templates/frr/zebra.segment_routing.frr.j2 new file mode 100644 index 000000000..7b12fcdd0 --- /dev/null +++ b/data/templates/frr/zebra.segment_routing.frr.j2 @@ -0,0 +1,23 @@ +! +{% if srv6.locator is vyos_defined %} +segment-routing + srv6 + locators +{% for locator, locator_config in srv6.locator.items() %} + locator {{ locator }} +{% if locator_config.prefix is vyos_defined %} + prefix {{ locator_config.prefix }} block-len {{ locator_config.block_len }} node-len {{ locator_config.node_len }} func-bits {{ locator_config.func_bits }} +{% endif %} +{% if locator_config.behavior_usid is vyos_defined %} + behavior usid +{% endif %} + exit + ! +{% endfor %} + exit + ! +exit +! +exit +! +{% endif %} |