From owner-freebsd-net@FreeBSD.ORG Mon Oct 19 05:34:20 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 835721065679 for ; Mon, 19 Oct 2009 05:34:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA7F8FC1F for ; Mon, 19 Oct 2009 05:34:19 +0000 (UTC) Received: (qmail 27759 invoked by uid 399); 19 Oct 2009 05:34:18 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 19 Oct 2009 05:34:18 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4ADBFA55.9060601@FreeBSD.org> Date: Sun, 18 Oct 2009 22:34:13 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: David Horn References: <4AD3ABD0.7010603@FreeBSD.org> <25ff90d60910122030r1f8511e9ued9535024fa3078a@mail.gmail.com> <4AD410CB.2060105@FreeBSD.org> <25ff90d60910122255j5ccae96ar7c58488209768956@mail.gmail.com> In-Reply-To: <25ff90d60910122255j5ccae96ar7c58488209768956@mail.gmail.com> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Brooks Davis Subject: Re: Wacky DHCP values that work in windows but not in FreeBSD 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: Mon, 19 Oct 2009 05:34:20 -0000 I'm adding Brooks to the cc list since he is mr. dhcp lately. :) David Horn wrote: > On Tue, Oct 13, 2009 at 1:31 AM, Doug Barton wrote: >> David Horn wrote: >>> Without seeing the actual tcpdump of the dhcp packets, I would guess >>> that this is the Classless Static Route option in DHCPv4 (option 121). >> Ok, I will give the tcpdump option a go as soon as I have a chance. I finally had a chance to look at this again (with your revised tcpdump command line from another mail of yours) and I think you're right. The log (http://people.freebsd.org/~dougb/tcpdump.log) definitely mentions Classless-Static-Route. This was with the stock dhclient in -current. I also tried ISC's 4.1.1b3 just to be sure, and that did not work either. I also tried the various incarnations of route that were suggested on this thread, including all 4 combinations with/without -iface and -hopcount, and none of that worked either. Quick recap, I got the following from dhcp: Your-IP 76.244.161.xxx Subnet-Mask Option 1, length 4: 255.255.0.0 Default-Gateway Option 3, length 4: 151.164.184.xxx Now what DID work was something I tried on a whim. Actually two things worked, 'route add default 76.244.161.1' and (after rebooting) 'route add default 76.244.0.1'. With either of those I could reach things both inside the network (like the name server) and out in the wide world. I have no idea WHY those worked, I suspect that Mike Smith was right and there is some sort of proxy-arp going on, but I'm far from a networking expert. I'll leave the tcpdump log up for a while if y'all think it's useful. I can also test patches for this if someone comes up with a fix. Doug >> Meanwhile, if this is in fact the case how would we make it work in >> FreeBSD? Is there a newer version of DHCP that handles this properly? > > I thought that dhclient originated from ISC, but looking at the > 4.1.1b2 ISC DHCP source and at the OpenBSD dhclient, I did not see > option 121 handling in dhclient. The freebsd copy of both dhclient.c, > and /sbin/dhclient-script there is code for handling this option. I > guess the FreeBSD version split from the ISC version at some point, > and option 121 handling was added (2+ years ago). > > As far as fixing/debugging, it all depends on the exact dhcp options > and values. It might just be a tweak to /sbin/dhclient-script, or it > may be more complicated. > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/dhclient/dhclient.c > Revision 1.21: download - view: text, markup, annotated - select for diffs > Fri Feb 9 17:50:26 2007 UTC (2 years, 8 months ago) by emaste > Branches: MAIN > CVS tags: RELENG_7_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0 > Branch point for: RELENG_7 > Diff to: previous 1.20: preferred, colored > Changes since revision 1.20: +68 -0 lines > > Implement RFC3442, the Classless Static Route option. > > The original DHCP specification includes a route option but it supports > only class-based routes. RFC3442 adds support for specifying the netmask > width for each static route. A variable length encoding is used to minimize > the size of this option. > > PR: bin/99534 > Submitted by: Andrey V. Elsukov > Reviewed by: brooks > > ---Dave H > -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/