Current-Users 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 22:58, Robert Elz wrote:
Date:        Wed, 27 Mar 2013 17:20:13 +0000
    From:        Roy Marples <>
    Message-ID:  <>

  | dhcpcd has grown into a network manager like application

Yes, I know, that is what I am not sure is a good thing, it really
should not need to do everything.

Well, it's not a text editor like say emacs for sure :)

It does everything needed to configure network addresses.
It's only a small extension from the basic goal of a DHCP client.

| Well I do have to admin that defining how the wired is configured based
  | on the SSID quite odd.


  | Can you explain why you do this?

Sure, at work we have a normal kind of network, managed by typical
network manager types, with dhcp server, firewalls, and all that normal
stuff - to access it, the only option is to use the dhcp server to
assign addresses.

On the other hand, my network at home is very transitory, there are no fixed systems just a cheap(ish) switch and whatever systems (mostly laptops) happen to be there at the time that want to exchange data at a higher rate than is available over the wireless net (which is how the world is reached). On that net, there's no system suitable to run a dhcp server, so I just statically configure addresses (there's plenty of available rfc1918 address
space so every system can have a fixed assigned address).

Then there's just the question of how to decide whether the systems should use the dhcp config, or the static one - the one trivially easily visible difference is the wireless network name - I know what names exist at work, and at home (and a few other places I visit regularly) so I just look to
see what is there, and from that decide where I am, and then use the
appropriate configuration.

  | Maybe dhcpcd can make it easier, or it's just outside its scope.

I hope the latter - I was not suggesting that dhcpcd be extended in any way for this, I don't need that, what it does now is just fine (in that all i need it to do is dhcp when dhcp is required). if anything, I'd prefer that dhcpcd be simplified to keep only the dhcp parts (thou perhaps some of the extra is all so bound up in the config that dhcp is going to do
that for some uses it makes sense to keep it all.)

From dhcpcd.conf(5)
arping address [address]
dhcpcd will arping each address in order before attempting DHCP. If an address is found, we will select the replying hardware address as the profile, otherwise the ip address. Example:

interface bge0

static ip_address=

So in this case, as you have no gateway on the LAN you could ping the LAN side address of your access point. If that's not connected to the switch, so that the LAN is 100% seperated from the wireless you could reduce the DHCP timeout of 30 seconds to something more manageable and use a fallback profile if no DHCP response like so:

timeout 6
interface bge0

static ip_address=

The other option would be to scrap the static address assignment and use the ZeroConf system of working.

If that's not acceptable then I could create a new config toggle in a future version like so:

ssid HomeOfKre
force_profile bge0

Should be possible to write that just a few lines. Let me know what works for you :)



Home | Main Index | Thread Index | Old Index