diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2021-10-08 14:01:27 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2021-10-13 15:32:33 +0000 |
commit | d4a70647e6b8de2cb81cbea3c53d08c299b65cc5 (patch) | |
tree | 4c9e695232b110ea95326ecb86f706d34c065289 /src/vnet/srv6/sr_steering.rst | |
parent | a2c9509a4ab22380937a2b613fcc518da22f5166 (diff) |
docs: convert vpp doc md->rst
Type: improvement
Change-Id: If453321785b04f9c16e8cea36fb1910efaeb2c59
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/srv6/sr_steering.rst')
-rw-r--r-- | src/vnet/srv6/sr_steering.rst | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/vnet/srv6/sr_steering.rst b/src/vnet/srv6/sr_steering.rst new file mode 100644 index 00000000000..b8a82e57550 --- /dev/null +++ b/src/vnet/srv6/sr_steering.rst @@ -0,0 +1,50 @@ +.. _srv6_steering_doc: + +Steering packets into a SR Policy +================================= + +steer packets using the sr steering policy +------------------------------------------ + +To steer packets in Transit into an SR policy (T.Insert, T.Encaps and +T.Encaps.L2 behaviors), the user needs to create an ‘sr steering +policy’. + +:: + + sr steer l3 2001::/64 via index 1 + sr steer l3 2001::/64 via bsid cafe::1 + sr steer l3 2001::/64 via bsid cafe::1 fib-table 3 + sr steer l3 10.0.0.0/16 via bsid cafe::1 + sr steer l2 TenGE0/1/0 via bsid cafe::1 + +Disclaimer: The T.Encaps.L2 will steer L2 frames into an SR Policy. +Notice that creating an SR steering policy for L2 frames will actually +automatically *put the interface into promiscous mode*. + +steer packets using the classifier +---------------------------------- + +Another way to steer packet is to use the classifier. + +First the user need to manually add the source routing node to the list +of the ip6-inacl next nodes. Using the python api this can be done +with: + +:: + + # jsonfiles = get list of json api files + vpp = VPP(jsonfiles) + vpp.add_node_next(node_name='ip6-inacl', next_name='sr-pl-rewrite-insert') + +Below is a classifier mask filtering all the packets from the interface +TenGigabitEthernet5/0/0 on ip version and moving all ipv6 packets to the +sr-pl-rewrite-insert node (dropping the others) and applying the source +routing index 2. In essence, this means “apply this sr policy to all the +packets from this interface) + +:: + + vpp# classify table miss-next 0 current-data-flag 1 mask hex f000000000000000 skip 0 + vpp# classify session acl-hit-next 1 table-index 0 match hex 6000000000000000 action set-sr-policy-index 2 + vpp# set interface input acl intfc TenGigabitEthernet5/0/0 ip6-table 0 |