Skip to content
forked from iij/ipgen

interactive packet generator

Notifications You must be signed in to change notification settings

maleic1618/ipgen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipgen

screenshot

ipgen is an Interactive Packet Generator with netmap|XDP

Abstract

ipgen is a packet traffic generator that uses netmap or XDP. It can interactively output packets of various sizes and rates, and measure how many have been dropped.

ipgen is implemented using the netmap feature of FreeBSD or the XDP feature of Linux.

AF_XDP on Linux is developed and tested on Ubuntu 21.04. It should work on recent Fedora Linux too with some minor tweaks.

Build

FreeBSD

  • setup FreeBSD and config kernel with NETMAP (add "device netmap" to conf/GENERIC).
  • gmake, perl and libevent are required to compile.
  • checkout and build
git clone [email protected]:iij/ipgen.git
cd ipgen
gmake depend && gmake && sudo gmake install
  • run ipgen

Linux

You will need libbsd and other libraries etc. See below.

apt install libbsd-dev clang libssl-dev libevent-dev libbpf-dev bmake
git clone https://github.com/iij/ipgen.git
cd ipgen
make depend && make && sudo make install
  • run ipgen

Tested on Ubuntu 22.04.

Caveat

On linux, ipgen with AF_XDP uses only the 1st hardware queue on a netowrk adapter, so if the network adapter uses multiple hardware queues ipgen with AF_XDP doesn't work correctly.

You can check if your network adapter, say eth0, uses multiple queues by ethtool -l eth0. If so you can change the number of using queues to just one by:

ethtool -L eth0 combined 1

Usage

Please refer to the following presentation materials.

ipgen: Interactive Packet Generator for performance measurement

About

interactive packet generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.5%
  • Perl 2.1%
  • JavaScript 1.6%
  • Assembly 1.5%
  • Makefile 0.8%
  • HTML 0.8%
  • Other 0.7%