networking freebsd14.0p6 defaultrouter issue

With freebsd 14.0 I have new unexpected behaviour.

I've defined defaultrouter in rc.conf, I've got 2 vtnet interfaces with dhcp however for some reason it adds both interfaces as defaultrouter while I only want the defined to be the defaultrouter.

How do I configure this to be the case without setting the interfaces to a static IP
 
It is because of route multipath enabled by default in 14. To disable it set net.route.multipath=0. If you need default route only via particular interface, you can ignore routes on another, see dhclient.conf() for details:

Code:
interface "vtnet1" {
     ignore routers;
}
 
There are two interfaces doing DHCP, and both will get a gateway from DHCP. Either don't use DHCP or set dhclient(8) to ignore the gateway.
 
Back
Top