summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-edge-example-usecases/doc/enea_test_vnf_examples.xml
blob: 0c3815ee79ffd63ecfa25c4957074f6ee3530cea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<?xml version="1.0" encoding="UTF-8"?>
<chapter condition="hidden" id="enea_vnf_examples">
  <title>Enea Test VNF Example Use-cases</title>

  <para>The Enea Test VNF is a simple Enea Linux based VM, which can be used
  for various testing purposes, by using basic DPDK applications (e.g.
  testpmd) as well as non-DPDK tools (e.g. iPerf3). For more information about
  the Testpmd application please see the <ulink
  url="https://doc.dpdk.org/guides/testpmd_app_ug">Testpmd Application User
  Guide</ulink>.</para>

  <section id="prere_enea_vnf">
    <title>Prerequisites</title>

    <para>Two uCPE devices will be required for this setup. The system
    requirements for each uCPE device are:</para>

    <itemizedlist>
      <listitem>
        <para>2 Network Interfaces. One for the Enea Edge Management
        application and one for data traffic.</para>
      </listitem>

      <listitem>
        <para>2 GB of RAM memory</para>
      </listitem>
    </itemizedlist>

    <para>The following files are needed for this example use case:</para>

    <itemizedlist>
      <listitem>
        <para>VNF image: Enea Test VNF. Please contact Enea to get this
        image.</para>
      </listitem>

      <para>VNF Configuration files. These files are provided with your Enea
      Edge release:</para>

      <listitem>
        <para><filename>enea-vnf-testpmd-fwd.conf</filename>.</para>
      </listitem>

      <listitem>
        <para><filename>enea-vnf-testpmd-term.conf</filename>.</para>
      </listitem>
    </itemizedlist>
  </section>

  <section id="enea_vnf">
    <title>TestPMD VNF</title>

    <para>In this use-case, uCPE device 1 runs the pktgen DPDK application to
    generate traffic and uCPE device 2 runs two Enea Test VNFs. One VNF runs
    the TestPMD DPDK application forwarding traffic, and the other runs the
    TestPMD in order to terminate traffic.</para>

    <figure>
      <title>TestPMD VNF Overview</title>

      <mediaobject>
        <imageobject>
          <imagedata align="center" contentwidth="600"
                     fileref="images/uc_enea_test_vnf.png" />
        </imageobject>
      </mediaobject>
    </figure>

    <section id="enea_vnf_setup">
      <title>Use-case Setup</title>

      <para><emphasis role="bold">Network Configuration:</emphasis></para>

      <orderedlist>
        <listitem>
          <para>Select uCPE device 1, access <literal>Configuration</literal>,
          add the network interface that will be used and configure it for
          DPDK. Note the PCI address of the interface, it will be used later
          to run the pktgen application.</para>
        </listitem>

        <listitem>
          <para>Select uCPE device 2, access <literal>Configuration</literal>,
          add the network interface that will be used and configure it for
          DPDK.</para>
        </listitem>

        <listitem>
          <para>Create an OVS bridge on uCPE device 2 and attach the DPDK
          interface.</para>
        </listitem>
      </orderedlist>

      <para><emphasis role="bold">Onboarding the VNF:</emphasis></para>

      <para>Onboard the Enea Test VNF by filling the required fields with the
      following values:</para>

      <itemizedlist spacing="compact">
        <listitem>
          <para><emphasis role="bold">VM Image File</emphasis>: Provide the
          path to the Enea Test VNF qcow2 image.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Memory in MB</emphasis>: 2048</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Num of CPUs</emphasis>: 2</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Storage in GB</emphasis>: 10</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Interfaces</emphasis>: Add 1
          interface.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Cloud-init Datasource</emphasis>:
          NoCloud</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Cloud-init Disk Type</emphasis>:
          disk</para>
        </listitem>
      </itemizedlist>

      <para><emphasis role="bold">Instantiating the VNFs:</emphasis></para>

      <orderedlist>
        <listitem>
          <para>Instantiate the Enea Edge TestPMD forwarding VNF on uCPE
          Device 2 by filling the required fields with the following
          values:</para>

          <itemizedlist spacing="compact">
            <listitem>
              <para><emphasis role="bold">Name</emphasis>: testpmd_fwd</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">VNF Type</emphasis>: Select Enea
              Test VNF.</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">uCPE Device</emphasis>: Select uCPE
              device 2.</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">Cloud Init File</emphasis>: Provide
              the path to the Enea VNF TestPMD forwarding cloud-init
              file.</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">Interfaces</emphasis>: Set the
              interface type to <literal>DPDK</literal> and select the OVS
              bridge created above.</para>
            </listitem>
          </itemizedlist>
        </listitem>

        <listitem>
          <para>Instantiate the Enea Edge TestPMD termination VNF on uCPE
          Device 2 by filling the required fields with the following
          values:</para>

          <itemizedlist spacing="compact">
            <listitem>
              <para><emphasis role="bold">Name</emphasis>: testpmd_term</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">VNF Type</emphasis>: Select Enea
              Test VNF.</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">uCPE Device</emphasis>: Select uCPE
              device 2.</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">Cloud Init File</emphasis>: Provide
              the path to the Enea VNF TestPMD termination cloud-init
              file.</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">Interfaces</emphasis>: Set the
              interface type to <literal>DPDK</literal> and select the OVS
              bridge created above.</para>
            </listitem>
          </itemizedlist>
        </listitem>
      </orderedlist>

      <para><emphasis role="bold">Creating OVS flow rules:</emphasis></para>

      <para>Select uCPE device 2, access <literal>Configuration</literal>,
      open the OVS bridge and add two flow rules:</para>

      <itemizedlist>
        <listitem>
          <para>Source: DPDK interface, Target:
          <literal>testpmd_fwd</literal>.</para>
        </listitem>

        <listitem>
          <para>Source: <literal>testpmd_fwd</literal>, Target:
          <literal>testpmd_term</literal>.</para>

          <note>
            <para>The flow rules can be described using either the Enea Edge
            Management interface or the configuration files.</para>
          </note>
        </listitem>
      </itemizedlist>
    </section>

    <section id="test_ena_vnf">
      <title>Testing the Use-case</title>

      <orderedlist>
        <listitem>
          <para>SSH to uCPE device 1 (Username: root) and start the pktgen
          application:</para>

          <programlisting>cd /usr/share/apps/pktgen/
