From owner-freebsd-stable@FreeBSD.ORG Fri Jun 15 18:38:43 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27911106566C for ; Fri, 15 Jun 2012 18:38:43 +0000 (UTC) (envelope-from fbsd-stable@bzerk.org) Received: from ei.bzerk.org (ei.bzerk.org [82.95.223.12]) by mx1.freebsd.org (Postfix) with ESMTP id 7FBCC8FC17 for ; Fri, 15 Jun 2012 18:38:42 +0000 (UTC) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.14.4/8.14.4) with ESMTP id q5FIcWhm082824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Jun 2012 20:38:33 +0200 (CEST) (envelope-from fbsd-stable@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.14.4/8.14.4/Submit) id q5FIcWDN082823; Fri, 15 Jun 2012 20:38:32 +0200 (CEST) (envelope-from fbsd-stable@bzerk.org) Date: Fri, 15 Jun 2012 20:38:32 +0200 From: Ruben de Groot To: sthaug@nethelp.no Message-ID: <20120615183832.GA82739@ei.bzerk.org> Mail-Followup-To: Ruben de Groot , sthaug@nethelp.no, animelovin@gmail.com, freebsd-stable@freebsd.org, hselasky@c2i.net References: <201206151819.32398.hselasky@c2i.net> <4FDB6AA3.3040606@gmail.com> <20120615.195452.74691488.sthaug@nethelp.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120615.195452.74691488.sthaug@nethelp.no> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-12.9 required=5.0 tests=ALL_TRUSTED,AUTHD_RELAY, BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ei.bzerk.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (ei.bzerk.org [127.0.0.1]); Fri, 15 Jun 2012 20:38:38 +0200 (CEST) Cc: freebsd-stable@freebsd.org, animelovin@gmail.com, hselasky@c2i.net Subject: Re: How to bind a route to a network adapter and not IP X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2012 18:38:43 -0000 On Fri, Jun 15, 2012 at 07:54:52PM +0200, sthaug@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