Answer the question
In order to leave comments, you need to log in
Why does dhclient on FreeBSD 13 ignore setfib and write routes to the main table?
Axis FreeBSD 13. Dhclient regular.
loader.conf
net.add_addr_allfibs=0
net.fibs="2"
setfib 1 dhclient em2
Answer the question
In order to leave comments, you need to log in
The problem turned out to be in ifconfig, not routes. When binding an address to an interface, ifconfig for some reason in FreeBSD 13.0-RELEASE-p4 ignores the current routing table (fib 1) and uses (fib 0) in the dhclient-script.
As a result, I changed dhclient-script and added the definition of the current fib to the beginning of the code
FIB="fib `sysctl net.my_fibnum | awk '{print $2}'`"
$IFCONFIG $interface inet -alias $alias_ip_address $FIB > /dev/null 2>&1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question