diff options
author | mrpa <miruna.paun@enea.com> | 2021-04-09 10:45:40 +0200 |
---|---|---|
committer | Miruna Paun <mrpa@enea.se> | 2021-04-09 11:48:15 +0100 |
commit | 43021dae86481d75899c7e512f6d2f9cd9dce48a (patch) | |
tree | d528b0979bb9bf8099113671dca050b2d8fd9ba9 /doc/book-enea-edge-example-usecases/doc/enea_test_vnf_examples.xml | |
parent | 722fc206fafbc809f6b664fa403e06fd2b12591b (diff) | |
parent | 13dbb438ecad3d66173994a2f300497a6d9d15c0 (diff) | |
download | nfv-access-documentation-43021dae86481d75899c7e512f6d2f9cd9dce48a.tar.gz |
Merge the code from develop to master for 2.4.0Enea_NFV_Access_2.4.0hotfix_EDGESC-6feature_CPDX-3546EE240_HotFix1
Change-Id: Ibc844e001b7d75125d6006fa5333cc65bbf5afa4
Diffstat (limited to 'doc/book-enea-edge-example-usecases/doc/enea_test_vnf_examples.xml')
-rw-r--r-- | doc/book-enea-edge-example-usecases/doc/enea_test_vnf_examples.xml | 308 |
1 files changed, 308 insertions, 0 deletions
diff --git a/doc/book-enea-edge-example-usecases/doc/enea_test_vnf_examples.xml b/doc/book-enea-edge-example-usecases/doc/enea_test_vnf_examples.xml new file mode 100644 index 0000000..0c3815e --- /dev/null +++ b/doc/book-enea-edge-example-usecases/doc/enea_test_vnf_examples.xml | |||
@@ -0,0 +1,308 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <chapter condition="hidden" id="enea_vnf_examples"> | ||
3 | <title>Enea Test VNF Example Use-cases</title> | ||
4 | |||
5 | <para>The Enea Test VNF is a simple Enea Linux based VM, which can be used | ||
6 | for various testing purposes, by using basic DPDK applications (e.g. | ||
7 | testpmd) as well as non-DPDK tools (e.g. iPerf3). For more information about | ||
8 | the Testpmd application please see the <ulink | ||
9 | url="https://doc.dpdk.org/guides/testpmd_app_ug">Testpmd Application User | ||
10 | Guide</ulink>.</para> | ||
11 | |||
12 | <section id="prere_enea_vnf"> | ||
13 | <title>Prerequisites</title> | ||
14 | |||
15 | <para>Two uCPE devices will be required for this setup. The system | ||
16 | requirements for each uCPE device are:</para> | ||
17 | |||
18 | <itemizedlist> | ||
19 | <listitem> | ||
20 | <para>2 Network Interfaces. One for the Enea Edge Management | ||
21 | application and one for data traffic.</para> | ||
22 | </listitem> | ||
23 | |||
24 | <listitem> | ||
25 | <para>2 GB of RAM memory</para> | ||
26 | </listitem> | ||
27 | </itemizedlist> | ||
28 | |||
29 | <para>The following files are needed for this example use case:</para> | ||
30 | |||
31 | <itemizedlist> | ||
32 | <listitem> | ||
33 | <para>VNF image: Enea Test VNF. Please contact Enea to get this | ||
34 | image.</para> | ||
35 | </listitem> | ||
36 | |||
37 | <para>VNF Configuration files. These files are provided with your Enea | ||
38 | Edge release:</para> | ||
39 | |||
40 | <listitem> | ||
41 | <para><filename>enea-vnf-testpmd-fwd.conf</filename>.</para> | ||
42 | </listitem> | ||
43 | |||
44 | <listitem> | ||
45 | <para><filename>enea-vnf-testpmd-term.conf</filename>.</para> | ||
46 | </listitem> | ||
47 | </itemizedlist> | ||
48 | </section> | ||
49 | |||
50 | <section id="enea_vnf"> | ||
51 | <title>TestPMD VNF</title> | ||
52 | |||
53 | <para>In this use-case, uCPE device 1 runs the pktgen DPDK application to | ||
54 | generate traffic and uCPE device 2 runs two Enea Test VNFs. One VNF runs | ||
55 | the TestPMD DPDK application forwarding traffic, and the other runs the | ||
56 | TestPMD in order to terminate traffic.</para> | ||
57 | |||
58 | <figure> | ||
59 | <title>TestPMD VNF Overview</title> | ||
60 | |||
61 | <mediaobject> | ||
62 | <imageobject> | ||
63 | <imagedata align="center" contentwidth="600" | ||
64 | fileref="images/uc_enea_test_vnf.png" /> | ||
65 | </imageobject> | ||
66 | </mediaobject> | ||
67 | </figure> | ||
68 | |||
69 | <section id="enea_vnf_setup"> | ||
70 | <title>Use-case Setup</title> | ||
71 | |||
72 | <para><emphasis role="bold">Network Configuration:</emphasis></para> | ||
73 | |||
74 | <orderedlist> | ||
75 | <listitem> | ||
76 | <para>Select uCPE device 1, access <literal>Configuration</literal>, | ||
77 | add the network interface that will be used and configure it for | ||
78 | DPDK. Note the PCI address of the interface, it will be used later | ||
79 | to run the pktgen application.</para> | ||
80 | </listitem> | ||
81 | |||
82 | <listitem> | ||
83 | <para>Select uCPE device 2, access <literal>Configuration</literal>, | ||
84 | add the network interface that will be used and configure it for | ||
85 | DPDK.</para> | ||
86 | </listitem> | ||
87 | |||
88 | <listitem> | ||
89 | <para>Create an OVS bridge on uCPE device 2 and attach the DPDK | ||
90 | interface.</para> | ||
91 | </listitem> | ||
92 | </orderedlist> | ||
93 | |||
94 | <para><emphasis role="bold">Onboarding the VNF:</emphasis></para> | ||
95 | |||
96 | <para>Onboard the Enea Test VNF by filling the required fields with the | ||
97 | following values:</para> | ||
98 | |||
99 | <itemizedlist spacing="compact"> | ||
100 | <listitem> | ||
101 | <para><emphasis role="bold">VM Image File</emphasis>: Provide the | ||
102 | path to the Enea Test VNF qcow2 image.</para> | ||
103 | </listitem> | ||
104 | |||
105 | <listitem> | ||
106 | <para><emphasis role="bold">Memory in MB</emphasis>: 2048</para> | ||
107 | </listitem> | ||
108 | |||
109 | <listitem> | ||
110 | <para><emphasis role="bold">Num of CPUs</emphasis>: 2</para> | ||
111 | </listitem> | ||
112 | |||
113 | <listitem> | ||
114 | <para><emphasis role="bold">Storage in GB</emphasis>: 10</para> | ||
115 | </listitem> | ||
116 | |||
117 | <listitem> | ||
118 | <para><emphasis role="bold">Interfaces</emphasis>: Add 1 | ||
119 | interface.</para> | ||
120 | </listitem> | ||
121 | |||
122 | <listitem> | ||
123 | <para><emphasis role="bold">Cloud-init Datasource</emphasis>: | ||
124 | NoCloud</para> | ||
125 | </listitem> | ||
126 | |||
127 | <listitem> | ||
128 | <para><emphasis role="bold">Cloud-init Disk Type</emphasis>: | ||
129 | disk</para> | ||
130 | </listitem> | ||
131 | </itemizedlist> | ||
132 | |||
133 | <para><emphasis role="bold">Instantiating the VNFs:</emphasis></para> | ||
134 | |||
135 | <orderedlist> | ||
136 | <listitem> | ||
137 | <para>Instantiate the Enea Edge TestPMD forwarding VNF on uCPE | ||
138 | Device 2 by filling the required fields with the following | ||
139 | values:</para> | ||
140 | |||
141 | <itemizedlist spacing="compact"> | ||
142 | <listitem> | ||
143 | <para><emphasis role="bold">Name</emphasis>: testpmd_fwd</para> | ||
144 | </listitem> | ||
145 | |||
146 | <listitem> | ||
147 | <para><emphasis role="bold">VNF Type</emphasis>: Select Enea | ||
148 | Test VNF.</para> | ||
149 | </listitem> | ||
150 | |||
151 | <listitem> | ||
152 | <para><emphasis role="bold">uCPE Device</emphasis>: Select uCPE | ||
153 | device 2.</para> | ||
154 | </listitem> | ||
155 | |||
156 | <listitem> | ||
157 | <para><emphasis role="bold">Cloud Init File</emphasis>: Provide | ||
158 | the path to the Enea VNF TestPMD forwarding cloud-init | ||
159 | file.</para> | ||
160 | </listitem> | ||
161 | |||
162 | <listitem> | ||
163 | <para><emphasis role="bold">Interfaces</emphasis>: Set the | ||
164 | interface type to <literal>DPDK</literal> and select the OVS | ||
165 | bridge created above.</para> | ||
166 | </listitem> | ||
167 | </itemizedlist> | ||
168 | </listitem> | ||
169 | |||
170 | <listitem> | ||
171 | <para>Instantiate the Enea Edge TestPMD termination VNF on uCPE | ||
172 | Device 2 by filling the required fields with the following | ||
173 | values:</para> | ||
174 | |||
175 | <itemizedlist spacing="compact"> | ||
176 | <listitem> | ||
177 | <para><emphasis role="bold">Name</emphasis>: testpmd_term</para> | ||
178 | </listitem> | ||
179 | |||
180 | <listitem> | ||
181 | <para><emphasis role="bold">VNF Type</emphasis>: Select Enea | ||
182 | Test VNF.</para> | ||
183 | </listitem> | ||
184 | |||
185 | <listitem> | ||
186 | <para><emphasis role="bold">uCPE Device</emphasis>: Select uCPE | ||
187 | device 2.</para> | ||
188 | </listitem> | ||
189 | |||
190 | <listitem> | ||
191 | <para><emphasis role="bold">Cloud Init File</emphasis>: Provide | ||
192 | the path to the Enea VNF TestPMD termination cloud-init | ||
193 | file.</para> | ||
194 | </listitem> | ||
195 | |||
196 | <listitem> | ||
197 | <para><emphasis role="bold">Interfaces</emphasis>: Set the | ||
198 | interface type to <literal>DPDK</literal> and select the OVS | ||
199 | bridge created above.</para> | ||
200 | </listitem> | ||
201 | </itemizedlist> | ||
202 | </listitem> | ||
203 | </orderedlist> | ||
204 | |||
205 | <para><emphasis role="bold">Creating OVS flow rules:</emphasis></para> | ||
206 | |||
207 | <para>Select uCPE device 2, access <literal>Configuration</literal>, | ||
208 | open the OVS bridge and add two flow rules:</para> | ||
209 | |||
210 | <itemizedlist> | ||
211 | <listitem> | ||
212 | <para>Source: DPDK interface, Target: | ||
213 | <literal>testpmd_fwd</literal>.</para> | ||
214 | </listitem> | ||
215 | |||
216 | <listitem> | ||
217 | <para>Source: <literal>testpmd_fwd</literal>, Target: | ||
218 | <literal>testpmd_term</literal>.</para> | ||
219 | |||
220 | <note> | ||
221 | <para>The flow rules can be described using either the Enea Edge | ||
222 | Management interface or the configuration files.</para> | ||
223 | </note> | ||
224 | </listitem> | ||
225 | </itemizedlist> | ||
226 | </section> | ||
227 | |||
228 | <section id="test_ena_vnf"> | ||
229 | <title>Testing the Use-case</title> | ||
230 | |||
231 | <orderedlist> | ||
232 | <listitem> | ||
233 | <para>SSH to uCPE device 1 (Username: root) and start the pktgen | ||
234 | application:</para> | ||
235 | |||
236 | <programlisting>cd /usr/share/apps/pktgen/ | ||
237 | ./pktgen -c 0x7 -n 4 --proc-type auto --socket-mem 256 -w 0000:01:00.0 -- \ | ||
238 | -P -m "[1:2].0" | ||
239 | |||
240 | Pktgen:/> start 0</programlisting> | ||
241 | |||
242 | <note> | ||
243 | <para>Replace 0000:01:00.0 with the actual PCI address of the | ||
244 | network interface used on uCPE device 1.</para> | ||
245 | </note> | ||
246 | </listitem> | ||
247 | |||
248 | <listitem> | ||
249 | <para>SSH to uCPE device 2 and connect to the TestPMD forwarding VNF | ||
250 | console:</para> | ||
251 | |||
252 | <programlisting>virsh list | ||
253 | virsh console <id of testpmd fwd></programlisting> | ||
254 | </listitem> | ||
255 | |||
256 | <listitem> | ||
257 | <para>Check the TestPMD traffic forwarding statistics:</para> | ||
258 | |||
259 | <programlisting># qemux86-64 login: root | ||
260 | tail -f /var/log/testpmd-out</programlisting> | ||
261 | </listitem> | ||
262 | </orderedlist> | ||
263 | </section> | ||
264 | |||
265 | <section condition="hidden" id="vnf_pci"> | ||
266 | <title>TestPMD VNF using PCI passthrough</title> | ||
267 | |||
268 | <para>In this use case, uCPE device 1 will run the Pktgen and uCPE | ||
269 | device 2 will run the TestPMD VNF. Both will be using PCI | ||
270 | passthrough:</para> | ||
271 | |||
272 | <orderedlist> | ||
273 | <listitem> | ||
274 | <para>Make sure that neither uCPE device 1 nor uCPE device 2 have | ||
275 | any configured host interfaces by selcting uCPE device : | ||
276 | <literal>Configuration</literal> -> | ||
277 | <literal>OpenVSwitch</literal> -> <literal>Host | ||
278 | Interfaces</literal>.</para> | ||
279 | </listitem> | ||
280 | |||
281 | <listitem> | ||
282 | <para>On uCPE device 1 start the Pktgen VNF. Select | ||
283 | <literal>PciPassthrough</literal> as the Interface type.</para> | ||
284 | |||
285 | <para>From the drop-down list, select the PCI interface | ||
286 | corresponding to the NIC which is connected to uCPE device 2:</para> | ||
287 | </listitem> | ||
288 | |||
289 | <listitem> | ||
290 | <para>On uCPE device 2, start the TestPmdForwarder VNF. Select | ||
291 | "PciPassthrough" as the Interface type. From the drop-down list, | ||
292 | select the PCI interface corresponding to the NIC which is connected | ||
293 | to uCPE device 1:</para> | ||
294 | </listitem> | ||
295 | |||
296 | <listitem> | ||
297 | <para>To check that traffic is being forwarded from uCPE device 2, | ||
298 | SSH to the uCPE device and connect to the VNFs console:</para> | ||
299 | |||
300 | <programlisting>Right click on uCPE device 2 and select SSH. | ||
301 | Run: virsh list | ||
302 | Run: virsh console [VM NAME] | ||
303 | Run: tail -f /opt/testpmd-out</programlisting> | ||
304 | </listitem> | ||
305 | </orderedlist> | ||
306 | </section> | ||
307 | </section> | ||
308 | </chapter> \ No newline at end of file | ||