[Bug 255264] Unable to add default route for fib

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 14 Apr 2022 19:45:28 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255264

--- Comment #11 from Mitja Horvat <pinkfluid@gmail.com> ---
(In reply to Marek Zarychta from comment #10)

Marek, that worked splendidly. I could even leave net.add_addr_allfibs=0.

rc.conf:
static_routes="fib1_lan fib1_default"
route_fib1_lan="-fib 1 -net 192.168.1.0/24 -interface re0"
route_fib1_default="-fib 1 default -ifa 192.168.1.2 192.168.1.1"

The console log show there was no issues when adding the route:
Apr 14 21:39:56 marin kernel: /sbin/route add -fib 1 default -ifa 192.168.1.2
192.168.1.1
Apr 14 21:39:56 marin kernel: add net default: gateway 192.168.1.1 fib 1

And the final result is this:
root@marin:/usr/home/mitja # netstat -rn4 -F1
Routing tables (fib: 1)

Internet:
Destination        Gateway            Flags     Netif Expire
default            192.168.1.1        UGS         re0
127.0.0.1          link#2             UHS         lo0
192.168.1.0/24     link#1             US          re0

Perfect, thank you!

-- 
You are receiving this mail because:
You are the assignee for the bug.