Disclaimer: I have no experience with dummynet or PicoBSD, and almost no experience with FreeBSD. My goal is to document the creation of a PicoBSD floppy image with dummynet and a custom kernel (with shorter time slices) in QEMU in order to replicate TCP experiments. [FreeBSD in QEMU] and [building PicoBSD] are orthogonal tasks, but I'll pile both in this page.
My principal machine is a Linux desktop, so my first goal is to install FreeBSD 4.3 in a QEMU VM:
Now on to making a PicoBSD image. I'm following directions from Tentative PicoBSD FAQ. The bridge reference configuration comes with ipfw and dummynet, so *crosses fingers* it should suffice.
--- /usr/src/release/picobsd/bridge/crunch.conf.orig Thu Apr 27 04:06:13 2006 +++ /usr/src/release/picobsd/bridge/crunch.conf Thu Apr 27 05:44:24 2006 @@ -87,7 +87,7 @@ #progs less # 36KB #ln less more progs more # 12KB -special more srcdir /usr/ports/picobsd/more +special more srcdir /usr/ports/misc/44bsd-more progs sysctl progs swapon # 0KB. @@ -152,15 +152,15 @@ progs inetd # 12KB. progs telnet # 20KB. progs telnetd # 12KB. -#progs ftp # 28KB. -#progs tar # 32KB. +progs ftp # 28KB. +progs tar # 32KB. # Check the ssh license! If you want to use this, # go to /usr/ports/security/ssh-picobsd, do a make extract configure #progs sshd # includes ssh and scp -special sshd objvar SSHD_OBJS -special sshd srcdir /usr/ports/picobsd/ssh-picobsd/work/ssh-1.2.27 -special sshd objdir /usr/ports/picobsd/ssh-picobsd/work/ssh-1.2.27 +#special sshd objvar SSHD_OBJS +#special sshd srcdir /usr/ports/picobsd/ssh-picobsd/work/ssh-1.2.27 +#special sshd objdir /usr/ports/picobsd/ssh-picobsd/work/ssh-1.2.27 ### ee uses ncurses instead of curses libs -ledit -lutil -lmd -lcrypt -lmp -lgmp -lm -lkvm
Frenzy is a FreeBSD Live CD that has the dummynet kernel module and iperf in the standard distribution. It's perfect!
ifconfig vr0 up dhclient kdload dummynetIf iperf crashes on FreeBSD with a pthread error, try running each iperf server in interactive (non-daemon, non-background) mode, each instance under a different user. (It works!)
Kernel built with these options