[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Design misfeature of dhclient for multiple interfaces
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
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 ;)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.73.2.0 10.73.1.1 255.255.255.0 UG 102 0 0 re0
10.73.2.0 10.73.1.1 255.255.255.0 UG 205 0 0 ral0
10.73.0.0 10.73.1.1 255.255.255.0 UG 102 0 0 re0
10.73.0.0 10.73.1.1 255.255.255.0 UG 205 0 0 ral0
10.73.1.0 0.0.0.0 255.255.255.0 U 102 0 0 re0
10.73.1.0 0.0.0.0 255.255.255.0 U 205 0 0 ral0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
0.0.0.0 10.73.1.1 0.0.0.0 UG 102 0 0 re0
0.0.0.0 10.73.1.1 0.0.0.0 UG 205 0 0 ral0
Main Index |
Thread Index |