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

"Poul-Henning Kamp" <[email protected]> Fri, 15 May 2026 17:47:48 +0000
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <[email protected]>
--------
Mark Felder writes:

> > 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.

That would be really nice to have.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.