Skip to content

Instantly share code, notes, and snippets.

@vr000m
Last active December 15, 2015 11:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vr000m/5253082 to your computer and use it in GitHub Desktop.
Save vr000m/5253082 to your computer and use it in GitHub Desktop.
Enabling dummynet and re-compiling your kernel

$sudo make menuconfig

  • "Processor type and features" ---> "Timer frequency" ---> 1000Hz [no 10000Hz option :(]
  • "Networking support" ---> "Networking Options" ---> "Network Packet Filtering framework" ---> enable options that you need
$sudo make oldconfig
$sudo make prepare
$sudo make scripts
$sudo make

If make fails then you'll have to download sources (checkout http://www.kernel.org/pub/linux/kernel/)

$wget http://www.kernel.org/pub/linux/kernel/<full_kernel_version>
$sudo apt-get install kernel-package linux-source
$sudo tar -xvf linux-source-<kernel_version>.tar.bz2 -C /usr/src/

If make works then follow these next steps:

$sudo make modules_install install
$cd /boot/
$sudo update-initramfs -u -k <full_kernel_version>
$sudo update-grub

Restart your kernel

$uname -r

Compile IPFW/Dummynet and then enable it

$sudo insmod ~/Downloads/ipfw3-2012/kipfw-mod/ipfw_mod.ko

My dummynet wrapper scripts are available at: https://github.com/vr000m/Research-Scripts/tree/master/dummynet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment