Re: [CALL FOR TESTING] Metric support in routing stack (netlink and rtsock)

Mark Felder <[email protected]> Fri, 15 May 2026 10:32:29 -0700
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <[email protected]>
On 5/14/26 3:30 PM, Pouria Mousavizadeh Tehrani wrote:
> Hi,
>
> I've implemented metric support for the FreeBSD routing stack, 
> enabling per-nexthop metrics for both netlink and rtsock interfaces.
> This allows multiple routes with same destination to have different 
> metrics.
> The routing system should now use only the lowest-metric nexthops for 
> actual forwarding.

I was been hoping this would land in FreeBSD at some point.

Is there any way that this works when set on an interface as well? There 
already is a "metric" value you can set with ifconfig, but it's meant to 
be used by routed(8). That would allow having both Ethernet and WiFi 
connected to the same network getting the same default routes, but you 
can ensure that Ethernet takes priority if it has an active link.


Mark