tls: pass session state to engine on client init
[vpp.git] / src / vnet / srv6 / sr_steering.rst
1 .. _srv6_steering_doc:
2
3 Steering packets into a SR Policy
4 =================================
5
6 steer packets using the sr steering policy
7 ------------------------------------------
8
9 To steer packets in Transit into an SR policy (T.Insert, T.Encaps and
10 T.Encaps.L2 behaviors), the user needs to create an ‘sr steering
11 policy’.
12
13 ::
14
15    sr steer l3 2001::/64 via index 1
16    sr steer l3 2001::/64 via bsid cafe::1
17    sr steer l3 2001::/64 via bsid cafe::1 fib-table 3
18    sr steer l3 10.0.0.0/16 via bsid cafe::1
19    sr steer l2 TenGE0/1/0 via bsid cafe::1
20
21 Disclaimer: The T.Encaps.L2 will steer L2 frames into an SR Policy.
22 Notice that creating an SR steering policy for L2 frames will actually
23 automatically *put the interface into promiscous mode*.
24
25 steer packets using the classifier
26 ----------------------------------
27
28 Another way to steer packet is to use the classifier.
29
30 First the user need to manually add the source routing node to the list
31 of the ip6-inacl next nodes. Using the python api this can be done
32 with:
33
34 ::
35
36    # jsonfiles = get list of json api files
37    vpp = VPP(jsonfiles)
38    vpp.add_node_next(node_name='ip6-inacl', next_name='sr-pl-rewrite-insert')
39
40 Below is a classifier mask filtering all the packets from the interface
41 TenGigabitEthernet5/0/0 on ip version and moving all ipv6 packets to the
42 sr-pl-rewrite-insert node (dropping the others) and applying the source
43 routing index 2. In essence, this means “apply this sr policy to all the
44 packets from this interface)
45
46 ::
47
48    vpp# classify table miss-next 0 current-data-flag 1  mask hex f000000000000000 skip 0
49    vpp# classify session acl-hit-next 1 table-index 0 match hex 6000000000000000 action set-sr-policy-index 2
50    vpp# set interface input acl intfc TenGigabitEthernet5/0/0 ip6-table 0