To run multiple jails on a single host and provide different routing tables (FIBs) to each jail, you have to compile a custom kernel.

Update: Compiling a custom kernel is no longer needed with FreeBSD 12. Start at step 4 for the same results.

In this example, we will recompile the kernel to provide 15 additional FIBs.

  1. Create a new kernel file:
    mkdir -p /root/kernels
    touch /root/kernels/ROUTING
    cd /usr/src/sys/amd64/conf
    ln -s /root/kernels/ROUTING
  2. Edit the new kernel config file (vim /root/kernels/ROUTING). In this example, we're adding the option for additional FIBs while regerencing the GENERIC kernel settings for the rest:
    include GENERIC
    ident ROUTING
    options		ROUTETABLES=16
  3. Compile:
    cd /usr/src
    make -j20 buildkernel KERNCONF=MYKERNEL
    make installkernel KERNCONF=MYKERNEL
  4. Update the boot loader config vim /boot/loader.conf.local:
  5. Update the sysctl config vim /etc/sysctl.conf:
  6. Reboot

Here's how to keep the custom kernel up-to-date.

Update: 2018-08-18: Fixed errors in step 1.