Introduction
If you are attending the NoF Tutorial session session (IEEE NoF tutorial), kindly complete the tasks in pre-requisites, before the hands-on.
Prerequisites
Environment.
System / Software | Source / Image / command / | Comments |
---|---|---|
Virtualization /Hypervisor | Oracle Virtualbox | To run VMs. |
Virtual Machine | Download-link | For running Test and DUTs |
Create 2 VMs | Step-1 | DUT and TGEN |
Exchange of SSH-Keys between VMs | Step-2 | |
Install New Version of T-Rex | Step-3 | |
Install Test Automation Tools | Step-4 |
The Installation and configuration details are provided below. Please complete the below Steps 1, 2 3 and 4.
Step-1: Creating VMs.
- VM1 (DUT) : This is just a standard VM-from-ISO installation procedure. You will find many step-by-step description Ex: https://itsfoss.com/install-linux-in-virtualbox on this, including Videos (Ex: https://www.youtube.com/watch?v=QbmRXJJKsvs) .
- Please ensure that number of interfaces are 4 and configured according to the table above.
- VM2 (TGEN): Same as above - or you can just clone it!.
- Please ensure that number of interfaces are 4 and configured according to the table above.
Network | Network/Adapter Type (Virtualbox) | Interfaces on DUT | Interfaces on TGen | Comments |
---|---|---|---|---|
test1 | Internal | eth3 | eth3 | Inter-VM ONLY |
test2 | Internal | eth2, | eth2, | Inter-VM ONLY |
admin | Bridged | eth1 | eth1 | Communicate with VMs from Host. |
Internet | NAT | eth0 | eth0 | For Internet Access |
The names of the interfaces maybe different - for example on Ubuntu it may be enp0s2/3/4...
Step-2: Exchange SSH Keys
To ensure smoother access, ensure DUT-VM can ssh to TGEN-VM without password-probe, copy the SSH public keys. The step to follow:
- If no identity is created yet (ex: if you don't find id_rsa.pub in ~/.ssh folder) Run ssh-keygen. It will generate the necessary identify.
- Use ssh-copy-id command. ssh-copy-id username_of_tgen_vm@ipaddress_of_tgen_vm
Step-3: Install New Version of T-Rex.
(a) INSTALL-TRex
sudo apt -y install zlib1g-dev build-essential python python3-distutils git clone https://github.com/cisco-system-traffic-generator/trex-core.git cd trex-core/ cd linux_dpdk ./b configure ./b build cd .. sudo cp scripts/cfg/simple_cfg.yaml /etc/trex_cfg.yaml
(b) Find PCIs
lspci | grep Eth 00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) 00:08.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) 00:09.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
(ref)
Step-4: Download and Install Test Automation Tools.
(a) Installing VSPERF on DUT-VM
Instructions to install and configure (including tuning) VSPERF can be found here
You may have to configure hugepages before running the install script - by running following commands:
- mkdir -p /mnt/huge
- mount -t hugetlbfs nodev /mnt/huge
- echo "vm.nr_hugepages=64" >> /etc/sysctl.conf
(b) Download functest and x-testing on TGEN-VM
sudo
apt
install
python-virtualenv docker.io git
virtualenv xtesting
. xtesting
/bin/activate
pip
install
ansible
ansible-galaxy
install
collivier.xtesting
git clone https:
//gerrit
.opnfv.org
/gerrit/functest-xtesting
functest-xtesting-src
(c) Download Storperf on TGEN_VM
(d) Other Tools
- docker on TGen-VM
sudo apt -y install docker docker-compose
sudo usermod -aG docker $USER