From owner-freebsd-questions@FreeBSD.ORG Mon Feb 25 21:25:20 2008 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 0713316A400; Mon, 25 Feb 2008 21:25:20 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from gw.sandvine.com (gw.sandvine.com [199.243.201.138]) by mx1.freebsd.org (Postfix) with ESMTP id B732313C43E; Mon, 25 Feb 2008 21:25:19 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by gw.sandvine.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 25 Feb 2008 16:24:18 -0500 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id CBACA11713; Mon, 25 Feb 2008 16:24:18 -0500 (EST) Date: Mon, 25 Feb 2008 16:24:18 -0500 From: Ed Maste To: Andrea Venturoli Message-ID: <20080225212418.GA87032@sandvine.com> References: <47C012EE.6090006@netfence.it> <20080224230441.GA12542@sandvine.com> <47C28A9E.6040700@netfence.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47C28A9E.6040700@netfence.it> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 25 Feb 2008 21:24:19.0042 (UTC) FILETIME=[C7F3AC20:01C877F4] Cc: Ed Maste , freebsd-questions@freebsd.org Subject: Re: 6.3 DHCP and static_routes 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: Mon, 25 Feb 2008 21:25:20 -0000 On Mon, Feb 25, 2008 at 10:30:06AM +0100, Andrea Venturoli wrote: > Ed Maste ha scritto: > > >As of FreeBSD 6.3 dhclient supports RFC3442, the classless static route > >option. If your DHCP server is including this option but not encoding > >the default route using the option you'll have no default route. > > Thanks for the answer; this is in fact my case. > It would be great news if I could get it to work properly! Obviously > repeating the static routes in rc.conf was an hack due to lack of this > support. > > > Now I fiddled with my dhcpd.conf and came up with this: > > option local-route code 121 = string; > option local-route 00:0a:01:02:7f; > option local-route 18:c0:A8:65:0a:01:02:0d; > option local-route 18:c0:A8:67:0a:01:02:0f; > option local-routew code 249 = string; > option local-routew 00:0a:01:02:7f; > option local-routew 18:c0:A8:65:0a:01:02:0d; > option local-routew 18:c0:A8:67:0a:01:02:0f; Yes, the problem is that your local-route option overrides the previous one each time, so only the last one takes effect. You need to put them all together as a single option, probably like option local-route 18:c0:A8:65:0a:01:02:0d:18:c0:A8:67:0a:01:02:0f:00:0a:01:02:7f; and the same for the Windows code 249 version of the option. -Ed