[En-Nut-Discussion] DHCP on multiple interfaces?

Thiago A. Corrêa thiago.correa at gmail.com
Fri Dec 11 15:01:08 CET 2009


Hi,

On Fri, Dec 11, 2009 at 11:05 AM, Ole Reinhardt
<ole.reinhardt at embedded-it.de> wrote:
> Hi Harald,
>
> let me make an educated guess, based on consolidated half-knowledge.
>
>> but it doesn't exactly describe, what this means in case of multiple
>> interfaces. Today's IP stacks seem to handle this in different ways.
>> Often one packet is sent to the "main interface" only, whatever that
>> means. Many stacks allow to set a route to 255.255.255.255. Several
>> stacks seem to behave completely insane.
>
> On linux a packet to 255.255.255.255 won't be routed by default. So a
> DHCP request is always assigned to one interface. Will mean: DHCP client
> sends it broadcast only to the interface which shall be configured.
> Everything else does not make much sense, right? The DHCP offer also
> only contains the answer for the one interface the request was send
> over. Last but not least the dhcp offer is based on the mac address of
> the used interface (where I have to admit that I don't know if the DHCP
> request contains an own copy of the mac address or if the server get's
> the info from the IP header of the packet.)

That's exactly what I would expect I guess. In Nut/OS, I would expect
that one would have to call NutDhcpIfConfig for each interface, just
like I need to call dhcpcd eth0 and dhcpcd eth1 under linux to
configure DHCP on both.

About the reply, I think the request is broadcasted, but the reply is
targeted, therefore, even if it's not one of the fields, it's possible
to determine from which interface it came from (and examine the mac
address field from the ethernet frame).

>> RFC 2131 specifies
>>
>> "3.6 Use of DHCP in clients with multiple interfaces
>>
>> A client with multiple network interfaces must use DHCP through each
>> interface independently to obtain configuration information parameters
>> for those separate interfaces."
>
> That's exactly the behaviour I described above, isn't it?
>

Yes, I think so as well.

Kind Regards,
    Thiago A. Correa



More information about the En-Nut-Discussion mailing list