Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Oct 2009 22:34:13 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        David Horn <dhorn2000@gmail.com>
Cc:        freebsd-net@freebsd.org, Brooks Davis <brooks@freebsd.org>
Subject:   Re: Wacky DHCP values that work in windows but not in FreeBSD
Message-ID:  <4ADBFA55.9060601@FreeBSD.org>
In-Reply-To: <25ff90d60910122255j5ccae96ar7c58488209768956@mail.gmail.com>
References:  <4AD3ABD0.7010603@FreeBSD.org>	 <25ff90d60910122030r1f8511e9ued9535024fa3078a@mail.gmail.com>	 <4AD410CB.2060105@FreeBSD.org> <25ff90d60910122255j5ccae96ar7c58488209768956@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <dougb@freebsd.org> 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 <bu7cher@yandex.ru>
> Reviewed by:    brooks
> 
> ---Dave H
> 


-- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ADBFA55.9060601>