A Step-by-Step Guide to Adding FIBs to FreeBSD for Improved Routing Flexibility
FreeBSD is a powerful and flexible operating system that allows for advanced network routing configurations. One way to enhance this capability is by using Forwarding Information Bases (FIBs), which enable administrators to segregate network traffic and apply different routing rules to specific subsets of traffic. In this post, we will walk you through the process of adding FIBs to your FreeBSD system.
Add FIB
sysctl net.fibs=2
setfib 1 route add default 172.16.1.1
Make it Persistent
echo 'net.fibs=2' >> /etc/sysctl.conf
Jails
add in jail.conf
:
exec.fib=1;
Change Interface FIB
ifconfig lo1 fib 1
Add Connected Routes To allfibs
The allfibs line is needed for FreeBSD 12+.
echo 'net.add_addr_allfibs=0' >> /boot/loader.conf