From owner-freebsd-questions@FreeBSD.ORG Thu May 27 02:59:55 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB64F106566B for ; Thu, 27 May 2010 02:59:55 +0000 (UTC) (envelope-from btillman99@yahoo.com) Received: from web36504.mail.mud.yahoo.com (web36504.mail.mud.yahoo.com [209.191.85.4]) by mx1.freebsd.org (Postfix) with SMTP id 774098FC13 for ; Thu, 27 May 2010 02:59:55 +0000 (UTC) Received: (qmail 64210 invoked by uid 60001); 27 May 2010 02:59:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1274929194; bh=gpvwHIstUl5h3Jfn3I/MllPxzUAaVQs5JcuX8K+vw6U=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=daOjBV58nh23LGq0Xn6iw5xFDayDpL72NpF8zSZD1tn+6HfRoJtUCu5stG9WlLBNxM39URpoRMz075uyku96vDrWa0jcb8CMehaAOiWz5LTCGQf/3hv9UPoXh6FmvEh42efwUHQAhe8fxAKSfaDnBhNZUrUH2L9GOs13EQVwjVU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=MfROzKeJvzZR+/bjVAMwZJCI55Oj+/QQG6oQGhw09lRbvB2jowtNpRE29uTscfn4G1OJ09wl/AG43+BD16ELVti6DqrAX1nA/sg2YFYrK/ASNk6rKsqzz6DzmFiQ0bi8BTPUo4aTOtzjGXmA23HnyGm1iAFUW8IcABlwxkhiGAY=; Message-ID: <848683.61901.qm@web36504.mail.mud.yahoo.com> X-YMail-OSG: KaFM9CgVM1mJRqA6mTCcbf_GTlMsjyO6t2ultoyQChYt67M 4ycgW3DSaecsA56geiBOK2HU.8788t1DhgEyLRJd3PIcWrjFtlgD0Bf3Mmtp Lj.LVg7Ri9Niaxx55WpFxKs.bZ0nDH7PMw4qaXny67eWfGyWoP0Rc3gpvX_w pqIBu7CGjPbZONLGeWYT_l5G9FOJv4Yw5ovqBKoaxHDqj5DEZmMFLTRyH93U JkOOOHfj8Ec2r4CAsNYGqKko8GDaydsov5JdY.SKD3gBlDv7gRQ9qlPGEbpu 6KTueSls- Received: from [98.242.233.74] by web36504.mail.mud.yahoo.com via HTTP; Wed, 26 May 2010 19:59:54 PDT X-Mailer: YahooMailClassic/11.0.8 YahooMailWebService/0.8.103.269680 Date: Wed, 26 May 2010 19:59:54 -0700 (PDT) From: Bill Tillman To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Diskless Booting Router X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2010 02:59:55 -0000 Thank to all who replied on my previous request for information about diskless booting. I am now that much closer to my goal of having a totally diskless router. It's working right now but there are still two major bugs I need to work out. 1. When the FreeBSD box which is my diskless router boots it gets an IP address and gateway information from the dhcp server. This dhcp server also server also serves IP addresses to all other machines on my LAN. The problem is when the 2nd NIC which is attached to my cable modem picks up it's IP address from the cable modem the default route is already set and thus it doesn't get set to the modem's IP, thus I can't access anything outside of my LAN. I have manually deleted the default route and then added the correct route and all works well. But of course I need to automate this so it takes care of itself on reboot. I'm thinking my choices here are to use a group in my dhcpd.conf file which doesn't assign a default router. I'm just wondering if this will work. My other choice would be if there is some flag or switch I could use in my /etc/rc.conf file for the 2md NIC's dhcp. Does dhclient allow the command to force whatever route comes from the cable modem to override the current default route? My last and most painful choice is to write a script which would sleep for a few seconds to wait on everything to settle down and then delete the default route and add a new one. The trouble with this is that occasionally the cable modem route will be different so hard coding into a script will mean that I will always have to be on the lookout for changes. 2. The second bug is that once the router is up and running even though I have built a new custom kernel to allow all by default, when I load my IPFW rules from /etc which is nfs mounted it craps out after the first rule is run and I have to reboot the server. I have temporarily worked around this by copying the set of IPFW rules into a file in the mfs area. When I riun it from there it goes well and then my router is working and in a true diskless manner. Any advice would be appreciated.