Page tree
Skip to end of metadata
Go to start of metadata

 

1.1. Setup details:

Hardware Setup details:

---------------------------------

 

RAM:

minimum 20GB

NICs:

2 x 10G

OS:

Ubuntu 16.04

TRex:

v2.28 using 7 cores per dual interface.

 

BIOS Configuration (BIOS configuration might vary depending on platform used):
--------------------------------------------------------------------------------------------------------------------
Parameter                                                         Enable/Disable
---------------                                                        ---------------------
CPU Power and Performance Policy                 Performance
P-State                                                               Disable
C- State                                                              Disable

Hyper-Threading Technology (If supported)       Enable
Virtualization Techology                                      Enable

Intel® Virtualization Technology
for Directed I/O (VT-d)                                        Enable
Coherency                                                          Enable


OS Requirements:
-----------------------
This release is tested and supported for the following components for running the VNFs.
1. DPDK supported 16.04, 16.11.1, 17.02 (recommended), 17.05

http://fast.dpdk.org/rel/dpdk-17.02.tar.xz

2. VNFs on Bare-metal - OS: Ubuntu 16.04 LTS

Supported Environment:
---------------------------------

  • Bare-Metal (Linux)
  • Standalone virtialozation (OVS/OVS-DPDK/SRIOV/VPP etc)
  • Openstack setup (OVS/OVS-DPDK/SRIOV/VPP etc)

From Beijing Summit 2017: https://wiki.opnfv.org/pages/viewpage.action?pageId=5734608&preview=/5734608/11700103/yardstick-opnfv-summit-2017.pdf 

1.2. Network Testing Topology

 

a. Bare-Metal:

TRex port 0 ↔ (VNF Port 0) ↔ (VNF Port 1) ↔ TRex port 1

b. Standalone Virtualization: 

TBD

c. openstack

TBD

1.3 Traffic generator and VNF Setup details

step 0 :  Preparing hardware connection.

  • Connect Traffic generator and VNF system back to back as shown in section 1.2 Bare-Metal Configuration
    TRex port 0 ↔ (VNF Port 0) ↔ (VNF Port 1) ↔ TRex port 1

