[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Design misfeature of dhclient for multiple interfaces
On Fri, 2008-09-12 at 19:19 +0100, Roy Marples wrote:
> 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  and use the rc.d script  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
> Check the man pages for changes.
And this in turn is now done - you can swap between wired and wireless
on the same subnet and dhcpcd manages the routing just fine.
It's now getting quite stable, so I've released an experimental version
 with rc.d script  so I can get some feedback.
Use the command
netstat -nr -f inet
to verify the routing changes to the right interface.
You may wish to add this line to /etc/dhcpcd.conf
denyinterfaces fwip[0-9]* tap[0-9]*
to stop dhcpcd from managing those interfaces.
Let me know how it works for you :)
Main Index |
Thread Index |