How to bind a route to a network adapter and not IP

Ruben de Groot fbsd-stable at bzerk.org
Fri Jun 15 18:38:43 UTC 2012


On Fri, Jun 15, 2012 at 07:54:52PM +0200, sthaug at nethelp.no typed:
> > Perhaps you can ask the very same question in another way so its easier
> > to understand why you losing packets? All in all I always thought TCP/IP 
> > was the basic unit in Internet based networking but feel free to correct 
> > me if you have any news I might have missed... :)
> 
> This is an old and well known problem, with no solution as of today
> (unless you want to run quagga/zebra or similar).
> 
> With Cisco and Juniper (and probably lots of other big name) routers,
> if I create a static route pointing to a next hop on one interface,
> and the interface goes down (e.g. Ethernet cable is unplugged),
> 
> 1. the static route is removed from the routing table.
> 
> But then, when the interface later comes back up
> 
> 2. the static route is reinstalled in the routing table.
> 
> With FreeBSD point 1 above happens, but not point 2.
> 
> I would love to have the functionality where FreeBSD would reinstall
> the route as in point 2 above. I think this is definitely the least
> surprising behavior (POLA), and should happen even without running an
> explicit routing system like quagga.

This can be quite easily programmed with kqueue, use EVFILT_NETDEV for
notices of interface up/down events and adjust the routing table
accordingly. Big chance Cisco and Juniper are doing something similar.

--
Ruben



More information about the freebsd-stable mailing list