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

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 ROUTING
  3. 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
  4. Compile:
    # cd /usr/src
    make -j20 buildkernel KERNCONF=MYKERNEL
    make installkernel KERNCONF=MYKERNEL
  5. Update the boot loader config:
    # vim /boot/loader.conf
  6. Reboot

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

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