Two interfaces sharing the same IP address: how to change
default route's interface on link change?
Bruce M. Simpson
bms at FreeBSD.org
Wed Feb 20 01:18:06 UTC 2008
Jeremie Le Hen wrote:
> In summary, favor wired connectivity over the wireless one, at any time:
> could this be at boot time or not.
>
> I'm pretty sure I'm not the only one who wants this kind of setup. So
> how did you achieve this setup?
The forwarding code needs to be changed to support the notion of a
floating static, regardless.
Recall that in BSD default routes configured statically, whether
manually or by DHCP, have the RTF_STATIC flg set.
Currently, the BSD behaviour is NOT to update the rt_ifp for an
RTF_STATUC route when ifadown is called. I believe this to be correct
and honours the original API contract of RTF_STATIC. It is not what you
desire in your use case however.
Configuring ifstated to manually replumb addresses and routes is
probably an easier place to start. Seamless migration is not possible
yet; generally sockets are tied to the interface where they were
implicitly bound, also nexthop selection happens purely on the basis of
destination address.
BMS
More information about the freebsd-net
mailing list