summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-nfv-access-example-usecases/doc/forti_vnf_examples.xml
blob: a56fc0acedf293c8fb7c211f2d33d87e7530bab9 (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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="vnf_fortigate">
  <title>FortiGate VNF Example Use-cases</title>

  <para>FortiGate virtual appliances feature all of the security and
  networking services common to traditional hardware-based FortiGate
  appliances. The virtual appliances can be integrated in Firewall or SD-WAN
  solution development.</para>

  <section id="fortigate_firewall_uc_1">
    <title>FortiGate VNF as a Firewall</title>

    <para>Enea provides an example of a simple basic firewall configuration
    for the FortiGate VNF. FortiGate In-Band Management is a feature used for
    running FortiGate Management traffic over WAN.</para>

    <para>Instructions on how to alter the default configuration are provided
    in section <olink targetdoc="book_enea_nfv_access_example_usecases"
    targetptr="fortigate_webmg">FortiGate VNF Web Management in the
    <xi:include href="../../s_docbuild/olinkdb/pardoc-names.xml"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xpointer="element(book_enea_nfv_access_example_usecases/1)" /></olink>
    Manual.</para>

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

      <para>System requirements for the uCPE device:</para>

      <itemizedlist>
        <listitem>
          <para>4 x Network Interfaces</para>
        </listitem>

        <listitem>
          <para>4 cores</para>
        </listitem>

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

      <para>The following file(s) are needed for this example use-case:</para>

      <itemizedlist>
        <listitem>
          <para>FortiGate VNF image. Please contact Fortinet to get a VNF image and
          its license file.</para>
        </listitem>

        <listitem><para>VNF Configuration file(s), provided with your Enea NFV Access
        release: <filename>fortigate-basic-fw.conf</filename>.</para>
        </listitem>
        </itemizedlist>
    </section>

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

      <figure>
        <title>Fortigate VNF as a Firewall</title>

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

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

      <para>Since the firewall uses three External Network Interfaces, three
      bridges need to be configured. Each bridge provides the ability to connect a physical network interface to the virtual network interface of a VM.</para>

	<para><emphasis role="bold">Setup of the uCPE device:</emphasis></para>

      <orderedlist>
        <listitem>
          <para>Connect WAN to the Lab Network.</para>
        </listitem>

        <listitem>
          <para>Connect LAN1 to the Test Machine.</para>
        </listitem>

        <listitem>
          <para>Leave LAN2 unconnected.</para>
        </listitem>

        <listitem>
          <para>Connect ETH0 to the Lab Network (for Enea uCPE Manager communications).</para>
        </listitem>

        <listitem>
          <para>Select the uCPE device, access
          <literal>Configuration</literal> and bind the three physical network
          interfaces to DPDK.</para>
        </listitem>

        <listitem>
          <para>Create three OVS bridges, one for each DPDK network interface
          (WAN, LAN1 and LAN2).</para>

      <para>Alternatively, the firewall can be setup to use bridges as
      connection points for the FortiGate VNF, by replacing the OVS-DPDK
      bridges with SR-IOV connection points.</para>

      <para>Please note that while previously three physical interfaces were
      presumed necessary for VNF connection, in the case of a firewall setup
      only two physical interfaces are required for the data path (one for WAN
      and one for LAN).</para>

      <para>Only two interfaces will be configured as DPDK, with two bridges
      created, one for each type of connection.</para>

      <note>
        <para>At VNF instantiation instead of assigning distinct bridges for
        each LAN interface, only one will be used for both LAN1 and LAN2, with
        no changes in WAN interface configuration.</para>
      </note>
        </listitem>
      </orderedlist>

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

      <para>Onboard the FortiGate 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 FortiGate VNF qcow2 image.</para>
        </listitem>

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

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

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

        <listitem>
          <para><emphasis role="bold">Interfaces</emphasis>: Add 3
          interfaces (wan, lan1 and lan2).</para>
        </listitem>

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

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

        <listitem>
          <para><emphasis role="bold">Cloud-init content file</emphasis>: Add
          a license file entry.</para>
        </listitem>
      </itemizedlist>

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

      <para>Instantiate the FortiGate VNF by filling the required fields with
      the following values:</para>

      <itemizedlist spacing="compact">
        <listitem>
          <para><emphasis role="bold">Name</emphasis>: Name of the VM which
          will be created on the uCPE device.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">VNF Type</emphasis>: Name of the
          onboarded VNF.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">uCPE Device</emphasis>: Select the uCPE
          device where the VNF will be instantiated.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">License file</emphasis>: The FortiGate
          license file provided by Fortinet.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Configuration file</emphasis>: The
          Firewall example configuration file provided by Enea
          (<filename>fortigate-basic-fw.conf</filename>).</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Port1 - WAN</emphasis>: Set the
          <literal>External Interface</literal> type to
          <literal>DPDK</literal> and connect it to the
          <literal>wan_br</literal> ovs bridge.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Port2 - LAN1</emphasis>: Set the
          <literal>Incoming Interface</literal> type to
          <literal>DPDK</literal> and connect it to the
          <literal>lan1_br</literal> ovs bridge.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Port3 - LAN2</emphasis>: Set the
          <literal>Outgoing Interface</literal> type to
          <literal>DPDK</literal> and connect it to the
          <literal>lan2_br</literal> ovs bridge.</para>

          <note>
            <para>The names of the ports used during instantiation need to be
            the same as the ones described above, as the same names will be used in
            the configuration files provided for this example use-case.
            </para>
          </note>
        </listitem>
      </itemizedlist>
    </section>

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

      <para>Connect the Test Machine on the LAN interface and access the
      internet from the Test Machine to use the firewall on the uCPE
      device.</para>

      <note>
        <para>The connected Test Machine can be a laptop or a uCPE device. It
        must have one interface configured to get a dynamic IP from a DHCP
        server. The <literal>dhclient &lt;interface&gt;</literal> command can
        be used to request an IP address. The received IP must be in the
        172.16.1.2 - 172.16.1.255 range.</para>
      </note>

      <para>The FortiGate VNF management interface is accessible through the
      WAN interface. The WAN IP address can be used from a web browser on the
      Lab Machine to access the FortiGate VNF Management Web UI. Please check
      <olink targetdoc="book_enea_nfv_access_example_usecases"
      targetptr="fortigate_webmg">FortiGate VNF web management<xi:include
      href="../../s_docbuild/olinkdb/pardoc-names.xml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xpointer="element(book_enea_nfv_access_example_usecases/1)" /></olink>
      for more information.</para>
    </section>
  </section>

  <section id="fortigate_sdwan_vpn">
    <title>FortiGate VNF as an SD-WAN or a VPN</title>

    <para>SD-WAN decouples the network from the management plane, detaching
    traffic management and monitoring functions from hardware. Most forms of
    SD-WAN technology create a virtual overlay that is transport-agnostic,
    i.e. it abstracts underlying private or public WAN connections.</para>

    <para>For deployment, the user plugs in WAN links into the device, which
    automatically configures itself with the network.</para>

    <para>Example SD-WAN configurations for the FortiGate VNF are provided by
    Enea.</para>

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

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

      <itemizedlist>
        <listitem>
          <para>4 x Network Interfaces</para>
        </listitem>

        <listitem>
          <para>4 cores</para>
        </listitem>

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

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

      <itemizedlist>
        <listitem>
          <para>FortiGate VNF image. Please contact Fortinet to get a VNF image and
          its license file.</para>
        </listitem>

        <listitem><para>VNF Configuration file(s), provided with your Enea NFV Access
        release: <filename>fortigate-sdwan&lt;x&gt;.conf</filename>.</para></listitem>
        </itemizedlist>
    </section>

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

      <figure>
        <title>Fortigate VNF as an SD-WAN or a VPN</title>

        <mediaobject>
          <imageobject>
            <imagedata align="center" contentwidth="600"
                       fileref="images/uc_fortigate_sdwan.png" />
          </imageobject>
        </mediaobject>
      </figure>
      
       <note>
         <para>When connecting, the uCPE devices can use a back-to-back or a VPN connection. 
           An appropriate interface with the required capabilities needs to be chosen for 
           this purpose.</para>
          </note>

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

      <para>Since the SD-WAN VNF uses three External Network Interfaces, three
      bridges need to be configured. Each bridge provides the ability to
      connect a physical network interface to the VM's virtual network
      interface.</para>

      <para>Each VNF instance will have a virtual interface for VNF
      management, for the WAN network and for LAN communication.</para>

      <para><emphasis role="bold">Setup of an Intel Whitebox uCPE device</emphasis>:</para>

      <orderedlist>
	   <listitem>
          <para>Connect the <literal>VNFMgr</literal> interfaces to the Lab Network for VNF management access.</para>
        </listitem>

        <listitem>
          <para>Directly connect the <literal>WAN</literal> interfaces back to back (using a cable) or connected via VPN.</para>
        </listitem>

        <listitem>
          <para>Connect the <literal>LAN</literal> interfaces to the Test Machine.</para>
        </listitem>

        <listitem>
          <para>Connect the <literal>ETH0</literal> interfaces to the Lab Network (for Enea uCPE Manager communications).</para>
        </listitem>

        <listitem>
          <para>Select uCPE Device 1, access <literal>Configuration</literal>
          and bind the three physical network interfaces to the DPDK.</para>
        </listitem>

        <listitem>
          <para>Create three OVS bridges, one for each DPDK network interface
          (VNF management, WAN and LAN).</para>
        </listitem>

        <listitem>
          <para>Repeat the steps above for uCPE device 2.</para>
        </listitem>
      </orderedlist>

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

      <para>Onboard the FortiGate 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 FortiGate VNF qcow2 image.</para>
        </listitem>

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

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

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

        <listitem>
          <para><emphasis role="bold">Interfaces</emphasis>: Add 3 interfaces
          in the same order as listed below:</para>

          <itemizedlist spacing="compact">
            <listitem>
              <para><emphasis role="bold">vnfmgr</emphasis>: to connect it to
              the <literal>vnfmgmt_br</literal> bridge.</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">wan:</emphasis> to connect it to the
              <literal>wan_br</literal> bridge.</para>
            </listitem>

            <listitem>
              <para><emphasis role="bold">lan:</emphasis> to connect it to the
              <literal>lan_br</literal> bridge.</para>
            </listitem>
          </itemizedlist>
        </listitem>

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

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

        <listitem>
          <para><emphasis role="bold">Cloud-init content file</emphasis>: Add
          a license file entry.</para>
        </listitem>
      </itemizedlist>

      <note>
        <para>The order of the interfaces that need to be added must be
        exactly as listed above or else onboarding and in turn instantiation
        will fail.</para>
      </note>

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

      <para>Instantiate the FortiGate VNF by filling the required fields with the following values:</para>

      <itemizedlist spacing="compact">
        <listitem>
          <para><emphasis role="bold">Name</emphasis>: Name of the VM which
          will be created on the uCPE device.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">VNF Type</emphasis>: Name of the
          onboarded VNF.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">uCPE Device</emphasis>: Select the uCPE
          device where the VNF will be instantiated.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">License file</emphasis>: The FortiGate
          license file provided by Fortinet.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Configuration file</emphasis>: The
          SD-WAN example configuration files provided by Enea:
          <literal>fortigate-sdwan1.conf</literal> for the FortiGate VNF on uCPE device 1 and
          <literal>fortigate-sdwan2.conf</literal> for the FortiGate VNF on uCPE device 2.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Port1 - VNF Mgr</emphasis>: Set the type
          to <literal>DPDK</literal> and connect it to the
          <literal>vnfmgmt_br</literal> bridge.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Port2 - WAN</emphasis>: Set the type to
          <literal>DPDK</literal> and connect it to the
          <literal>wan_br</literal> bridge.</para>
        </listitem>

        <listitem>
          <para><emphasis role="bold">Port3 - LAN</emphasis>: Set the type to
          <literal>DPDK</literal> and connect it to the
          <literal>lan_br</literal> bridge.</para>
        </listitem>
      </itemizedlist>

      <para>Instantiate the FortiGate VNF on uCPE device 1 using the
      <literal>sdwan1</literal> example configuration file.</para>

      <para>To complete the branch-to-branch setup, configure <literal>uCPE
      device 2</literal> in the same way as <literal>uCPE device 1</literal>.
      Make sure to use the <literal>sdwan2</literal> configuration file for
      the second VNF instantiation.</para>

      <note>
        <para>The names of the ports used during instantiation need to be the 
          same as the ones described above, as the same names will be used in 
          the configuration files provided for this example use-case.</para>
          </note>
    </section>

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

      <para>Once the full SD-WAN setup is in place a VPN connection needs to
      be established between the two uCPE devices. The Test Machines can be
      connected to the LAN interface on each uCPE device.</para>

      <para>The connected Test Machine can be a laptop or a uCPE device that
      has one interface configured to get a dynamic IP from a DHCP server. The
      <command>dhclient &lt;interface&gt;</command> command can be used to
      request an IP address.</para>

      <note>
        <para>The received IP must be in the 172.16.1.2 - 172.16.1.255 range
        for Test Machine-1 and in the 172.16.2.2 - 172.16.2.255 range for Test
        Machine-2.</para>
      </note>

      <para>The Test Machine connected to <literal>uCPE device 1</literal> should be able to ping the Test Machine connected to <literal>uCPE device 2</literal> in this setup, over the WAN connection.  The FortiGate VNF management interface can be accessed from a web
      browser on the Lab Machine. For more details please see <olink
      targetdoc="book_enea_nfv_access_example_usecases"
      targetptr="fortigate_webmg">FortiGate VNF Web Management, <xi:include
      href="../../s_docbuild/olinkdb/pardoc-names.xml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xpointer="element(book_enea_nfv_access_example_usecases/1)" /></olink>.</para>

      <note>
        <para>In this SD-WAN VPN setup example, bridges were used as
        connection points for the FortiGate VNF. It is possible to replace
        OVS-DPDK bridges with SR-IOV connection points.</para>
      </note>
    </section>
  </section>

  <section id="fortigate_webmg">
    <title>FortiGate VNF Web Management</title>

    <para>In order to check the IP address assigned to the FortiGate VNF you
    need to connect to the FortiGate CLI.</para>

    <orderedlist>
      <listitem>
        <para>SSH to the uCPE Device (Username: root) and connect to the
        FortiGate VNF console:</para>

        <programlisting>virsh list
virsh console &lt;id of FortiGate VNF&gt;</programlisting>
      </listitem>

      <listitem>
        <para>To access the FortiGate CLI, use <literal>admin</literal> as the
        user, leaving the password blank/empty, and press enter.</para>

        <para>Use the CLI command <literal>get system interface</literal> to
        get the dynamic interfaces configuration.</para>
      </listitem>

      <listitem>
        <para>Use the IP address assigned for the management interface in the
        web browser (<literal>https://&lt;IP&gt;</literal>), to access the
        FortiGate VNF Web Management Interface. Use the same credentials as
        before to login.</para>
      </listitem>

      <listitem>
        <para>Browse through the configuration and perform changes according
        to your setup:</para>

        <figure>
          <title>The FortiGate VNF Web Management Interface</title>

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

      <listitem>
        <para>Optionally, alter the default FortiGate example configuration
        provided by Enea, through the following steps:</para>

        <orderedlist>
          <listitem>
            <para>Deploy the FortiGate Firewall in its default
            settings.</para><remark>Maybe more info about how to do it should be added here.</remark>
          </listitem>

          <listitem>
            <para>Connect to the FortiGate VNF Web Management interface with a
            web browser.</para>
          </listitem>

          <listitem>
            <para>Modify the FortiGate configuration in the FortiGate VNF Web
            Management as needed.</para>
          </listitem>

          <listitem>
            <para>Store the updated configuration in a file, so it may be used
            at the next FortiGate VNF instantiation.</para>
          </listitem>
        </orderedlist>
      </listitem>
    </orderedlist>
  </section>
</chapter>