gatekeeper icon indicating copy to clipboard operation
gatekeeper copied to clipboard

DPDK installation and configuration problem

Open ramzy88 opened this issue 5 years ago • 13 comments

when i download gatekeeper the folder dependencies contains 2 folders (DPDK and luajit ) but empty folders so i try to download it and luajit successfully configured but i can't install or configure dpdk

ramzy88 avatar Feb 18 '19 16:02 ramzy88

The dependencies are git submodules, so once you clone the repository you need to do:

git submodule init
git submodule update

You can also remove the repository you downloaded and re-clone it using the --recursive option to get the submodules:

git clone --recursive http://github.com/AltraMayor/gatekeeper.git

You can then go ahead with running the setup script:

. setup.sh

Once you get it working, let us know so we can close this issue.

cjdoucette avatar Feb 18 '19 16:02 cjdoucette

thank you it works but when i run gatekeeper following errors appear in spit of configuring hugepage according to documents in readme file EAL: Detected 1 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: No free hugepages reported in hugepages-2048kB EAL: No free hugepages reported in hugepages-2048kB EAL: No free hugepages reported in hugepages-1048576kB EAL: FATAL: Cannot get hugepage information. EAL: Cannot get hugepage information. EAL: Error - exiting with code: 1 Cause: Error with EAL initialization

ramzy88 avatar Feb 18 '19 17:02 ramzy88

What do you see when running the following command?

cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

cjdoucette avatar Feb 18 '19 20:02 cjdoucette

ramzy88 avatar Feb 19 '19 07:02 ramzy88

An error must have occurred while trying to set up the hugepages. I would recommend trying to set them again, or reading through the documentation for it here:

https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#running-dpdk-applications

If you're aren't already, I would recommend trying to set up Gatekeeper in a VM, since in that environment you'll be able to use hugepages and a network card that supports DPDK:

https://github.com/AltraMayor/gatekeeper/wiki/Setup-on-Virtual-Machine

cjdoucette avatar Feb 20 '19 01:02 cjdoucette

i followed the last link and i think it solved and when i run gatekeeper (sudo ./build/gatekeeper) the result was EAL: Detected 1 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: No free hugepages reported in hugepages-1048576kB EAL: Probing VFIO support... Is it normal ??

ramzy88 avatar Feb 23 '19 09:02 ramzy88

A single lcore is not enough to run Gatekeeper, you need to add more cores to the VM; the configuration in the folder lua determines the minimum needed number according to what is requested. Having no huge pages is okay for testing, but not recommended in production. All lines starting with EAL: are just detected information, so they are normal.

AltraMayor avatar Feb 28 '19 12:02 AltraMayor

now this is the result: EAL: Detected 8 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: No free hugepages reported in hugepages-1048576kB EAL: Probing VFIO support... i already made ddos attack now i want to test gatekeeper ( works or not ) and is hugepages will affect or no ? gatekeeper.log shows the following: TEKEEPER: main: cycles/second = 3600002665, cycles/millisecond = 3600002, picosec/cycle = 277 GATEKEEPER: net: there are only 0 network ports available to DPDK/Gatekeeper, but configuration is using 2 ports GATEKEEPER: config: ./lua/net.lua:141: Failed to initilize the network GATEKEEPER: main: failed to configure Gatekeeper thank you for your help

ramzy88 avatar Mar 05 '19 14:03 ramzy88

The message GATEKEEPER: net: there are only 0 network ports available to DPDK/Gatekeeper, but configuration is using 2 ports suggests that you have not put the network adapters under the control of DPDK before running Gatekeeper, see section Configure Network Adapters in the README.md file.

We expect that Gatekeeper will run slower without hugepages, what translates in processing less packets per second. But we have not measured the impact yet.

What do you mean by already having made a DDoS attack?

AltraMayor avatar Mar 06 '19 13:03 AltraMayor

thank you for your reply i already follow the instructions in README file " bind the network cards " then run Gatekeeper and get the log in the previous comment i will explain my scenario : 1- my network about 7 V.M one of them is Gatekeeper ( Ubuntu ) all on the same vlan 2- and one V.M is the server that i want to guard by gatekeeper 3- i made DOS attack from another V.M " TCP flooding attack " so i want to run gatekeeper to protect the server and block this attack I am sorry for the prolongation,i hope you understand my problem

ramzy88 avatar Mar 07 '19 13:03 ramzy88

Given that you have bound the network cards to DPDK and the log message continues to say that there are only 0 network ports available to DPDK/Gatekeeper, it must mean that you are using an adapter that DPDK doesn't support. @cjdoucette has run into a number of problems trying to run DPDK/Gatekeeper on VirtualBox, but he has been successful running Gatekeeper on KVM. He has documentend his steps to set up KVM here.

I encourage you to document your setup somewhere online. Not only would it help with this thread, but it would also help others to set Gatekeeper up. Right now, we have the issue #197 whose goal is to verify that Gatekeeper is ready for our first production deployment. Your description of how you are simulating a DoS attack may help us with the tests.

What has attracted you to Gatekeeper? Are you be interested in helping with the tests? Why?

AltraMayor avatar Mar 07 '19 15:03 AltraMayor

I’m preparing my master in this field “ddos detection and isolation” so am intersted in gatekeeper , and how can i help in the test ?! I want to know what is the output if i run gatekeeper correctly “any log or gui “

ramzy88 avatar Mar 10 '19 13:03 ramzy88

The main thing you could help with in the tests is to find open source tools to simulate DDoS attacks of multiple types and to document how to use them. Given that this information may help wicked people as well, please document it in a Google Doc and only share it with our group.

We don't have production log yet and there's no GUI for Gatekeeper. But as we finish up the last pieces of code, our efforts will turn to documentation, testing, and writing policies to be used with Gatekeeper. Thus, if you work in parallel on the document above, you'll converge with us and you'll have enough information to do whatever you want with Gatekeeper.

AltraMayor avatar Mar 12 '19 19:03 AltraMayor