From owner-freebsd-net@FreeBSD.ORG Sun Apr 1 10:49:01 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BDF3616A404 for ; Sun, 1 Apr 2007 10:49:01 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.freebsd.org (Postfix) with ESMTP id 835E913C484 for ; Sun, 1 Apr 2007 10:49:01 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 819612110A1; Sun, 1 Apr 2007 06:49:02 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 01 Apr 2007 06:49:01 -0400 X-Sasl-enc: 5vywpw7WLsMfRGRbP4DqpztGzTCWKywERltOApTVZOdj 1175424541 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id 2E5133777A; Sun, 1 Apr 2007 06:49:01 -0400 (EDT) Message-ID: <460F8E1B.80904@FreeBSD.org> Date: Sun, 01 Apr 2007 11:48:59 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: Da Rock References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: intel 802.11 2200BG routing X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2007 10:49:01 -0000 Da Rock wrote: > > So I could use some guidance as to what I can do to rectifiy this > problem. I have 2 goals: > 1. setup iwi to start on boot, and attach to my ap whenever its in range. > 2. make sure iwi stays connected without manually monitoring it. > 3. prioritise my routes via the rl0 and iwi if's so that cable is used > over wifi, but both can be used to access the network. Umm, that's 3 goals. :^) The short answer is, you can't do what you're trying to do, yet. You can cut over without rebooting, you just need to remember to kill off all dhclient processes and manually remove the default route, as in FreeBSD all forwarding entries ('routes') reference an interface pointer, and the PRC_IFDOWN handler will not touch routes marked RTF_STATIC. No one as far as I know has rolled a 'cutover' script. What would be really useful is a port which can do this cutover in a more general way until the stack is changed. This isn't that different from say Microsoft Windows where a manual cutover is needed, although the OS having a multipath FIB ('routing table') helps. The long answer is, it's possible, and it requires some things in the network stack to be carefully reworked. I have looked at these issues in some depth; there are at least 3 items on the Network Stack Wiki which are directly relevant to making the kind of clean cut-over between wireless/wired interfaces possible. Notably looking at the PRC_IFDOWN handler in netinet, making forwarding entry lookup skip interfaces marked down, and introducing route preference into the routing trie. There are historical reasons why the code is the way it is. It will take a while to get these issues addressed going forward. Regards, BMS P.S. routed isn't going to help you at all in this situation, it's just an implementation of the RIPv2 routing protocol; it may have helped as the routes it introduces to the kernel are !RTF_STATIC. One thing I haven't tried is IPv4 Router Discovery (rdisc), that may help update the default route quickly. The problem with this of course is the additional network configuration in the infrastructure itself.