From owner-freebsd-net@FreeBSD.ORG Wed Jan 21 23:27:45 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 377D516A4CE for ; Wed, 21 Jan 2004 23:27:45 -0800 (PST) Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AAA043D49 for ; Wed, 21 Jan 2004 23:27:43 -0800 (PST) (envelope-from langd@informatik.tu-muenchen.de) Date: Thu, 22 Jan 2004 08:27:42 +0100 From: Daniel Lang To: freebsd-net@freebsd.org Message-ID: <20040122072741.GB62252@atrbg11.informatik.tu-muenchen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Geek: GCS/CC d-- s: a- C++$ UBS++++$ P+++$ L- E-(---) W+++(--) N++ o K w--- O? M? V? PS+(++) PE--(+) Y+ PGP+ t++ 5+++ X R+(-) tv+ b+ DI++ D++ G++ e+++ h---(-) r++>+++ y+ User-Agent: Mutt/1.5.1i X-Virus-Scanned: by amavisd-new at informatik.tu-muenchen.de Subject: dhcp setup advice X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2004 07:27:45 -0000 Hi, I'm currently chewing on a problem how to setup DHCP properly the way I want it. My notebook computer (running 5.2-CURRENT) has a fxp0 and a wi0 (wavelan) interface. WaveLan ist available most of the times. Now, what I would like it to do is: 1. If fxp0 link is up, configure fxp0 interface, get DNS and default router from dhcp via fxp0. 2. If fxp0 link falls down, configure wi0 now, get DNS and default router from dhcp via wi0 3. If fxp0 is up again, do 1. This can be simplified a little bit, since each interface can stay configured and DNS servers are the same, so what it really needs to do, is: - fetch default route from fxp0 is fxp0 is available - else fetch default route from wi0 I know, that dhclient can bind to more than one interface and dhclient has the capability to detect link up/link down. Further it appears, that its possible call a script on certain events (so maybe I can call a script on link/up/down events on any interface). What I don't know is, how to tell dhclient to fetch a new default route from a certain interface. I do not like to kill dhclient and start it again (well, possibly that's the only solution, but if not, I would prefer another way). Even the documentation of the omshell interface did not help me much in that matter. Any help appreciated. Thanks, Daniel -- IRCnet: Mr-Spock - Work is for people, who don't surf - Daniel Lang * dl@leo.org * +49 89 289 18532 * http://www.leo.org/~dl/