DHCP L2 Attachment

Carlos Guimarães asc2.cemg at gmail.com
Tue Jun 7 17:07:19 UTC 2011


I have been trying to implement interface L2 attachment/detachment detect
using dhclient. This way, I change the dhclient in order to react to the
proper events.

So, when it receives a link up it adds the interface to the interface list
and init the interface using a code similar to the
"dhclient_interface_startup_hook" function. However, it doesn't send any
packet. I assume that this behavior is because the "dispatch" method is
blocked waiting some kind of events.
What do you think that is happening?

When it receives a L2 detachment it calls the "do_release" function, in
order to reset the state machine of that interface.

Other approach that I have done was for each L2 attachment it launch the
state machine for that interface and call the dispatch function. Each one is
done in a different thread. However, it creates problems with concurrency.

Have you any idea how to implement this?

Best regards,
Carlos Guimarães

On 05/30/2011 05:34 PM, Michael Richardson wrote:

   "Carlos" == Carlos Guimarães <asc2.cemg at gmail.com>
<asc2.cemg at gmail.com> writes:

       Carlos> My doubt is if dhclient is able to detect L2 attachment and
    Carlos> to start for its
    Carlos> own DHCP Discover mechanisms.

ISC dhclient does not have this ability (I think this should be fixed)
If you are using Linux, look at ifplugd or networkmanager.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-workers/attachments/20110607/df772426/attachment.html>

More information about the dhcp-workers mailing list