./pktgen -c 0x7 -n 4 --proc-type auto --socket-mem 256 -w 0000:01:00.0 -- \
  -P -m "[1:2].0"

Pktgen:/&gt; start 0</programlisting>

          <note>
            <para>Replace 0000:01:00.0 with the actual PCI address of the
            network interface used on uCPE device 1.</para>
          </note>
        </listitem>

        <listitem>
          <para>SSH to uCPE device 2 and connect to the TestPMD forwarding VNF
          console:</para>

          <programlisting>virsh list
virsh console &lt;id of testpmd fwd&gt;</programlisting>
        </listitem>

        <listitem>
          <para>Check the TestPMD traffic forwarding statistics:</para>

          <programlisting># qemux86-64 login: root
tail -f /var/log/testpmd-out</programlisting>
        </listitem>
      </orderedlist>
    </section>

    <section condition="hidden" id="vnf_pci">
      <title>TestPMD VNF using PCI passthrough</title>

      <para>In this use case, uCPE device 1 will run the Pktgen and uCPE
      device 2 will run the TestPMD VNF. Both will be using PCI
      passthrough:</para>

      <orderedlist>
        <listitem>
          <para>Make sure that neither uCPE device 1 nor uCPE device 2 have
          any configured host interfaces by selcting uCPE device :
          <literal>Configuration</literal> -&gt;
          <literal>OpenVSwitch</literal> -&gt; <literal>Host
          Interfaces</literal>.</para>
        </listitem>

        <listitem>
          <para>On uCPE device 1 start the Pktgen VNF. Select
          <literal>PciPassthrough</literal> as the Interface type.</para>

          <para>From the drop-down list, select the PCI interface
          corresponding to the NIC which is connected to uCPE device 2:</para>
        </listitem>

        <listitem>
          <para>On uCPE device 2, start the TestPmdForwarder VNF. Select
          "PciPassthrough" as the Interface type. From the drop-down list,
          select the PCI interface corresponding to the NIC which is connected
          to uCPE device 1:</para>
        </listitem>

        <listitem>
          <para>To check that traffic is being forwarded from uCPE device 2,
          SSH to the uCPE device and connect to the VNFs console:</para>

          <programlisting>Right click on uCPE device  2 and select SSH.
Run: virsh list
Run: virsh console [VM NAME]
Run: tail -f /opt/testpmd-out</programlisting>
        </listitem>
      </orderedlist>
    </section>
  </section>
</chapter>