Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Oct 2009 17:35:57 -0700
From:      "Michael K. Smith" <mksmith@adhost.com>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>, Julian Elischer <julian@elischer.org>
Subject:   Re: Wacky DHCP values that work in windows but not in FreeBSD
Message-ID:  <C6F9197D.B7D5C%mksmith@adhost.com>
In-Reply-To: <4AD3B9FB.4010205@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help



On 10/12/09 4:21 PM, "Doug Barton" <dougb@FreeBSD.org> wrote:

> Michael K. Smith - Adhost wrote:
>>> -----Original Message-----
>>> From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd-
>>> net@freebsd.org] On Behalf Of Julian Elischer
>>> Sent: Monday, October 12, 2009 4:00 PM
>>> To: Doug Barton
>>> Cc: freebsd-net@freebsd.org
>>> Subject: Re: Wacky DHCP values that work in windows but not in FreeBSD
>>> 
>>> Doug Barton wrote:
>>>> Howdy,
>>>> 
>>>> I usually have a wireless router connected directly to the
>> AT&T/Yahoo
>>>> DSL modem but last night I wanted to do some debugging so I plugged
>>> my
>>>> laptop directly into the modem (after powering off the modem, etc.).
>>>> 
>>>> The values I got back from DHCP not only don't make sense, they
>>> didn't
>>>> work in FreeBSD at all. Dual-booting to Windows showed that the
>>> values
>>>> I saw from DHCP were "correct," and somehow they managed to work.
>>>> Taking a closer look at the router after I plugged it back in showed
>>>> the same.
>>>> 
>>>>         Dhcp Enabled. . . . . . . . . . . : Yes
>>>>         Autoconfiguration Enabled . . . . : Yes
>>>>         IP Address. . . . . . . . . . . . : 76.212.147.xxx
>>>>         Subnet Mask . . . . . . . . . . . : 255.255.0.0
>>>>         Default Gateway . . . . . . . . . : 151.164.184.xxx
>>> huh?
>>> 
>>> only way this could work would be if it was marked as "point to point"
>>> I think..
>> 
>> That could be a primary IP address on an interface on which your 76
>> address is a sub interface.
> 
> Can you specify what you mean by 'that'?

Sure.  In Cisco world

Interface GigE0/0
Ip address 151.164.184.xxx 255.255.255.252 (or whatever the mask is)
Ip addres 76.212.147.1 255.255.0.0 secondary

They will use the primary IP address as the default.
> 
>> The interface will do proxy-arp when a
>> traffic request comes in.  Or something else!  I'm not sure if this will
>> work, but you could actually hard code your default gateway with a
>> -hopcount 2 (or higher) and see if that works.  I've not tried it on a
>> live machine.  Something like route add default 151.164.184.xxx
>> -hopcount 5.  You may have to delete the DHCP-assigned entry first.
> 
> Ah, I didn't know about -hopcount, thanks. There was no default route
> installed at all when I booted. I tried 'route add default 151...'
> even though I was sure it wouldn't work, and I was not disappointed.

Heh.  It probably complained because you weren't on the local network.  As
Julian mentioned, you may be able to add the -iface should help.  Also, if
you wanted to test, you could add yourself on the same subnet as the default
gateway. Depending on what xxx is on the 151 net, you could add an interface
address in the same subnet.  As an example, if the address is 50, you could
add 49 and a /30 subnet mask.

Another trick would be to plug the windows box back in and do an 'arp -an'
and find the MAC address for the 151 (if it's available).  Then, you can
manually add the arp to your FreeBSD box.

Mike





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C6F9197D.B7D5C%mksmith>