tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Design misfeature of dhclient for multiple interfaces



On Tue, 2008-09-09 at 08:24 +0100, Roy Marples wrote:
> On Mon, 2008-09-08 at 21:42 -0400, Steven M. Bellovin wrote:
> > Certainly one approach.  dhcpcd might handle this better, too.
> 
> It does! But currently only for Linux.
> Linux has route metrics, which means that you can install multiple
> routes to the same destination. See attached route output for an
> example.
> re0 is wired, ral0 is wireless. As re0 has the lower metric it will be
> the preferred route. The kernel takes care of everything :)
> 
> No BSD currently supports route metrics, which poses a problem. To be
> able to solve this, dhcpcd needs to work like dhclient and have one
> instance handling multiple interfaces (dhcpcd-4 and earlier are single
> instance per interface by design). This has already been done and works
> very well. The code is also a lot smaller and whilst memory usage for
> the instance has increased (duh - more interfaces == more memory) it's
> still more efficient than dhclient by quite some margin.
> 
> I'll email tech-net@ when this is done so I can get some testing done.
> Should be done somewhere over the next few days or weeks - prod me if I
> take a bit longer ;)

This is now done - well mostly :)
You can download a snapshot here [1] and use the rc.d script [2] as
well. Don't enable ifconfig_xxx=dhcp.

The only things left to do are change the subnet route for the preferred
interface address and expire the lease when the link goes and re-request
it comes back up. This maybe done over the weekend, if not next week.

BTW, this is a very experimental version, ware bugs or broken features!
Check the man pages for changes.

Thanks

Roy

[1]
http://git.marples.name/?p=dhcpcd.git;a=snapshot;h=2679757e86f965a8732b9b4400cf3a7da065299c;sf=tgz

[2] http://roy.marples.name/dhcpcd/dhcpcd.rc



Home | Main Index | Thread Index | Old Index