step 1 :  Setting up Traffic generator (Trex) (Refer: https://trex-tgn.cisco.com/trex/doc/trex_stateless_bench.html)

  • Trex Software preparations

    • Install the OS (Bare metal Linux, not VM!)

    • Obtain the latest TRex package: wget https://trex-tgn.cisco.com/trex/release/latest

    • Untar the package: tar -xzf latest

    • Change dir to unzipped TRex

    • Create config file using command: sudo python dpdk_setup_ports.py -i

      • In case of Ubuntu 16 need python3

      • See paragraph config creation for detailed step-by-step

step 2 :  Setting up VNF

  • Bare-Metal

    • Clone sampleVNF project repository  - git clone https://git.opnfv.org/samplevnf

    • Auto Build

      • Interactive options: 
        • ./tools/vnf_build.sh -i
        • Follow the steps in the screen from option [1] –> [9] and select option [8] to build the vnfs. It will automatically download selected DPDK version and any required patches and will setup everything and build VNFs.

          Following are the options for setup:

          ----------------------------------------------------------
           Step 1: Environment setup.
          ----------------------------------------------------------
          [1] Check OS and network connection
          [2] Select DPDK RTE version
          
          ----------------------------------------------------------
           Step 2: Download and Install
          ----------------------------------------------------------
          [3] Agree to download
          [4] Download packages
          [5] Download DPDK zip
          [6] Build and Install DPDK
          [7] Setup hugepages
          
          ----------------------------------------------------------
           Step 3: Build VNFs
          ----------------------------------------------------------
          [8] Build all VNFs (vACL, vCGNAPT, vFW, UDP_Replay, DPPD-PROX)
          
          [9] Exit Script
      • non-Interactive options:
        • ./tools/vnf_build.sh -s -d=<dpdk version eg 17.02>
    • Manual Build

      • Download DPDK supported version from dpdk.org

      • unzip dpdk-$DPDK_RTE_VER.zip and apply dpdk patches only in case of 16.04 (Not required for other DPDK versions)

      • cd dpdk

        • make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc

        • cd x86_64-native-linuxapp-gcc

        • make

      • Setup huge pages

        • For 1G/2M hugepage sizes, for example 1G pages, the size must be specified explicitly and can also be optionally set as the default hugepage size for the system. For example, to reserve 8G of hugepage memory in the form of eight 1G pages, the following options should be passed to the kernel: * default_hugepagesz=1G hugepagesz=1G hugepages=8 hugepagesz=2M hugepages=2048

        • Add this to Go to /etc/default/grub configuration file.

        • Append “default_hugepagesz=1G hugepagesz=1G hugepages=8 hugepagesz=2M hugepages=2048”to the GRUB_CMDLINE_LINUX entry.

      • Setup Environment Variable

        • export RTE_SDK=<samplevnf>/dpdk

        • export RTE_TARGET=x86_64-native-linuxapp-gcc

        • export VNF_CORE=<samplevnf>

          or using ./tools/setenv.sh

      • Build vACL VNFs

        • cd <samplevnf>/VNFs/vACL

        • make clean

        • make

      • The vFW executable will be created at the following location

        • <samplevnf>/VNFs/vFW/build/vFW

    • Standalone virtualization : TBD

    • Openstack: TBD

step 3 :  Running VNF

  • Setup Port to run VNF
    • For DPDK versions 17.xx
      1. cd <samplevnf>/dpdk
      2. ./usertools/dpdk-devbind.py --status <--- List the network device
      3. ./usertools/dpdk-devbind.py -b igb_uio <PCI Port 0> <PCI Port 1>
      .. _More details: http://dpdk.org/doc/guides-17.05/linux_gsg/build_dpdk.html#binding-and-unbinding-network-ports-to-from-the-kernel-modules 
  • Prepare script to enalble VNF to route the packets
    • cd <samplevnf>/VNFs/vFW/config
    • Open -> VFW_SWLB_SinglePortPair_script.tc. Replace the bold items based on your setting.

       

      link 0 config <VNF port 0 IP eg 202.16.100.10> 8
      link 0 up

      link 1 down
      link 1 config <VNF port 0 IP eg 172.16.40.10> 8
      link 1 up

      ; routeadd <port #> <ipv4 nhip address in decimal> <Mask>
      routeadd net 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
      routeadd net 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000

       

      ; IPv4 static ARP; disable if dynamic arp is enabled.
      p 1 arpadd 0 <traffic generator port 0 IP eg 202.16.100.20> <traffic generator port 0 MAC>
      p 1 arpadd 1  <traffic generator port 1 IP eg 172.16.40.20> <traffic generator port 1 MAC>

      p action add 0 accept
      p action add 0 fwd 0
      p action add 0 count

      p action add 1 accept
      p action add 1 fwd 1
      p action add 1 count

      p action add 2 drop
      p action add 2 count

      p action add 0 conntrack
      p action add 1 conntrack
      p action add 2 conntrack
      p action add 3 conntrack

      ; IPv4 rules
      p vfw add 1 <traffic generator port 0 IP eg 202.16.100.20> 8 <traffic generator port 1 IP eg 172.16.40.20> 8 0 65535 67 69 0 0 2
      p vfw add 2 <traffic generator port 0 IP eg 202.16.100.20> 8 <traffic generator port 1 IP eg 172.16.40.20> 8 0 65535 0 65535 0 0 1
      p vfw add 2 <traffic generator port 1 IP eg 172.16.40.20> 8 <traffic generator port 0 IP eg 202.16.100.20> 8 0 65535 0 65535 0 0 0

      p vfw applyruleset

  • Run below cmd to launch the VNF. Please make sure both hugepages and ports to be used are bind to dpdk.
    • cd <samplevnf>/VNFs/vFW/
      ./build/vFW -p 0x3 -f ./config/VFW_SWLB_SinglePortPair_4Thread.cfg  -s ./config/VFW_SWLB_SinglePortPair_script.tc

step  4:  Run Test using traffic geneator

  • On traffic generator system:
    • cd <trex eg v2.28/stl>

      Update the bench.py to generate the traffic. 

       

      class STLBench(object):
      ip_range = {}
      ip_range['src'] = {'start': '<traffic generator port 0 IP eg 202.16.100.20>', 'end': '<traffic generator port 0 IP eg 202.16.100.20>'}
      ip_range['dst'] = {'start': '<traffic generator port 1 IP eg 172.16.40.20>', 'end': '<traffic generator port 1 IP eg 172.16.40.20>'}

    • cd <trex eg v2.28>
    • Run the TRex server: sudo ./t-rex-64 -i -c 7

    • In another shell run TRex console: trex-console
      • The console can be run from another computer with -s argument, --help for more info.

      • Other options for TRex client are automation or GUI

  • In the console, run "tui" command, and then send the traffic with commands like:

    • start -f stl/bench.py -m 50% --port 0 3 -t size=590,vm=var1

 

  • No labels