Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Dec 2012 09:46:14 -0600
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Tom Evans <tevans.uk@googlemail.com>
Cc:        FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Re: Using dhclient on WAN if on a box serving DHCP to LAN if
Message-ID:  <CACdU%2Bf_e9oUKYg__8AjDzqXWh6y-Yuw_cHmDmfGbp_UUuhpxWA@mail.gmail.com>
In-Reply-To: <CAFHbX1LViMrh95sAm3uMJ1dt3RtUwKbPCtHQCTU2xaALaf7n7A@mail.gmail.com>
References:  <CAFHbX1LViMrh95sAm3uMJ1dt3RtUwKbPCtHQCTU2xaALaf7n7A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 7, 2012 at 5:38 AM, Tom Evans <tevans.uk@googlemail.com> wrote:
> Hi all
>
> Using 9.0-STABLE #1 r230946 - I found it out as I rebooted to prepare
> for 9.1, but I think it should be largely irrelevant of version.
>
> I have a freebsd router that provides all the things a soho router
> should on its LAN iface - DNS, DHCP, NAT (via pf). The WAN iface
> connects to a ADSL modem operating in bridge mode.
>
> My ISP has recently forced a change on to me, in order to get service
> I have to connect via DHCP, in order for them to give me my static IP.
> Apparently this makes their lives a lot easier. Even knowing the IP,
> netmask, broadcast and router is not enough, no service will flow
> unless a DHCP request has been registered.
>
> Relevant rc.conf, ale0 is the WAN, em0 is the LAN
>
> ifconfig_ale0="DHCP"
> ifconfig_em0="inet 192.168.1.1 netmask 255.255.255.0"
> gateway_enable="YES"
>
> dhcpd_enable="YES"
> dhcpd_flags="-q"
> dhcpd_ifaces="em0"
> dhcpd_conf="/usr/local/etc/dhcpd.conf"
>
> With this configuration, the default route is over the LAN iface. This
> causes the dhclient for ale0 to get a response from the local dhcpd
> server, not the ISP dhcpd server. This drove me potty! Can anyone
> explain why dhcpd, having been told only to listen for DHCP on em0,
> responds to ale0? Could this be related to my pf rules, or is it down
> to the default route being incorrect?
>

I have seen some modems that were configured to bridge mode or use
public IPs that would also hand out the private IPs.  Try changing
your LAN IP address to not be on the 192.168.1.0/24 network (i.e.
192.168.2.0/24).  Then see if you pull a 192.168.1.x or the LAN IP
address.

-- 
DISCLAIMER:

No electrons were mamed while sending this message. Only slightly bruised.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf_e9oUKYg__8AjDzqXWh6y-Yuw_cHmDmfGbp_UUuhpxWA>