From owner-freebsd-stable@FreeBSD.ORG Sun Jun 17 21:10:58 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 893241065670 for ; Sun, 17 Jun 2012 21:10:58 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with SMTP id C81FD8FC0C for ; Sun, 17 Jun 2012 21:10:57 +0000 (UTC) Received: (qmail 56974 invoked from network); 17 Jun 2012 21:10:49 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 17 Jun 2012 21:10:49 -0000 Date: Sun, 17 Jun 2012 23:10:49 +0200 (CEST) Message-Id: <20120617.231049.41685248.sthaug@nethelp.no> To: hm@hm.net.br From: sthaug@nethelp.no In-Reply-To: <4FDE3E6C.9080703@hm.net.br> References: <4FDB6AA3.3040606@gmail.com> <201206172152.55303.hselasky@c2i.net> <4FDE3E6C.9080703@hm.net.br> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org, 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: Sun, 17 Jun 2012 21:10:58 -0000 > > I loose packets because I use a WLAN adapter. Sometimes the link is down for > > various reasons, and then the routes start changing for manually created > > routes, and I want to prevent that. > > well that is certainly not a reason for changing routes > > I have the feeling you are not explaining good enough what really is > going on and it may help sending your configurations and an example of > routes and IP addresses before and after this route change Why is this so hard to understand? "Link down" leads to "static route is deleted". This is standard FreeBSD behavior, and has been this way for as long as I can remember (btw, I believe this behavior is from the original BSD, not FreeBSD specific). You can show this by having a static default route pointing to an address on an Ethernet interface which has link. And then pulling the TP cable from the Ethernet interface. Observe that the default route is automatically removed. My claim is that this behavior is reasonable *but* I'd like the route restored when the link comes back up again. This is standard Cisco / Juniper behavior - but *not* standard FreeBSD behavior. Steinar Haug, Nethelp consulting, sthaug@nethelp.no