[Dnsmasq-discuss] interface+macvlan on same network confuses dnsmasq v2.66rc2

Simon Kelley simon at thekelleys.org.uk
Tue Oct 22 19:20:07 BST 2013


On 22/10/13 17:17, Gui Iribarren wrote:
> On 10/22/2013 05:45 PM, Simon Kelley wrote:
>> On 21/10/13 20:31, Gui Iribarren wrote:
>>> Hello Simon!
>
>> My hunch is that this is something to do with ARP.
>
> indeed! i'm sorry i didn't provide tcpdumps
> you're right, instead of the expected DHCPOFFER, all i got on the client
> were endless ARP requests for the would-be-offered IP, coming from the
> router
>
> so, what you're saying is that dnsmasq is prepopulating the ARP cache
> pointing to the wrong interface?
>
> # arp -a
> IP address       HW type     Flags       HW address            Mask Device
> 192.168.11.20    0x1         0x2         20:16:d8:65:4d:29     * br-lan
>
> that's on the router, just after asking for a lease from the client,
> with dnsmasq.conf containing no-dhcp-interface=br-lan

I don't think it's a simple as setting the wrong interface in the ARP 
table,
>
> Then, do you think there's any chance of getting that arp trick point to
> 'anygw'?

Yes, depending on the results of the dhcp-broadcast thing.
>
> i'll try dhcp-broadcast later today
> what would be the downsides / cons of having dhcp-broadcast permanently
> enabled? maybe some broken clients?

Just a bit more load on clients from the broadcasts. Unless your network 
is HUGE, I doubt it's noticable.

Cheers,

Simon.

>
> thanks a lot!
>
> gui
>
>> For an unconfigured
>> client (ie doing DHCPDISCOVER) dnsmasq ends up knowing the MAC address
>> of the client and its IP address, but the client _doesn't_ know that IP
>> address, and so can't respond to a ARP request. To get round this,
>> dnsmasq populates the ARP table on the server directly with the IP
>> address, MAC address and interface. Then it send the OFFER packet to the
>> IP address and the kernel knows how to route it. I think that  you
>> "interesting" setup may be confusing this process. In the second
>> instance, I suspect that the crucial thing that makes it work is not the
>> presence of a lease in the lease-file, but a correct ARP-table entry
>> from the previous activity.
>>
>> Certainly, a few more experiments, and looking at the output of
>>
>> arp -a
>>
>> would be instructive.
>>
>>
>> Looking again - there are more clues:
>>
>>   ### the OFFER it's sending is a funny mix:
>>   ### it is sent *from* br-lan MAC and IP (192.168.11.129)
>>
>> That may be the MAC address thing I talked about, or it may be something
>> else. Another experiment: try setting
>>
>> --dhcp-broadcast
>>
>> and see what happens then.
>>
>>
>> Cheers,
>>
>> Simon
>>
>>
>> Cheers,
>>
>> Simon.
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>




More information about the Dnsmasq-discuss mailing list