Re: Two interfaces sharing the same IP address: how to change default route's interface on link change?



Hi,

On Wed, Feb 20, 2008 at 01:18:03AM +0000, Bruce M. Simpson wrote:
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.

Thank you for your explanation. Even though it is quite clear to me, I
think re-architecturing the routing code is out of my knowledge.

FWIW, I've just set the the workaround suggested by Niki Denev in the
other reply, which uses lagg(4) with the failover protocol, and it works
pretty well.

Thank you.
Best regards,
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Two interfaces sharing the same IP address: how to change default routes interface on link chang
    ... I'm pretty sure I'm not the only one who wants this kind of setup. ... Recall that in BSD default routes configured statically, whether manually or by DHCP, have the RTF_STATIC flg set. ... the BSD behaviour is NOT to update the rt_ifp for an RTF_STATUC route when ifadown is called. ... Configuring ifstated to manually replumb addresses and routes is probably an easier place to start. ...
    (freebsd-net)
  • VPN Routing Issues
    ... I had a VPN set up with automatic keying between two OpenBSD machines, ... The setup ... order for the gateways to be able to communicate to the remote networks. ... If I remove those two routes and try to ping, I get "sendto: ...
    (comp.unix.bsd.openbsd.misc)
  • Network routing issue
    ... I have two devices setup as follows: ... I thought it would be possible to correct this by specifying the host routes ... therefore stopping the internal routing from ... code change to the kernel (if it is a code change - can someone point me ...
    (Linux-Kernel)
  • howto set inet6 routes?
    ... i try to setup a small ipv6 test network. ... it seems like i am too dump to setup my routes. ... $ netstat -rn -finet6 ...
    (freebsd-stable)