summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-nfv-access-example-usecases/doc/enea_vnf_examples.xml
blob: 8f111071fad0c9ba16a50e433279128962057acd (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
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="enea_vnf_examples">
  <title>Enea VNF Example Use-cases</title>

  <para>Enea NFV Access is a complete NFV Infrastructure (NFVI) platform
  designed for deployment on white box uCPEs at the customer premise, and
  optimized for common Virtual Customer Premises Equipment (vCPE) and SD-WAN
  use cases.</para>

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

    <para>The following file(s) are needed for this example use-case:
    <literal>enea-nfv-access-vnf-qemux86-64.qcow2</literal>. This image is
    provided with your release.</para>
  </section>

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

    <para>In this use-case, <literal>uCPE device 1</literal> will run pktgen
    (the DPDK application) and <literal>uCPE device 2</literal> will onboard
    and instantiate two VNFs. One VNF will run <literal>testpmd_fwd</literal>,
    forwarding traffic, and the other will run <literal>testpmd_term</literal>
    which will terminate traffic.</para>

    <figure>
      <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">Configuring Network Interfaces on uCPE
      devices:</emphasis></para>

      <orderedlist>
        <listitem>
          <para>Bind the host interfaces to the DPDK by selecting
          <literal>uCPE device 1</literal> first, then accessing
          <literal>Configuration</literal> -&gt;
          <literal>OpenVSwitch</literal> -&gt; <literal>Host
          Interfaces</literal> -&gt; <literal>Add</literal>.</para>
        </listitem>

        <listitem>
          <para>Select the network interface that will be used to connect to
          the second uCPE device and configure it for the DPDK.</para>
        </listitem>

        <listitem>
          <para>Select the <literal>Create</literal> button to send the
          configuration to <literal>uCPE device 1</literal>.</para>
        </listitem>

        <listitem>
          <para>Repeat these same steps on <literal>uCPE device
          2</literal>.</para>
        </listitem>

        <listitem>
          <para>Click the <literal>Add</literal> button from the Bridges
          tab.</para>
        </listitem>

        <listitem>
          <para>Create an Open vSwitch bridge (<literal>ovsbr0</literal>) on
          <literal>uCPE device 1</literal> that uses one DPDK interface, by
          selecting <literal>uCPE device 1</literal>, then:
          <literal>Configuration</literal> -&gt;<literal>OpenVSwitch</literal>
          -&gt;<literal>Bridges</literal>.</para>
        </listitem>
      </orderedlist>

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

      <orderedlist>
        <listitem>
          <para>Select <literal>VNF</literal>
          -&gt;<literal>Descriptor</literal> -&gt;
          <literal>On-board</literal>.</para>
        </listitem>

        <listitem>
          <para>Select the <literal>VM Image</literal> radio button.</para>
        </listitem>

        <listitem>
          <para>Provide the path to the qcow image by selecting
          <literal>Browse </literal> from the <literal>VM image file</literal>
          option.</para>
        </listitem>

        <listitem>
          <para>Fill the required fields below and press
          <literal>Onboard</literal>:</para>

          <itemizedlist spacing="compact">
            <listitem>
              <para><emphasis role="bold">Memory in MB</emphasis>: 1024</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">Nr. of CPUs</emphasis>: 1</para>
            </listitem>

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

      <para><emphasis role="bold">Instantiating two VNFs on uCPE device
      2:</emphasis></para>

      <orderedlist>
        <listitem>
          <para>Select uCPE device 2, then access <literal>VNF</literal> -&gt;
          <literal>Instances</literal> -&gt; <literal>Add</literal>.</para>
        </listitem>

        <listitem>
          <para>Fill-in the required fields and click
          <literal>Create</literal>.</para>
        </listitem>

        <listitem>
          <para>Configure VNF 1 to forward traffic.</para>
        </listitem>

        <listitem>
          <para>Configure VNF 2 to terminate traffic.</para>
        </listitem>

        <listitem>
          <para>Add Open vSwitch flows to control this traffic:</para>

          <figure>
            <title>Configuring the FWD flow</title>

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

          <figure>
            <title>Configuring the TERM flow</title>

            <mediaobject>
              <imageobject>
                <imagedata align="center" fileref="images/flow_term.png"
                           scale="90" />
              </imageobject>
            </mediaobject>
          </figure>
        </listitem>

        <listitem>
          <para>Start pktgen on uCPE device 1. Connect to the device by
          selecting it first, then access <literal>SSH</literal> -&gt;
          <literal>user</literal> (root) and perform the following:</para>

          <programlisting>cd /usr/share/apps/pktgen/
./pktgen -c 0x7 -n 4 --proc-type auto --socket-mem 256 -w 0000:05:00.3 -- \
-P -m "[1:2].0"
Pktgen:/&gt; start 0</programlisting>

          <note>
            <para>The PCI address &lt;0000:05:00.3&gt; used in this example
            varies depending on the uCPE device. To determine the exact PCI
            address used, look in the uCPE device specific Network
            configuration.</para>
          </note>
        </listitem>
      </orderedlist>
    </section>

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

      <para>Connect to the forwarder VNF in order to check the traffic
      statistics, by selecting the uCPE device first, then accessing
      <literal>SSH</literal> -&gt; <literal>user</literal> (root):</para>

      <programlisting>Virsh list
Virsh console 1
# 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>
    </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>