A special version of Packet Batch that utilizes the DPDK (this should be faster than the standard version).

Packet Batch (DPDK)

Packet Batch DPDK Build Workflow Packet Batch DPDK Run Workflow

Description

This is a special version of Packet Batch that utilizes the DPDK, a kernel-bypass library. This does not use any form of Linux sockets.

With that said, the threads config option becomes obsolete in this special version because we use the DPDK's l-cores instead. A certain amount of ports are initialized per l-core depending on the EAL options and port mask.

This special version should be faster than all other versions of Packet Batch due to the DPDK. I was able to generate ~410K packets per second on one single l-core/port on my home server while the AF_XDP Packet Batch version generated ~1.2 million packets per second on four cores/threads. At this rate, if I utilized all four cores, the DPDK version would be able to push nearly 2 million packets per second.

EAL Command Line

The first part of the command line arguments should be the DPDK's EAL arguments which may be found here and ends with a --.

Application-Specific Command Line

After specifying the EAL command line options and ending it with --, you may then add the original command line arguments from the Packet Batch Common project.

With the above said, there are also additional command line usage for this specific application which may be found below.

--portmask => The port mask to use with the DPDK application.
--queues => The amount of TX queues to setup per port (default and recommended is 1).
--promisc => Whether to enable promiscuous mode on all enabled ports.
--burstsize => The max TX buffer burst size (default 32).
--useall => Load balances all ports and TX queues to l-cores in round-robin fashion and vice versa.

Examples may be found below.

# Sets up 4 l-cores (IDs 0 - 3) along with enabling all ports. 1 TX queue per port is initialized.
pcktbatch -l 0-3 -- -c /etc/pcktbatch/test01.yaml --queues 1 --portmask 0xff

# Sets up 1 l-core (ID 0) along with enabling the first port. 1 TX queue is initialized.
pcktbatch -l 0 -- -c /etc/pcktbatch/test01.yaml --queues 1 --portmask 0x01

Building And Installing

Before building this project, you must install the DPDK and have compatible hardware. You can read the documentation here for more information.

The following commands should allow for an easy DPDK setup assuming you want to use the default configuration. You will need meson and ninja.

git clone https://github.com/DPDK/dpdk.git
cd dpdk/
meson build
cd build
ninja
sudo ninja install
sudo ldconfig

I've used the following commands to install meson and ninja.

sudo apt update
sudo apt install python3 python3-pip
sudo pip3 install meson # Pip3 is used because 'apt' has an outdated version of Meson usually.
sudo apt install ninja-build

Building and installing this project is fairly easy and just like the standard version after installing the DPDK. It includes building the Packet Batch Common repository which requires libyaml along with my custom-made the DPDK Common project. As long as you use the --recursive flag with git, it should retrieve all of the required submodules automatically located in the modules/ directory. Otherwise, you will need to go into the Common repository and execute the git submodule update --init command. We use make to build and install the application.

# Clone this repository along with its submodules.
git clone --recursive https://github.com/Packet-Batch/PB-DPDK.git

# Install build essentials/tools and needed libaries for LibYAML.
sudo apt install build-essential clang autoconf libtool

# Change the current working directory to PB-DPDK/.
cd PB-DPDK/

# Make and install (must be ran as root via sudo or root user itself).
sudo make
sudo make install

Installation Video!

Click here to watch!

After installing, the executable is copied to the /usr/bin/ directory which should be included in your $PATH. Therefore, you may use the application globally (in any directory).

For example.

pcktbatch -l 0-3 -- --queues 1 --portmask 0xff

Credits

Owner
Packet Batch
A DoS/pen-test tool that uses AF_PACKETv3, AF_XDP or the DPDK depending on the version you choose.
Packet Batch
Similar Resources

Winpcap-based network packet capture tool, support TLS (part), UDP, ICMP, TCP, ARP, DNS and other protocol analysis, interface reference wireshark.

Winpcap-based network packet capture tool, support TLS (part), UDP, ICMP, TCP, ARP, DNS and other protocol analysis, interface reference wireshark.

Winpcap-based network packet capture tool, support TLS (part), UDP, ICMP, TCP, ARP, DNS and other protocol analysis, interface reference wireshark.

