Skip to content

Setup on Virtual Machine

Cody Doucette edited this page Oct 3, 2018 · 12 revisions

This page is a work in progress.

Table of Contents

Obtain VirtualBox

Obtain a VM with Gatekeeper

Set up additional interfaces.

Configure Gatekeeper

DPDK requires the use of hugepages. To set them up on the VM, run the following command:

 $ echo 1024 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

Then, the configuration files need to be altered in the following ways:

In lua/if_map.lua, set the mapping for enp0s8 to be "net_af_packet0" and the mapping for enp0s9 to be "net_af_packet1." It should look like:

 return {
         ["enp0s3"] = "0000:00:03.0",
         ["enp0s8"] = "net_af_packet0",
         ["enp0s9"] = "net_af_packet1",
         ["enp0s10"] = "0000:00:0a.0",
         ["enp0s16"] = "0000:00:10.0",
 }

If running gatekeeper as a Gatekeeper server, then open lua/gatekeeper_config.lua and set n_lcores to 1. If running gatekeeper as a Grantor server, open lua/gt.lua and set n_lcores to 1 there instead.

In lua/net.lua, set front_ports to be {"enp0s8"} and back_ports to be {"enp0s9"}. Then, front_mtu and back_mtu to be 1500 (or no more than 1500).

In lua/cps.lua, set kni_kmod_path to be /home/vagrant/gatekeeper/dependencies/dpdk/build/kmod/rte_kni.ko:

 local kni_kmod_path = /home/vagrant/gatekeeper/dependencies/dpdk/build/kmod/rte_kni.ko

Run Gatekeeper

Since the interfaces on the VM do not support DPDK drivers, we must use virtual devices and the AF_PACKET driver. To do so, run Gatekeeper with the following command:

 $ sudo ./build/gatekeeper --vdev net_af_packet0,iface=enp0s8 --vdev net_af_packet1,iface=enp0s9
Clone this wiki locally