summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-nfv-access-example-usecases/doc/enea_vnf_examples.xml
blob: 3cc5a1893566d984bc4686f06652f11c3956ee05 (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
309
310
311
312
313
314
315
316
317
318
319
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="enea_vnf_examples">
  <title>Enea NFV Access VNF Example Use-cases</title>

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

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

    <remark>FIXME: These filenames may need to be updated</remark>

    <itemizedlist>
      <listitem>
        <para><literal>enea-nfv-access-vnf-qemux86-64.wic.qcow2</literal></para>
      </listitem>

      <listitem>
        <para><literal>enea-vnf-testpmd-fwd.cfg</literal></para>
      </listitem>

      <listitem>
        <para><literal>enea-vnf-testpmd-term.cfg</literal></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 NFV Access VNFs. One VNF
    runs the TestPMD DPDK application forwarding traffic, and the other runs
    the TestPMD in order to terminate traffic.</para>

    <remark>FIXME: New image needed</remark>

    <figure condition="hidden">
      <title>Enea TestPMD VNF Overview</title>

      <mediaobject>
        <imageobject>
          <imagedata align="center"
                     fileref="images/enea_vnf_demo_overview.png" scale="80" />
        </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 NFV Access 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 NFV Access 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 NFV Access 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 NFV
              Access 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 NFV Access 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 NFV
              Access 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: testpmd_fwd</para>
        </listitem>

        <listitem>
          <para>Source: testpmd_fwd, Target: testpmd_term</para>
        </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>

      <figure>
        <title>Traffic Statistics</title>

        <mediaobject>
          <imageobject>
            <imagedata align="center"
                       fileref="images/connection_information.png" scale="70" />
          </imageobject>
        </mediaobject>
        </figure></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>

      <figure>
        <title>TestPMD VNF using PCI passthrough Overview</title>

        <mediaobject>
          <imageobject>
            <imagedata align="center" fileref="images/testPMD_VNF_PCI.png"
                       scale="65" />
          </imageobject>
        </mediaobject>
      </figure>

      <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>

          <figure>
            <title>Selecting the Pktgen VNF Interface</title>

            <mediaobject>
              <imageobject>
                <imagedata align="center"
                           fileref="images/pciPass_interface.png" scale="70" />
              </imageobject>
            </mediaobject>
          </figure>
        </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>

          <figure>
            <title>Selecting the TestPmdForwarder VNF Interface</title>

            <mediaobject>
              <imageobject>
                <imagedata align="center"
                           fileref="images/testpmd_fwdvnf_int.png" scale="70" />
              </imageobject>
            </mediaobject>
          </figure>
        </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>