Aug 5, 2022

Packet filter using XDP.

MocTok This is a packet filter using XDP. Usage usage: moctok [options] ... options: -g, --gen Generate XDP program. (string) -a, --atta

May 19, 2022

A packet acknowledgement system for UDP

Introduction reliable is a simple packet acknowledgement system for UDP-based protocols. It has the following features: Acknowledgement when packets a

Aug 6, 2022

Lightway Core is a modern VPN protocol by ExpressVPN, to deliver a VPN experience that’s faster, more secure, and more reliable.

Lightway Core NOTE: This is a preview snapshot of the Lightway repository used for both our client and server. We will be publishing a live, actively

Feb 17, 2022

Lightway Core is a modern VPN protocol by ExpressVPN, to deliver a VPN experience that’s faster, more secure, and more reliable.

Lightway Core is a modern VPN protocol by ExpressVPN, to deliver a VPN experience that’s faster, more secure, and more reliable.

Aug 6, 2022

Faster termux-am implementation that connects to a receiver in termux-app using a unix socket

termux-am-socket This is a small program for sending commands to the Termux:API app, thereby allowing terminal programs to use the Android API. The pr

Aug 3, 2022

Common utilities useful for embedded systems that are often not included in an RTOS or the standard C library.

Common utilities useful for embedded systems that are often not included in an RTOS or the standard C library.

Welcome to Fitterbap, the Firmware toolkit to enable reliable best architecture practices! Fitterbap provides common utilities useful for embedded systems that are often not included in an RTOS or the standard C library.

Apr 2, 2022

Tiny HTTP Server on C, using only standard libraries

hell_o Linux only. Tiny HTTP Server on C, using only standard libraries. It is unfinished yet, going to add working interface and rewrite handler late

Feb 1, 2022

IRC server based on TCP/IP protocol to rfc1459 standard

IRC-server В далеком 1998 году, в сети DALnet, на одном популярном тогда русскоязычном канале, на вопрос новичка «А что такое IRC?», один человек отве

Aug 12, 2022
The standard Packet Batch application that uses standard Linux sockets (AF_PACKETv3) for packet generation.
The standard Packet Batch application that uses standard Linux sockets (AF_PACKETv3) for packet generation.

Packet Batch (Standard) Description This is the standard Packet Batch application that utilizes AF_PACKETv3 Linux sockets. Due to AF_PACKETv3 Linux so

Feb 24, 2022
Common files for Packet Batch. Read this for configuration guidance and more!

Packet Batch (Common) Description This is a repository for Packet Batch that includes common files for all versions of Packet Batch to use (standard,

Feb 24, 2022
DPDK / Packet processing experimentation project

flow-orchestrator About This is currently just a platform for me to learn more about DPDK and to have a foundation for some experiments. Building Buil

May 6, 2022
ImmortalWrt is a fork of OpenWrt, with more packages ported, more devices supported, better performance, and special optimizations for mainland China users.

ImmortalWrt is a fork of OpenWrt, with more packages ported, more devices supported, better performance, and special optimizations for mainland China users.

Jan 31, 2022
Examples and test programs I made while learning the DPDK.

The DPDK Examples (WIP) Description A small repository I will be using to store my progress and test programs from the DPDK, a kernel bypass library v

May 31, 2022
the LIBpcap interface to various kernel packet capture mechanism

LIBPCAP 1.x.y by The Tcpdump Group To report a security issue please send an e-mail to [email protected] To report bugs and other problems, contri

Aug 7, 2022
High-speed packet processing framework
High-speed packet processing framework

PF_RING™ Introduction PF_RING™ is a Linux kernel module and user-space framework that allows you to process packets at high-rates while providing you

Aug 7, 2022
network packet indexing and querying
network packet indexing and querying

_______ _____.___. ________ _____ _____ \ \\__ | |/ _____/ / \ / _ \ / | \/ | / \ ___ / \ / \ / /_\

Dec 15, 2021
A Simple CLI Network Packet Sniffer
A Simple CLI Network Packet Sniffer

packt packt is a simple CL(command line) network packet sniffer which can run on any unix-like OS including termux (Android). packt works by first ope

Feb 7, 2022