docs: convert plugins doc md->rst
[vpp.git] / src / plugins / srv6-mobile / extra / runner_doc.rst
1 .. _srv6_mobile_runner_doc:
2
3 SRv6 Mobile Runner
4 ==================
5
6 What’s ``runner.py`` doing?
7
8 Common configurations
9 ---------------------
10
11 VPP1
12 ~~~~
13
14 ::
15
16    create host-interface name eth1
17    set int ip addr host-eth1 A1::1/120
18    set int state host-eth1 up
19    ip route add ::/0 via host-eth1 A1::2
20
21 VPP2
22 ~~~~
23
24 ::
25
26    create host-interface name eth1
27    set int ip addr host-eth1 A1::2/120
28    create host-interface name eth2
29    set int ip addr host-eth2 A2::1/120
30    set int state host-eth1 up
31    set int state host-eth2 up
32    ip route add ::/0 via host-eth2 A2::2
33
34 VPP3
35 ~~~~
36
37 ::
38
39    create host-interface name eth1
40    set int ip addr host-eth1 A2::2/120
41    create host-interface name eth2
42    set int ip addr host-eth2 A3::1/120
43    set int state host-eth1 up
44    set int state host-eth2 up
45    ip route add ::/0 via host-eth1 A2::1
46
47 VPP4
48 ~~~~
49
50 ::
51
52    create host-interface name eth1
53    set int ip addr host-eth1 A3::2/120
54    set int state host-eth1 up
55    ip route add ::/0 via host-eth1 A3::1
56
57 Drop-in for GTP-U over IPv4
58 ---------------------------
59
60 Drop-in mode is handy to test both GTP-U-to-SRv6 and SRv6-to-GTP-U
61 functions at same time. Let’s see what’s happened when you run
62 ``test gtp4``:
63
64 ::
65
66    $ ./runner.py test gtp4
67
68 Setting up a virtual interface of packet generator:
69
70 .. _vpp1-1:
71
72 VPP1
73 ~~~~
74
75 ::
76
77    create packet-generator interface pg0
78    set int mac address pg0 aa:bb:cc:dd:ee:01
79    set int ip addr pg0 172.16.0.1/30
80    set ip arp pg0 172.16.0.2/30 aa:bb:cc:dd:ee:02
81
82 .. _vpp4-1:
83
84 VPP4
85 ~~~~
86
87 ::
88
89    create packet-generator interface pg0
90    set int mac address pg0 aa:bb:cc:dd:ee:11
91    set int ip addr pg0 1.0.0.2/30
92    set ip arp pg0 1.0.0.1 aa:bb:cc:dd:ee:22
93
94 SRv6 and IP routing settings:
95
96 .. _vpp1-2:
97
98 VPP1
99 ~~~~
100
101 ::
102
103    sr policy add bsid D4:: next D2:: next D3::
104    sr policy add bsid D5:: behavior t.m.gtp4.d D4::/32 v6src_prefix C1::/64 nhtype ipv4
105    sr steer l3 172.20.0.1/32 via bsid D5::
106
107 .. _vpp2-1:
108
109 VPP2
110 ~~~~
111
112 ::
113
114    sr localsid address D2:: behavior end
115    ip route add D3::/128 via host-eth2 A2::2
116
117 .. _vpp3-1:
118
119 VPP3
120 ~~~~
121
122 ::
123
124    sr localsid address D3:: behavior end
125    ip route add D4::/32 via host-eth2 A3::2
126
127 .. _vpp4-2:
128
129 VPP4
130 ~~~~
131
132 ::
133
134    sr localsid prefix D4::/32 behavior end.m.gtp4.e v4src_position 64
135    ip route add 172.20.0.1/32 via pg0 1.0.0.1