[Dnsmasq-discuss] Answering DHCPINFORM from other interfaces
sfzhi at yahoo.com
Mon Oct 19 21:01:58 BST 2009
richardvoigt at gmail.com wrote:
> On Sun, Oct 18, 2009 at 10:41 AM, Sergei Zhirikov <sfzhi at yahoo.com> wrote:
>> richardvoigt at gmail.com wrote:
>>> On Sat, Oct 17, 2009 at 1:18 PM, Sergei Zhirikov <sfzhi at yahoo.com> wrote:
>>>> Michael Rack wrote:
>>>>> You have to setup a bridge on your linux-router and assign every dynamic
>>>>> created ppp-interface to that.
>>>>> brctl addif br0 pppx
>>>>> Configure DNSMASQ to listen on the bridges interface.
>>>>> And well, you're done.
>>>> Thanks for the suggestion, Michael.
>>>> I have tried it, but unfortunately it doesn't work :(.
>>>> The command "brctl addif br0 ppp0" fails with "can't add ppp0 to bridge br0: Invalid argument". It looks like point-to-point interfaces can not be added to a bridge (I tried also with a TUN device, just to see if it could be added, and got the same error message).
>>> Did you create a bridge first?
>>> brctl addbr br0
>> Of course, I did :)
>>> What is the output of
>>> brctl show
>> # brctl show
>> bridge name bridge id STP enabled interfaces
>> br0 8000.000000000000 no
>> I don't think it is meant to work with PPP interfaces.
> Right, since ppp doesn't use an ethernet physical address (MAC
> address) the bridge can't learn which endpoints are through which
> I'm not sure how the remote peer can generate DHCPINFORM messages when
> it got its address through the PPP protocol and not through DHCP at
> all. That seems really wrong, what if you had a PPP server configured
> to issue addresses from its own pool, without any DHCP involved?
As far as I understand, the whole purpose of DHCPINFORM is to allow hosts that got their IP addresses in a way other than DHCP to obtain the configuration information that may not be available in that other way. In this particular case, for example, this could be NTP server, WPAD URL, etc. I don't see anything wrong with that. Most of the DHCP options are common for the whole subnet, so it doesn't really matter if the IP address was not assigned by the DHCP server, as long as it is in the correct subnet. Although in case of PPP it would probably be more correct to talk about IP ranges rather than subnets, but the idea remains the same. By the way, DHCPINFORM can also be used by the hosts that have statically configured IP addresses.
> Are the DHCP messages actually coming from a host or interface beyond the
> far end of the tunnel (i.e. not the ppp interface on the remote
There is nothing beyond the far end of the tunnel. It's just a single host, without any further routing involved. So, the DHCP messages are coming from the remote PPP endpoint.
Anyway, thank you for trying to help. I think I have solved the problem for the time being (see my other post).
More information about the Dnsmasq-discuss