Category: NFV

Use Open vSwitch as the bridge of VMs (KVM)

# check the list of KVM networks $ virsh net-list # edit the default network $ virsh net-edit default # destroy the default network $ virsh net-destroy default # disable the autostart of the default network $ virsh net-autostart –disable default # make a new configuration for OpenvSwitch $ vi ovsbr0.xml ## == ## <network> […]

Install DPDK (Ubuntu 16.04)

1. DPDK support $ sudo ethtool -i [NIC] (http://dpdk.org/doc/nics) 2. CPU and memory configurations # choose either 1GB hugepages or 2MB hugepages $ sudo vi /etc/default/grub ## == ## GRUB_CMDLINE_LINUX_DEFAULT=”default_hugepagesz=1G hugepagesz=1G hugepages=4″ (1GB huge page setup) GRUB_CMDLINE_LINUX_DEFAULT=”default_hugepagesz=2M hugepagesz=2M hugepages=2048″ (2MB huge page setup) ## == ## $ sudo update-grub # choose either one based on […]

Install and Run Pktgen-DPDK (CentOS 7.2)

1. Install Pktgen # yum install -y wget patch libpcap-devel # curl -LO http://www.dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-3.5.0.tar.gz # tar xvfz pktgen-3.5.0.tar.gz # echo “export RTE_SDK=\$DPDK_DIR” >> ~/.bashrc # echo “export RTE_TARGET=\$DPDK_TARGET” >> ~/.bashrc # . ~/.bashrc # cd pktgen-3.5.0 # make 2. Run Pktgen # cd pktgen-3.5.0 # app/$RTE_TARGET/pktgen -c 0xf -n 4 — -p 0x3 -P -m […]

Install and Run Pktgen-DPDK (Ubuntu 16.04)

1. Install Pktgen $ sudo apt-get install -y wget patch libpcap-dev $ curl -LO http://www.dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-3.5.0.tar.gz $ tar xvfz pktgen-3.5.0.tar.gz $ echo “export RTE_SDK=\$DPDK_DIR” >> ~/.bashrc $ echo “export RTE_TARGET=\$DPDK_TARGET” >> ~/.bashrc $ . ~/.bashrc $ cd pktgen-3.5.0 $ make 2. Run Pktgen $ cd pktgen-3.5.0 $ sudo -E app/$RTE_TARGET/pktgen -c 0xf -n 4 — -p […]

Install BCC (CentOS 7.2)

1. Install kernel-ml-devel (4.16 or newer) # mkdir ~/build # cd ~/build # yum install -y yum-utils # yumdownloader –enablerepo=elrepo-kernel kernel-ml-headers # rpm2cpio kernel-ml-headers*.rpm | cpio -idmv 2. Install ply # cd ~/build # yum install -y git automake gcc gcc-c++ flex bison # git clone https://github.com/iovisor/ply.git # cd ply # ./autogen.sh # export CFLAGS=-I${HOME}/build/usr/include […]

Install perf-kvm

$ sudo apt-get install -y linux-tools-common linux-tools-$(uname -r) linux-tools-virtual virt-top

Install Kernel-based Virtual Machine (KVM)

Ubuntu 16.04 / Ubuntu 18.04 $ sudo apt-get install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils virt-manager Ubuntu 20.04 $ sudo apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager