tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: dhc* in NetBSD 7.0
On 27/03/2013 10:23, Robert Elz wrote:
Date: Wed, 27 Mar 2013 09:01:23 +0000
From: Roy Marples <roy%marples.name@localhost>
Message-ID: <28f2f4fce9556011e343b6b4693f4075%mail.marples.name@localhost>
| My recommendation is to let dhcpcd run for all interfaces and if
it
| needs limiting then use the allowinterfaces and/or denyinterfaces
| directive in dhcpcd.conf
An alternative would be to have the dhcpcd daemon process start very
early,
and do nothing at all, and then send it interface names (over a local
socket
or fifo) to use as they're discovered (which has the property of
reacting
better to interfaces that appear and disappear, without embedding
policy
of which of those need dhcp into dhcpcd itself).
This actually works!
You add "denyinterfaces *" to dhcpcd.conf to stop it working on any
interfaces at startup.
Once dhcpcd is running you can then do
dhcpcd bge0
and that will instruct the currently running dhcpcd daemon to start
working on bge0.
So the only modification you need to make I think is to get dhcpcd to
start before rc.d/network
I'm sure there are other ways as well - dhcpcd.conf is fine for
configuring
what options to get, and what script to run, etc - but it isn't ideal
for
configuring something as dynamic as interface names (plug in a usb
wireless
dongle and a new one just appears - do I want dhcp or not ... editing
dhcpcd.conf isn't really the right solution, since the answer might
depend upon
what ssid the wireless actually attaches to.)
That's the thing - dhcpcd is dynamic by nature, works by default for
hotplugged interfaces such as your usb wireless.
You can even configure in dhcpcd.conf per ssid options
# If we don't specify the ssid connected to then we assume DHCP
ssid foo
static ip_address=192.168.1.100/24
static routers=192.168.1.1
So I disagree with your assessment that dhcpcd.conf isn't ideal for
this.
Thanks
Roy
Home |
Main Index |
Thread Index |
Old Index