Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2018 19:46:03 +0200
From:      Harry Schmalzbauer <freebsd@omnilan.de>
To:        Grzegorz Junka <admin@yoonka.com>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@FreeBSD.org>
Subject:   Re: Default network device
Message-ID:  <5ABE77DB.3030501@omnilan.de>
In-Reply-To: <5237ec10-c906-db3c-f62f-cc7478a31dc0@yoonka.com>
References:  <5237ec10-c906-db3c-f62f-cc7478a31dc0@yoonka.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 Bezüglich Grzegorz Junka's Nachricht vom 24.03.2018 17:21 (localtime):
> Hi,
>
> In my laptop I have both, wlan0 and ue0 (ethernet). When both are
> connected, FreeBSD chooses to use wlan0 by default. Only when I
> disable wlan0 it switches to use ue0. Since ue0 is ethernet it's
> obviously much faster than wlan0.
>
> Why FreeBSD is selecting wlan rather than ue? How to configure the
> network so that wlan0 is only used when ue0 isn't available?
>

Hello GrzegorzJ,

I don't know the internal details of FreeBSDs source address selection,
but I as far as I know it doesn't care about the type of interface in
any way, including it's capabilities like bandwidth.
You can use if_lagg(4) and configure your 802.11 device as fallback only.
Otehrwise simple IP matching algorithms are in place.
So if the host, you're connecting to, is reachable via two lo0 routes
(netstat -nr -f inet and look for /32 and /?? routes – the /32 is on the
interface and the real network is on lo0), you could adjust it's metric
probably... Never done so, but these are the places to start.

-harry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5ABE77DB.3030501>