1 .. This work is licensed under a Creative Commons Attribution 4.0 International
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, National Center of Scientific Research "Demokritos" and others.
6 ============================
7 vCGNAPT - Installation Guide
8 ============================
14 After downloading (or doing a git clone) in a directory (samplevnf)
19 - DPDK supported versions ($DPDK_RTE_VER = 16.04, 16.11, 17.02 or 17.05) Downloaded and installed via vnf_build.sh or manually from [here] (http://fast.dpdk.org/rel/)
27 Apply all the additional patches in 'patches/dpdk_custom_patch/' and build dpdk
28 required only for DPDK version 16.04.
32 export RTE_SDK=<dpdk directory>
33 export RTE_TARGET=x86_64-native-linuxapp-gcc
35 This is done by vnf_build.sh script.
39 $ ./tools/vnf_build.sh in samplevnf root folder
41 Follow the steps in the screen from option [1] --> [9] and select option [8]
43 It will automatically download selected DPDK version and any required patches
44 and will setup everything and build vCGNAPT VNFs.
46 Following are the options for setup:
50 ----------------------------------------------------------
51 Step 1: Environment setup.
52 ----------------------------------------------------------
53 [1] Check OS and network connection
54 [2] Select DPDK RTE version
56 ----------------------------------------------------------
57 Step 2: Download and Install
58 ----------------------------------------------------------
62 [6] Build and Install DPDK
65 ----------------------------------------------------------
67 ----------------------------------------------------------
68 [8] Build all VNFs (vACL, vCGNAPT, vFW, UDP_Replay)
72 An vCGNAPT executable will be created at the following location
73 samplevnf/VNFs/vCGNAPT/build/vCGNAPT
78 1. Download DPDK supported version from dpdk.org
80 - http://dpdk.org/browse/dpdk/snapshot/dpdk-$DPDK_RTE_VER.zip
81 2. unzip dpdk-$DPDK_RTE_VER.zip and apply dpdk patches only in case of 16.04
82 (Not required for other DPDK versions)
86 - patch -p1 < VNF_CORE/patches/dpdk_custom_patch/i40e-fix-link-management.patch
87 - patch -p1 < VNF_CORE/patches/dpdk_custom_patch/i40e-fix-Rx-hang-when-disable-LLDP.patch
88 - patch -p1 < VNF_CORE/patches/dpdk_custom_patch/i40e-fix-link-status-change-interrupt.patch
89 - patch -p1 < VNF_CORE/patches/dpdk_custom_patch/i40e-fix-VF-bonded-device-link-down.patch
90 - patch -p1 < $VNF_CORE/patches/dpdk_custom_patch/disable-acl-debug-logs.patch
91 - patch -p1 < $VNF_CORE/patches/dpdk_custom_patch/set-log-level-to-info.patch
95 - make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc
96 - cd x86_64-native-linuxapp-gcc
101 - For 1G/2M hugepage sizes, for example 1G pages, the size must be specified
102 explicitly and can also be optionally set as the default hugepage size for
103 the system. For example, to reserve 8G of hugepage memory in the form of
104 eight 1G pages, the following options should be passed to the kernel:
105 * default_hugepagesz=1G hugepagesz=1G hugepages=8 hugepagesz=2M hugepages=2048
106 - Add this to Go to /etc/default/grub configuration file.
107 - Append "default_hugepagesz=1G hugepagesz=1G hugepages=8 hugepagesz=2M hugepages=2048"
108 to the GRUB_CMDLINE_LINUX entry.
110 3. Setup Environment Variable
112 - export RTE_SDK=<samplevnf>/dpdk
113 - export RTE_TARGET=x86_64-native-linuxapp-gcc
114 - export VNF_CORE=<samplevnf>
115 or using ./tools/setenv.sh
117 4. Build vCGNAPT VNFs
119 - cd <samplevnf>/VNFs/vCGNAPT
123 5. An vCGNAPT executable will be created at the following location
125 - <samplevnf>/VNFs/vCGNAPT/build/vCGNAPT
130 Setup Port to run VNF
131 ----------------------
135 For DPDK versions 16.04
136 1. cd <samplevnf>/dpdk
137 2. ./tools/dpdk_nic_bind.py --status <--- List the network device
138 3. ./tools/dpdk_nic_bind.py -b igb_uio <PCI Port 0> <PCI Port 1>
139 .. _More details: http://dpdk.org/doc/guides-16.04/linux_gsg/build_dpdk.html#binding-and-unbinding-network-ports-to-from-the-kernel-modules
141 For DPDK versions 16.11
142 1. cd <samplevnf>/dpdk
143 2. ./tools/dpdk-devbind.py --status <--- List the network device
144 3. ./tools/dpdk-devbind.py -b igb_uio <PCI Port 0> <PCI Port 1>
145 .. _More details: http://dpdk.org/doc/guides-16.11/linux_gsg/build_dpdk.html#binding-and-unbinding-network-ports-to-from-the-kernel-modules
147 For DPDK versions 17.xx
148 1. cd <samplevnf>/dpdk
149 2. ./usertools/dpdk-devbind.py --status <--- List the network device
150 3. ./usertools/dpdk-devbind.py -b igb_uio <PCI Port 0> <PCI Port 1>
151 .. _More details: http://dpdk.org/doc/guides-17.05/linux_gsg/build_dpdk.html#binding-and-unbinding-network-ports-to-from-the-kernel-modules
153 Make the necessary changes to the config files to run the vCGNAPT VNF
154 eg: ports_mac_list = 00:00:00:30:21:F0 00:00:00:30:21:F1
158 Update the configuration according to system configuration.
162 ./vCGNAPT -p <port mask> -f <config> -s <script> - SW_LoadB
163 ./vCGNAPT -p <port mask> -f <config> -s <script> -hwlb <num_WT> - HW_LoadB
167 Update the script file and add Static NAT Entry
172 ;p <pipeline id> entry addm <prv_ipv4/6> prvport> <pub_ip> <pub_port> <phy_port> <ttl> <no_of_entries> <end_prv_port> <end_pub_port>
173 ;p 3 entry addm 152.16.100.20 1234 152.16.40.10 1 0 500 65535 1234 65535
182 cd <samplevnf>/VNFs/vCGNAPT/build
183 ./vCGNAPT -p 0x3 -f ./config/arp_txrx-2P-1T.cfg -s ./config/arp_txrx_ScriptFile_2P.cfg
188 cd <samplevnf>/VNFs/vCGNAPT/build
189 ./vCGNAPT -p 0x3 -f ./config/arp_hwlb-2P-1T.cfg -s ./config/arp_hwlb_scriptfile_2P.cfg --hwlb 1
198 cd <samplevnf>/VNFs/vCGNAPT/build
199 ./vCGNAPT -p 0x3 -f ./config/arp_txrx-2P-1T-ipv6.cfg -s ./config/arp_txrx_ScriptFile_2P.cfg
204 cd <samplevnf>/VNFs/vCGNAPT/build
205 ./vCGNAPT -p 0x3 -f ./config/arp_hwlb-2P-1T-ipv6.cfg -s ./config/arp_hwlb_scriptfile_2P.cfg --hwlb 1
207 vCGNAPT execution on BM & SRIOV
208 --------------------------------
212 To run the VNF, execute the following:
213 samplevnf/VNFs/vCGNAPT# ./build/vCGNAPT -p 0x3 -f ./config/arp_txrx-2P-1T.cfg -s ./config/arp_txrx_ScriptFile_2P.cfg
215 -p PORTMASK: Hexadecimal bitmask of ports to configure
216 -f CONFIG FILE: vCGNAPT configuration file
217 -s SCRIPT FILE: vCGNAPT script file
219 vCGNAPT execution on OVS
220 -------------------------
221 To run the VNF, execute the following:
225 samplevnf/VNFs/vCGNAPT# ./build/vCGNAPT -p 0x3 ./config/arp_txrx-2P-1T.cfg -s ./config/arp_txrx_ScriptFile_2P.cfg --disable-hw-csum
227 -p PORTMASK: Hexadecimal bitmask of ports to configure
228 -f CONFIG FILE: vCGNAPT configuration file
229 -s SCRIPT FILE: vCGNAPT script file
230 --disable-hw-csum :Disable TCP/UDP hw checksum